update geojson editmap
This commit is contained in:
parent
5b46e9a6c9
commit
136e14252f
|
@ -15,7 +15,7 @@ function createModel(){
|
|||
//MAP Part
|
||||
dialogEditNodeMap.setView(internal.config.editmap.view,internal.config.editmap.zoom)
|
||||
L.tileLayer(internal.config.editmap.tiles.url,internal.config.editmap.tiles.option).addTo(dialogEditNodeMap)
|
||||
send('GET',internal.config.editmap.geojson).then(function(data){
|
||||
send("GET",internal.config.editmap.geojson).then(function(data){
|
||||
L.geoJson(data,{
|
||||
pointToLayer: function (feature, latlng){
|
||||
feature.properties.radius = 10
|
||||
|
@ -25,12 +25,15 @@ function createModel(){
|
|||
layer.bindLabel(feature.properties.name)
|
||||
},
|
||||
style: function(feature){
|
||||
if(feature.geometry.type=='LineString')
|
||||
return {color:feature.properties["stroke"],
|
||||
if(feature.geometry.type === "LineString" || feature.geometry.type === "Polygon")
|
||||
return {color: feature.properties.stroke,
|
||||
opacity:feature.properties["stroke-opacity"],
|
||||
fillColor: feature.properties.fill,
|
||||
fillOpacity:feature.properties["fill-opacity"],
|
||||
stroke: true,
|
||||
weight: 5,
|
||||
lineCap:'round',
|
||||
lineJoin:'round'}
|
||||
weight: feature.properties["stroke-width"],
|
||||
lineCap: "round",
|
||||
lineJoin: "round"}
|
||||
return {
|
||||
color: feature.properties["marker-color"],
|
||||
fillColor: feature.properties["marker-color"],
|
||||
|
|
Loading…
Reference in New Issue