Last active
December 25, 2015 00:59
-
-
Save jacobtoye/6891979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assumes LEGEND exists like in legend.js and that map is an already initialized Leaflet map | |
for(var i = 0; i < LEGEND.sections.length; i++) { | |
for(var j = 0; j < LEGEND.sections[i].keys.length; j++) { | |
L.marker([LEGEND.sections[i].keys[j].coordinates[0], LEGEND.sections[i].keys[j].coordinates[1]]) | |
.bindLabel(LEGEND.sections[i].keys[j].text, { noHide: true }) | |
.addTo(map) | |
.showLabel(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment