This document assumes you already know which services you want to use from the API if you don't go through the list here .
Microsoft Bing Maps Api exposes an Rest Endpoint that gives back important map related data. The feature rich API provides rest services that are very important to companies and organisations. Some of the features include
- Location
- Elevation
- Imagery
- Routing
- Traffic
Location
Location services provide location data based on an address, point or query.
Elevation
Evelation services provides elevation data based on a query to the microsoft bing endpoint.
Imagery
Imagery services provices static images to queries like specific regions and routes to locations.
Routes
Routing services gives back routing data such as walking walking route or driving route to a place and also gives traffic information on specific areas.
Traffic
Traffic services provides traffic information about for a geographycal area.
Its easy to start Leveraging Microsoft Bing Maps API and start using in your apps or business and other solutions you are working on, all you need to do is get a key with authenticates your application to the microsoft servers. If you have an Azure subscription you can add the cloud service from there and use it in your application see my post . Manage your keys from the bingmapsportal .
Bing Maps API can be used in alot of ways in this tiny code sample project i have used the API in different ways.
/**
* @param{Object} - Dom object element
* @param{Object} - Object option settions for the map
*/
map = new Microsoft.Maps.Map(document.getElementById('Map'), {
credentials: 'asdfasdfasdfasdfasdfasdfasdfsadfasdf',
mapTypeId: Microsoft.Maps.MapTypeId.road,
zoom: 15
});
Bing maps provide a large namespaces with different modules that help use make use the API in a more efficient way. The API large and having all the modules loaded together with your Application would be too heavy.
/**
* @param{Object} - Module namespace
* @param{Function} - Callback function
*/
Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function(){
/// Instanciate the directionmanager
var directionMan = new Microsoft.Maps.Directions.DirectionsManager(map);
/// Set and Render the input directions controls
directionMan.setRenderOptions({itineraryContainer: directionsManager});
directionMan.showInputPanel("directionsInputPanel");
});
This code sample is very basic but i might be updating it to something different than a code sample if you have any review, comments or get in touch on my email .
Thank you @bigkevzs