The maxNativeZoom option of the layer is not being set when using L.esri.basemapLayer
See original GitHub issueBug
The maxNativeZoom
option of the layer is not being set when using the method L.esri.basemapLayer('Streets')
along with the options object. This means that some parts of the map display the “Map data not yet available” when the zoom level is greater than 19.
I’ve tried two different ways of setting the maxZoomLevel, both unsuccessful:
var map = L.map('map');
L.esri.basemapLayer('Imagery', { maxNativeZoom: 19}).addTo(map);
var map = L.map('map');
var layer = L.esri.basemapLayer('Imagery');
layer.options.maxNativeZoom = 19;
layer.addTo(map)
Expected Behavior
The map should be auto-scaled when zooming over the set maxNativeZoom
preventing the “Map data not yet available” tiles from being displayed. Using the L.tileLayer
Leaflet method with the appropriate Url for Imagery and setting the maxNativeZoom
option does result in the expected behavior.
Screenshots
Environment Information
- Version of Leaflet (
L.version
): 1.6.0 - Version of Esri Leaflet (
L.esri.VERSION
): 2.3.2 - Your OS: Windows 10
- Browser and Version: Chrome 83.0.4103.116
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
Solved: Esri Leaflete visible map service
I worked with arcgis javascript and the map service visibility it's ... The layer is being added to the map because you are...
Read more >leaflet - Higher than maxNativeZoom requests tiles
maxZoom and maxNativeZoom are valid constructor options for L.esri.tiledMapLayer because it extends L.GridLayer .
Read more >L.esri.FeatureLayer | Esri Leaflet - ArcGIS Developers
Function that will be used for creating layers for GeoJSON points. If the option is not specified, simple markers will be created). For...
Read more >esri-leaflet | Yarn - Package Manager
Leaflet plugins for working with a handful of the most popular ArcGIS Service types. This includes Esri basemaps and feature services, as well...
Read more >Esri - Bountysource
The maxNativeZoom option of the layer is not being set when using the method L.esri.basemapLayer('Streets') along with the options object.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Diegodlt thanks for opening this issue in the first place. You should be able to control the
maxZoom
andmaxNativeZoom
as you wish the next time we publish a release of this library. As for the other items we all discussed and identified, the conversation can continue in #1222.Now I want to backtrack a little on what I just said above. I’ve often found myself going back & forth on these different ideas, all of which have merit. 😄
I’m leaning towards reverting #1011 to give the Imagery basemap layer full control over its
maxZoom
option (andmaxNativeZoom
option) to allow for those special cases where developers really want to change them. As @patrickarlt mentioned we would then default and capmaxZoom
at 19.I think your enhancements in #1011 are very interesting, useful, and clever, @jgravois. What if we were to put that in the issue backlog and revisit once we understand how to deal with the missing tiles behavior described in https://github.com/Esri/esri-leaflet/issues/1210#issuecomment-662691014, https://github.com/Esri/esri-leaflet/issues/1210#issuecomment-662772699, and https://github.com/Esri/esri-leaflet/issues/1210#issuecomment-663065941?
I’m (clearly) open to being talked into something else if anyone has other thoughts or feelings about this, and then when we settle on our approach I am happy to work on what we agree to. Thanks y’all!