0

I'm using this ESRI leaflet plugin Example to load a tiledMapLayer.

<script>
  var map = L.map('map').setView([30.70, -81.47], 12);

  L.esri.tiledMapLayer({
    url: "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer"
  }).addTo(map);
</script>

available here: https://esri.github.io/esri-leaflet/examples/tile-layer-1.html

This works when you have only one titled map service on the URL or just number 0 which it defaults to, but I would like refer to the other titled services on this url.

  1. World Imagery (0)
  2. Low Resolution 15m Imagery (1)
  3. High Resolution 60cm Imagery (2)
  4. High Resolution 30cm Imagery (3)
  5. Citations (4)

I was expecting to be able to write code like this but no luck:

<script>
  var map = L.map('map').setView([30.70, -81.47], 12);

  L.esri.tiledMapLayer({
    url: "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/2"
  }).addTo(map);
</script>

I've appended the /2 at the end of the service expecting to load High Resolution 60cm Imagery (2) from the service but I get no returns.

1

These are the component data layers for the "World Imagery" map service. You can't pick and choose which ones you'll see, the service is for the combined map.

  • is there no way to have multiple title services? – AnythingMapping Feb 1 '18 at 20:54
  • Each tile service is it's own "/MapServer" URL. You can have "Dynamic map services" that render a full map each time you move the map (same as WMS in the OGC world), with no tile cache. With dynamic map services the server can define options around what is included/excluded. The ESRI base layers aren't availabe as dynamic map services – rcoup Feb 5 '18 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.