Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
var formen = [{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"farbe": "red",
|
||||
"info": "BT 56"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [[
|
||||
[ 8.896696195006372, 53.054442380171004], //Reihenfolge umgekehrt: LonLat
|
||||
[ 8.896603155881166, 53.05449229656882],
|
||||
[ 8.896517828106882, 53.054433855886636],
|
||||
[ 8.89661053195596 , 53.05438418124448]
|
||||
]]
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
L.geoJson(formen,{
|
||||
style: function(feature){
|
||||
return {weight: 1, color: feature.properties.farbe};
|
||||
},
|
||||
onEachFeature: onEachFeature
|
||||
}
|
||||
).addTo(map);
|
||||
|
||||
function onEachFeature(feature, layer) {
|
||||
if (feature.properties && feature.properties.info) {
|
||||
layer.bindPopup(feature.properties.info);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user