I want to download the map offline for a selected part of the map with single Zoom level with Openlayer OSM layer. I have got the four corner of map i.e display section of a map.
But need to get the all tiles image or tiles between that four corners. I have reviewed some example:
Openlayers get the image url of the tile under the mouse
https://gis.stackexchange.com/questions/167792/how-to-retrieve-the-tile-url-in-openlayers-3
But I need to download the tiles on customer button click. Can anyone please help me.
Here's a simple example to save tiles as data urls for later use. If you need saved tiles to remain available after closing and reopening the browser replace sessionStorage with localStorage.