You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a React application which allows the users to download map tiles at the selected zoom level of their choice. They can select their zoom level from a drop down menu (defaults to 10). When they click download, a modal appears asking for them to confirm if they want to download x many tiles. This is very similar to this example. However, the number of tiles that appears is incorrect. The number that appears instead is the number of tiles for the previous zoom level.
i.e., if a user selected zoom level 9 and clicked download. The form would appear asking if they wished to download 20 tiles. After confirming, only 9 tiles are downloaded (This is confirmed by looking in devtools > application > IndexedDB > leaflet.offline > tileStore) which is the number of tiles are the modal displays when the user selects a zoom level of 8 (but of course, only . What is interesting is the actual number of tiles that is downloaded 4 tiles are actually download).
What makes this more interesting is the number of tiles that are actually downloaded (i.e., 9 for zoom level 9 and 4 for zoom level 8) are correct. I have confirmed this by force the map to only use downloaded tiles and then console logged the current zoom level and the tiles do appear at zoom level 9 and 8 respectfully and are within the bounds of the viewport.
I do believe I have the cause for this issue. The tile provider I am using does not display correctly unless the zoomOffset is set to -1. I believe the zoomOffset from TileLayerOptions is not fully integrated into the _calculateTiles() method in ControlSaveTiles.
The text was updated successfully, but these errors were encountered:
I am creating a React application which allows the users to download map tiles at the selected zoom level of their choice. They can select their zoom level from a drop down menu (defaults to 10). When they click download, a modal appears asking for them to confirm if they want to download x many tiles. This is very similar to this example. However, the number of tiles that appears is incorrect. The number that appears instead is the number of tiles for the previous zoom level.
i.e., if a user selected zoom level 9 and clicked download. The form would appear asking if they wished to download 20 tiles. After confirming, only 9 tiles are downloaded (This is confirmed by looking in devtools > application > IndexedDB > leaflet.offline > tileStore) which is the number of tiles are the modal displays when the user selects a zoom level of 8 (but of course, only . What is interesting is the actual number of tiles that is downloaded 4 tiles are actually download).
What makes this more interesting is the number of tiles that are actually downloaded (i.e., 9 for zoom level 9 and 4 for zoom level 8) are correct. I have confirmed this by force the map to only use downloaded tiles and then console logged the current zoom level and the tiles do appear at zoom level 9 and 8 respectfully and are within the bounds of the viewport.
I do believe I have the cause for this issue. The tile provider I am using does not display correctly unless the
zoomOffset
is set to-1
. I believe thezoomOffset
fromTileLayerOptions
is not fully integrated into the_calculateTiles()
method inControlSaveTiles
.The text was updated successfully, but these errors were encountered: