locked
REST Imagery always returns HTTP image url - can I use https? RRS feed

  • Question

  • Requests to the REST Imagery meta data service always return a plain http image url, even when the API call is over HTTPS

    ie: https://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?key=...

    returns
    imageUrl: "http://ecn.{subdomain}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=1135",

    However I noticed that HTTPS url works too, ie: https://ecn.t0.tiles.virtualearth.net/tiles/a122.jpeg?g=1135

    Two questions:

    1. Is it OK to use the HTTPS url for tiles?

    2. Is there a way to get the REST api to return the https urls for 'imageUrl'?

    Some background: I'm working on the following issue in OpenLayers:

    https://github.com/openlayers/openlayers/pull/700#issuecomment-10061427
    https://github.com/openlayers/openlayers/commit/a76588c
    Tuesday, December 4, 2012 3:01 AM

Answers

  • Why are you accessing the tiles directly? There are a lot of restrictions around doing this and you should have a Bing Maps license at a minimum. As for the https, the tiles can be requested using https. I'll refer this to the development team for investigation.

    http://rbrundritt.wordpress.com

    • Marked as answer by Ricky_Brundritt Wednesday, December 5, 2012 11:07 AM
    • Unmarked as answer by robbie.mackay Sunday, December 9, 2012 11:37 PM
    • Marked as answer by Ricky_Brundritt Tuesday, December 11, 2012 11:14 AM
    Tuesday, December 4, 2012 9:25 AM
  • As I mentioned before it is fine to access the tiles using https. Simply add some logic to check to see if the URL starts with https, if not then replace http: with https:

    http://rbrundritt.wordpress.com

    Monday, December 10, 2012 9:38 AM

All replies

  • Why are you accessing the tiles directly? There are a lot of restrictions around doing this and you should have a Bing Maps license at a minimum. As for the https, the tiles can be requested using https. I'll refer this to the development team for investigation.

    http://rbrundritt.wordpress.com

    • Marked as answer by Ricky_Brundritt Wednesday, December 5, 2012 11:07 AM
    • Unmarked as answer by robbie.mackay Sunday, December 9, 2012 11:37 PM
    • Marked as answer by Ricky_Brundritt Tuesday, December 11, 2012 11:14 AM
    Tuesday, December 4, 2012 9:25 AM
  • Just to clarify: In OpenLayers, the Get Imagery Metadata API (http://msdn.microsoft.com/en-us/library/ff701716.aspx) of the Bing Maps REST Services is used in conjunction with the user's API key to retrieve the tile URL templates, attribution and resolution range. Tiles are being accessed according to that metadata and displayed as map layer, with the correct attribution. This is how it looks like: http://openlayers.org/dev/examples/bing-tiles.html.
    • Edited by ahocevar Tuesday, December 4, 2012 9:31 PM
    Tuesday, December 4, 2012 6:46 PM
  • Hi,

    Just following up, I still need an answer on access the tiles over HTTPS.

    As ahocevar mentioned, we're accessing the API along with the API key and tiles are displayed with correct attribution. I want to find out if its OK/permitted to access these tiles over HTTPS, as this isn't a published or documented URL..

    Robbie

    Sunday, December 9, 2012 11:40 PM
  • As I mentioned before it is fine to access the tiles using https. Simply add some logic to check to see if the URL starts with https, if not then replace http: with https:

    http://rbrundritt.wordpress.com

    Monday, December 10, 2012 9:38 AM