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
<script type="text/javascript"> | |
Microsoft.Maps.loadModule('Microsoft.Maps.AdvancedShapes'); | |
</script> |
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
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css' rel='stylesheet' /> |
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 mapOptions = { credentials: "<yourKeyString>" }; | |
var map = new Microsoft.Maps.Map(document.getElementById("divId"), mapOptions); |
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
L.mapbox.accessToken = "<yourAccessTokenString>"; |
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
// add an event handler to a Pushpin object | |
var pin = new Microsoft.Maps.Pushpin(<Location> object); | |
var eventHandlerId = Microsoft.Maps.Events.addHandler(pin, ‘mouseover’, function (event) { | |
// some code here to handle mouseover event on pin object | |
}); | |
// remove an event handler by using the previously created handler id | |
Microsoft.Maps.Events.removeHandler(eventHandlerId); |
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
// add an event handler to a Marker object | |
var marker = L.marker(<LatLng> object); | |
marker.on('mouseover', function (event) { | |
// some code here to handle mouseover event on a marker object | |
}); | |
// remove an event handler | |
marker.off('mouseover'); |
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 viewOptions = { | |
credentials: "yourBingMapKeyString", | |
bounds: <LocationRect> object, | |
showMapTypeSelector: false, | |
mapTypeId: Microsoft.Maps.MapTypeId.aerial, | |
labelOverlay: Microsoft.Maps.LabelOverlay.visible, | |
showDashboard: false, | |
enableSearchLogo: false | |
}; |
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
L.mapbox.accessToken = 'yourMapboxAccountAccessTokenString'; | |
var mapOptions = { | |
zoomControl: false, | |
center: initExtent.center().toMapboxLatLng() | |
maxZoom: 20 // This overrides any maxZoom set on map layers | |
}; | |
var map = L.mapbox.map(containerDivId, "yourMapboxMapId", mapOptions); |
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 MM = Microsoft.Maps; | |
function (val) { | |
switch (val) { | |
case '0': | |
map.setView({ mapTypeId: MM.MapTypeId.road }); | |
break; | |
case '1': | |
map.setView({ mapTypeId: MM.MapTypeId.aerial, labelOverlay: MM.LabelOverlay.hidden }); | |
break; |
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 mapboxSatelliteLayer = L.mapbox.tileLayer('satelliteMapboxMapId'); // default map | |
var mapboxStreetLayer = L.mapbox.tileLayer('streetMapboxMapId'); | |
function (val) { | |
switch (val) { | |
case '0': | |
if (_map.hasLayer(mapboxSatelliteLayer)) { | |
_map.removeLayer(mapboxSatelliteLayer); | |
} | |
_map.addLayer(mapboxStreetLayer); |
OlderNewer