Created
May 21, 2014 18:05
-
-
Save wjramos/fe5691574e17062aeaa7 to your computer and use it in GitHub Desktop.
Leaflet map external info pane
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
// Bind a popup to each icon based on the same properties | |
marker.bindPopup('<strong>' + marker.toGeoJSON().properties.title + '</strong>' + '</br>' + marker.toGeoJSON().properties.Description); | |
//Info Pane Content | |
marker.on('click', function(e) { | |
// Force the popup closed. | |
// e.layer.closePopup(); | |
infopane.className = 'fill-lighten3 offcanvas-right animate pin-right keyline-left active'; | |
// var feature = e.layer.feature; | |
var info = '<h2 class="center">' + marker.toGeoJSON().properties.title + '</h2>' + '</br>' + '<h3>' + marker.toGeoJSON().properties.Estate + '</h3>' + '<h4>Industry: ' + marker.toGeoJSON().properties.Industry + '</h4>' + '</br>' + '<strong>Latitude: </strong>' + e.latlng.lat + '</br>' + '<strong>Longitude: </strong>' + e.latlng.lng + '</br><p>' + marker.toGeoJSON().properties.Description + '</p>'; | |
//feature.getLatLng() | |
document.getElementById('info').innerHTML = info; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Classes are from MapBox Base css framework