Bing maps driving directions

Bing Maps (formely VirtualEarth Maps) has a splendid driving direction service, covering the whole world — neither Google Maps no another webmaps do that.

As a GIS-web developer you can face a little problem - driving direction has limited API access and you cat get generalized route only (i.e. curve of few points VERouteItineraryItem instead of shape VEShape), because API property VERoute.ShapePoints is available with explicit permission from Microsoft, in other words — they encrypt shape data and if you subscribe the service will give you the key. I have figured out there are limitations for number of requests - 1000 per day for developer and $0.01 per request for enterprise.

Bing directions with OpenLayers

The idea:

  1. create Bing layer without tiles VEMapOptions.LoadBaseTiles=false
  2. get route with Bing API
  3. maximum zoom layer to get detailed shape
  4. parse SVG or VML poliline with pixel-to-LonLat function
It seems to be easier than breaking encrypted VERoute.ShapePoints data. In a couple of days i will upload working sample to OpenLayers sandbox.

No comments:

Post a Comment