Check Bird’s eye Coverage Availability
The Microsoft.Maps namespace has a static function that can be used to check if Bird’s eye imagery is available in at a specified location.
Name | Return Type | Description |
---|---|---|
getIsBirdseyeAvailable(loc: Location, heading: Heading or number, callback: function(isAvailable: boolean)) | Checks to see if Birdseye imagery is available at a specified location and heading. |
The following code demonstrates how to check if bird’s eye imagery is available for a specified location and then loads the map into bird’s eye or aerial mode accordingly.
var map;
var loc = new Microsoft.Maps.Location(45.464210, 9.190396);
Microsoft.Maps.getIsBirdseyeAvailable(loc, Microsoft.Maps.Heading.North, function(isAvailable) {
map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
center: mapLocation,
mapTypeId: isAvailable ? Microsoft.Maps.MapTypeId.birdseye : Microsoft.Maps.MapTypeId.aerial
});
//Add your post map load code here.
});