openlayers-5

How to add many markers with custom text to openlayers 5

六眼飞鱼酱① 提交于 2019-12-06 20:37:30
I'm using openlayers v5.3.0, and actually loading a map with many markers (in the snippet are a small subset, in my code there are thousands). What i want to do is to customized those markers, styling them with differents colors and text. How can i customize the text and the color of each marker added to the map? var baseMapLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); var map = new ol.Map({ target: 'map-canvas', layers: [baseMapLayer], view: new ol.View() }); var markers = []; markers.push(new ol.Feature({ geometry: new ol.geom.Point( ol.proj.fromLonLat([12.483713800000032, 41

How to download the OSM tiles for selected part of map

故事扮演 提交于 2019-12-04 06:59:59
问题 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

How to download the OSM tiles for selected part of map

被刻印的时光 ゝ 提交于 2019-12-02 13:03:30
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