Created
October 21, 2013 15:11
-
-
Save tmcw/7085483 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
var map = L.mapbox.map('map', 'kalipso.map-aa48b9v7').setView([61.573408, 98.446449], 4); | |
var myMarkers = L.mapbox.markerLayer().addTo(map); | |
myMarkers.on('layeradd', function(e) { | |
var marker = e.layer, | |
feature = marker.feature; | |
var popupContent = '<p><strong><img src="' + feature.properties.logo + '" class="map_logo"/>' + feature.properties.title + '</strong><br />' + feature.properties.description + '</p>' + '<img src="' + feature.properties.image + '">'; | |
marker.bindPopup(popupContent,{ | |
closeButton: false, | |
minWidth: 320 | |
}); | |
marker.setIcon(L.icon(feature.properties.icon)); | |
}); | |
myMarkers.loadURL('example.geojson'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment