none
Saving image from Bing Ajax control RRS feed

  • Question

  • Hi

    Is it possible to save the image that is generated using the Ajax control to a byte array so it can be saved to the hard disk, I've managed to do this using the imagery services as they render one single image but it doesn't seem possible using the Ajax control, as it has multiple images, including one for the route that is generated.

    Any help appreciated.

    Thanks

    Martin.

    Tuesday, November 20, 2012 4:03 PM

Answers

  • You won't be able to do this from the browser, you will have to do this on the server side using a Web Browser control.

    Note this will fall under the Bing Maps Print Terms of Use: http://www.microsoft.com/maps/product/print-rights.html 


    http://rbrundritt.wordpress.com

    Tuesday, November 20, 2012 5:39 PM
  • @Martin - the WebBrowser control inherits from the base Control class, so it should implement DrawToBitmap() - http://msdn.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx

    However, from the additional information you've provided I'm not quite sure if this would help in your case. I'm no licensing expert, but it sounds like you're trying to download the Bing Maps tiles and effectively run your devices "offline", and, AFAIK this is not allowed.


    twitter: @alastaira blog: http://alastaira.wordpress.com/ | Pro Spatial with SQL Server 2012

    Wednesday, November 21, 2012 9:45 AM
    Moderator
  • As Alastair mentioned it is against the terms of use to use Bing Maps imagery "offline".

    http://rbrundritt.wordpress.com

    • Marked as answer by MartinMiddleton Wednesday, November 28, 2012 10:30 AM
    Wednesday, November 21, 2012 7:25 PM

All replies

  • You won't be able to do this from the browser, you will have to do this on the server side using a Web Browser control.

    Note this will fall under the Bing Maps Print Terms of Use: http://www.microsoft.com/maps/product/print-rights.html 


    http://rbrundritt.wordpress.com

    Tuesday, November 20, 2012 5:39 PM
  • Hi

    I'm unsure how the web browser control would help, I need to save the imagery to a single file so that this can then be distributed to our handheld devices in the field as we are unable to open the maps directly on the handheld device as we are getting errors when we try and do this, thinking that this could be down to the device not supporting javascript. Does the web browser control give me some extra way of saving this imagery?

    Thanks

    Martin.

    Wednesday, November 21, 2012 9:28 AM
  • @Martin - the WebBrowser control inherits from the base Control class, so it should implement DrawToBitmap() - http://msdn.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx

    However, from the additional information you've provided I'm not quite sure if this would help in your case. I'm no licensing expert, but it sounds like you're trying to download the Bing Maps tiles and effectively run your devices "offline", and, AFAIK this is not allowed.


    twitter: @alastaira blog: http://alastaira.wordpress.com/ | Pro Spatial with SQL Server 2012

    Wednesday, November 21, 2012 9:45 AM
    Moderator
  • As Alastair mentioned it is against the terms of use to use Bing Maps imagery "offline".

    http://rbrundritt.wordpress.com

    • Marked as answer by MartinMiddleton Wednesday, November 28, 2012 10:30 AM
    Wednesday, November 21, 2012 7:25 PM