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 point = new Microsoft.Maps.Point(x, y); |
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 extent = L.latLngBounds(southWest, northEast); |
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 extent = new Microsoft.Maps.LocationRect(center, width, height); | |
//or using the static method "fromCorners" | |
var extent = Microsoft.Maps.LocationRect.fromCorners(northWestLocation, southEastLocation); |
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 location = L.latLng(latValue, lngValue); |
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 location = new Microsoft.Maps.Location(latValue, lngValue); |
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); |
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
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 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
// 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'); |