How to get a tile with a transparent background? RRS feed

  • Question

  • I am generating a map tile using the Bing Maps REST API. I would like to set certain parts of the map to transparent. This is to be able to overlay the image tile on other images.

    Currently image tiles are generated by getting the image tile URL:

    http://dev.virtualearth.net/REST/V1/Imagery/Metadata/RoadOnDemand?output=xml&format=png&include=ImageryProviders&key=[YOUR KEY]

    Which gives a response containing:


    If you replace the relevant {} sections and also add on the style you get:


    Which gives a the URL for a jpg image. Removing &shading=hill from the URL gives a png image. However the map seems to have a beige background set. (The water which is set to transparent appears as beige, which indicates that there is a beige background.) How am I able to have a transparent background instead?

    So that you get something like this:


    Any suggestions would be appreciated.

    Tuesday, October 24, 2017 11:55 AM