mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
only load on click
This commit is contained in:
@@ -34,13 +34,14 @@ function initMap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mapDiv = document.getElementById('map-container')
|
const mapDiv = document.getElementById('map-container')
|
||||||
// mapDiv.onclick = function () {
|
mapDiv.onclick = function () {
|
||||||
// initMap()
|
|
||||||
// }
|
|
||||||
|
|
||||||
initMap()
|
initMap()
|
||||||
|
}
|
||||||
|
|
||||||
|
// initMap()
|
||||||
|
|
||||||
function selectStyle(event, style) {
|
function selectStyle(event, style) {
|
||||||
|
initMap()
|
||||||
toggleButtonSelection(event.target)
|
toggleButtonSelection(event.target)
|
||||||
|
|
||||||
const styleUrl = 'https://tiles.openfreemap.org/styles/' + style
|
const styleUrl = 'https://tiles.openfreemap.org/styles/' + style
|
||||||
|
|||||||
Reference in New Issue
Block a user