Esri / esri-leaflet

A lightweight set of tools for working with ArcGIS services in Leaflet. :rocket:
https://developers.arcgis.com/esri-leaflet/
Apache License 2.0
1.61k stars 800 forks source link

tileMaplayer bounds property does not take effect #1284

Closed qq466610987 closed 3 years ago

qq466610987 commented 3 years ago

when use tileMapLayer load mapServer, when the map pan to the position outside the mapServer bound, but still request the map, then throw 404 error like this: 1625392243(1)

the code: tiledMapLayer(url, { bounds: L.latLngBounds() }

gavinr commented 3 years ago

Hi, can you please post a code/data example (using jsbin, codepen, etc) showing this error?

qq466610987 commented 3 years ago

Hi, can you please post a code/data example (using jsbin, codepen, etc) showing this error?

like the example: http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html

when you pan the map, this may throw 404 error image

jwasilgeo commented 3 years ago

To help clarify, what is the goal that you would like to achieve when you have a tiledMapLayer with a bounds option included that esri-leaflet and/or Leaflet is not doing now?

And, are these 404 errors affecting your site when the user pans/zooms to places that do not have tiles available from the MapServer?

qq466610987 commented 3 years ago

sorry,may I not explain my issues clearly first, this is the bounds description: If set, tiles will only be loaded inside the set LatLngBounds. my understand is when i have a tiledMapLayer with a bounds, the tile will not request when I pan the place outside the bounds ,but the tile request is still exist. second, the 404 errors is not affect my site, I just fell uncomfortable when see the 404 errors

jwasilgeo commented 3 years ago

Thanks for the clarifications. When I try to set a bounds option on our other sample page that uses a more standard Web Mercator projection (Spatial Reference: 102100 (3857)), it appears to behave as expected:

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

bounds: L.latLngBounds([[ 32, -130], [ 13, -100]])

I borrowed some bounds from this LeafletJS tutorial page for convenience: https://leafletjs.com/examples/video-overlay/

Can you tell us more about your own map service that you are working with, if a public demo is not possible?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because we're waiting on more information or details, but have not received any response. It will be closed if no further activity occurs. Thank you!