Closed ozgursarikamis closed 1 year ago
I am having trouble with GeometryCollection. When I try to display this type of data on the map I get this error:
TypeError: layer.bindContextMenu is not a function
Here is my full code:
var geoJsonLayer = new L.geoJSON(parsedGeoJson, { style: jsonLayerStyle, pointToLayer: function(data, latLng) { }, onEachFeature: function(feature, layer) { layer.bindContextMenu({ contextmenu: false, contextmenuWidth: 240, contextmenuInheritItems: false, contextmenuItems: [ { text: "<i class='fa fa-map-marker'></i> Coordinates", callback: showCoordinates }, { text: "<i class='fa fa-align-center'></i> Center", callback: centerMap }, "-", { text: "<i class='fa fa-search-plus'></i> Zoom In", callback: zoomIn }, { text: "<i class='fa fa-search-minus'></i> Zoom Out", callback: zoomOut }, { text: "<i class='fa fa-times'></i> Cancel", callback: function() { return; } } ] }); } }).addTo(map);
here is my data:
Thank you.
I am having trouble with GeometryCollection. When I try to display this type of data on the map I get this error:
TypeError: layer.bindContextMenu is not a function
Here is my full code:
here is my data:
Thank you.