Skip to content

kevinkid/Microsoft-Bing-Maps-API

Repository files navigation

Bing Logo

Microsoft Bing APIs

This document assumes you already know which services you want to use from the API if you don't go through the list here .

Bing Maps Rest Services

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

Feature list

  1. Location
  2. Elevation
  3. Imagery
  4. Routing
  5. 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.

Authentication

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 .

bingmapsportal

API usage (demo)

Bing Maps API can be used in alot of ways in this tiny code sample project i have used the API in different ways.

Rendering the Map

map smaple

    /**
     * @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 Map Services

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.

Bing Maps Services

    /**
     * @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

About

Having fun with Microsoft Bing Maps API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published