Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cordnt=this.coordinates;
- var overlayMarker = {};
- console.log("testing coodinates", cordnt)
- var layerGroup = L.layerGroup().addTo(map)
- for (i = 0; i < cordnt.length; i++) {
- newMarker = new L.marker([cordnt[i][0], cordnt[i][1]]).bindPopup(notation.desc);
- newMarker.openPopup()
- layerGroup.addLayer([newMarker])
- Object.assign(overlayMarker, {'Markers': layerGroup});
- }
- console.log("testing latlong",layerGroup)
- L.control.layers(null, overlayMarker).addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement