none
WMTS from v7.0 to v8.0 RRS feed

  • Question

  • Hello, 

    We use WMTS protocol in REST to retrieve tiles. It is tileNum,tileX,tileY and I didn't find a documentation about it.

    Is there any documentation how to use it for v8 (and if no change - for v7.0)

    Thanks

    Gilad

    Wednesday, April 19, 2017 11:29 AM

Answers

  • Simply use a tile layer. Here is details of a WMTS:

    http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS

    Here is the URL to specify in a Bing Maps TileLayer:

    http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/GoogleMapsCompatible/{zoom}/{y}/{x}.png

    Here is a code sample of how to use it with Bing Maps:

    var tileLayer = new Microsoft.Maps.TileLayer({
        mercator: new Microsoft.Maps.TileSource({
        	uriConstructor: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/GoogleMapsCompatible/{zoom}/{y}/{x}.png'
    	})
    });
    map.layers.insert(tileLayer);

    Documentation supported URL parameters for Bing Maps tile layers can be found here: https://msdn.microsoft.com/en-us/library/mt712690.aspx


    [Blog] [twitter] [LinkedIn]


    Wednesday, April 19, 2017 5:08 PM
  • If you are using the Bing Maps controls, why are you trying to directly access the map tiles? Using hard coded URLs for the Bing Maps tiles is not allowed. There is a specific set of steps that have to be taken to directly access the Bing Maps tiles in custom map controls.

    [Blog] [twitter] [LinkedIn]

    Sunday, April 23, 2017 10:38 PM
  • Ok, it wasn't clear that you were using the REST imagery first to get the map tile URL. In case anyone comes across this thread, to use Bing Maps tiles in custom applications, your application first needs to call the Bing Maps Imagery metadata service each time your custom application loads to get the latest tile URL as they do change from time to time and this also allows proper authentication to occur for tracking purposes (aligns with terms of use).

    For quadkey tile layers simple put {quadkey} in as a placeholder in your URL. This is in the documentation I provided earlier.

    Also worth noting that for road tiles there is a newer map type option which uses the dynamic tile layer of Bing Maps which has updated map data. When using the REST imagery service replace Road with RoadOnDemand.


    [Blog] [twitter] [LinkedIn]

    Monday, April 24, 2017 4:10 PM

All replies

  • Simply use a tile layer. Here is details of a WMTS:

    http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS

    Here is the URL to specify in a Bing Maps TileLayer:

    http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/GoogleMapsCompatible/{zoom}/{y}/{x}.png

    Here is a code sample of how to use it with Bing Maps:

    var tileLayer = new Microsoft.Maps.TileLayer({
        mercator: new Microsoft.Maps.TileSource({
        	uriConstructor: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/GoogleMapsCompatible/{zoom}/{y}/{x}.png'
    	})
    });
    map.layers.insert(tileLayer);

    Documentation supported URL parameters for Bing Maps tile layers can be found here: https://msdn.microsoft.com/en-us/library/mt712690.aspx


    [Blog] [twitter] [LinkedIn]


    Wednesday, April 19, 2017 5:08 PM
  • Thanks for the explanation. I could not find the answer to our legacy code.

    We use now in our legacy code something like this:

    http://t3.tiles.virtualearth.net/tiles/a310313201113.jpeg?g=1179&mkt=en_US

    where a is the style, and 310313201113 is the quadKey.

    and I tried to replace it with v8 like

    http://www.bing.com/tiles/a310313201113.jpeg?g=1179&mkt=en_US

    OR

    http://www.bing.com/api/tiles/a310313201113.jpeg?g=1179&mkt=en_US

    We want to use quadkey and not zoom/y/x as you provided..

    also the url you sent me is NOT www.bing.com/...

    where is the style ? How can I change the style ?


    any idea ?

    Thanks 




    • Edited by gronnen Sunday, April 23, 2017 8:33 AM
    Sunday, April 23, 2017 8:21 AM
  • If you are using the Bing Maps controls, why are you trying to directly access the map tiles? Using hard coded URLs for the Bing Maps tiles is not allowed. There is a specific set of steps that have to be taken to directly access the Bing Maps tiles in custom map controls.

    [Blog] [twitter] [LinkedIn]

    Sunday, April 23, 2017 10:38 PM
  • Thanks, We use C++ and not Java.

    Is it possible to get tiles by quadKey in C++ using REST protocol.

    We don't use controls. We use REST. 

    A sample code in C++ to get tile by quadKey is ok too, OR html script to get fully tile (using HTTP POST).

    The output will be a tile in jpeg or png

    Thanks





    • Edited by gronnen Monday, April 24, 2017 8:24 AM
    Monday, April 24, 2017 5:44 AM
  • I got a message that  REST Imagery API is not going to be going end of life on June 30th, and the domain will not change, So we don't need to change the code.

    Thanks



    • Edited by gronnen Monday, April 24, 2017 9:10 AM
    Monday, April 24, 2017 9:10 AM
  • Ok, it wasn't clear that you were using the REST imagery first to get the map tile URL. In case anyone comes across this thread, to use Bing Maps tiles in custom applications, your application first needs to call the Bing Maps Imagery metadata service each time your custom application loads to get the latest tile URL as they do change from time to time and this also allows proper authentication to occur for tracking purposes (aligns with terms of use).

    For quadkey tile layers simple put {quadkey} in as a placeholder in your URL. This is in the documentation I provided earlier.

    Also worth noting that for road tiles there is a newer map type option which uses the dynamic tile layer of Bing Maps which has updated map data. When using the REST imagery service replace Road with RoadOnDemand.


    [Blog] [twitter] [LinkedIn]

    Monday, April 24, 2017 4:10 PM