How get layerID or Layer name from marker

المشرف العام

Administrator
طاقم الإدارة
I can get marker but I want to get the layer ID or name from markers so as to filter markers.

var overLayers = [{ name: "Bar", icon: iconByName('bar'), layer: L.geoJson(Bar,{onEachFeature: onEachFeature}), group: "Bar", marekerType:"accordion", active:true,}];Get markers function

function getAllMarkers() { var allMarkersObjArray = []; // for marker objects var allMarkersGeoJsonArray = []; // for readable geoJson markers $.each(map._layers, function (ml) { if (map._layers[ml].feature) { allMarkersObjArray.push(this) allMarkersGeoJsonArray.push(JSON.stringify(this.toGeoJSON())) } }) console.log(allMarkersObjArray);}

Is there any idea?



أكثر...
 
أعلى