locked
How to get a static map with polylines? RRS feed

  • Question

  • Hello.

    I need to get a static map with 2 pushpins (already possible) and them add a polyline (100 - 1000 locations) to it in order to represent the path of a vehicle on a given day/time.

    I have a good knowledge of the bing maps v7 controls but I have no idea how to proceed; I think I should use tile layers or something similar to perform the calculations to find the exact points the polyline should pass on.

    Any ideas?

    Thank you.
    Thursday, August 28, 2014 8:51 PM

Answers

  • Unfortunately there isn't an easy way to do this. But it is possible to add them afterwards. Where do you need to generate the static image? In JavaScript, on .NET code somewhere? I wrote a blog post on how to do this a long time ago with the old Bing Maps SOAP services. http://rbrundritt.wordpress.com/2008/11/03/ve-imagery-service-polygons-and-polylines/

    Its possible to do this with the REST services, I've done it before, an think I have some code somewhere for this. What are trying to accomplish? Do you want to turn your interactive map into a static image?


    http://rbrundritt.wordpress.com


    Friday, August 29, 2014 9:50 AM

All replies

  • Unfortunately there isn't an easy way to do this. But it is possible to add them afterwards. Where do you need to generate the static image? In JavaScript, on .NET code somewhere? I wrote a blog post on how to do this a long time ago with the old Bing Maps SOAP services. http://rbrundritt.wordpress.com/2008/11/03/ve-imagery-service-polygons-and-polylines/

    Its possible to do this with the REST services, I've done it before, an think I have some code somewhere for this. What are trying to accomplish? Do you want to turn your interactive map into a static image?


    http://rbrundritt.wordpress.com


    Friday, August 29, 2014 9:50 AM
  • I have a database with locations from a vehicle in different datetimes and I need to show them on the static map and put this map with the polyline(s) on a .pdf page. I'm not trying to turn the interactive map into a static image, the interactive map shows only "live" content.

    From what I`ve seen in your post, I should just generate the static map, calculate where each location of the polyline should be according to image size (Microsoft.Maps.tryLocationToPixel ?), either exact or approximate location, generate the polyline and attach it to the map ?

    Monday, September 1, 2014 12:05 PM