Fix use of coordinate to center map (#304)

* Fix use of coordinate to center map

* Typo
This commit is contained in:
Tim Wilkinson 2022-03-17 18:35:35 -07:00 committed by GitHub
parent 57f81e48cc
commit ebd4a9e07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -791,7 +791,7 @@ html.print([[
}).addTo(map);
]])
if type(lat) == "number" and type(lon) == "number" then
if tonumber(lat) and tonumber(lon) then
html.print("marker= new L.marker([" .. lat .. "," .. lon .. "],{draggable: true, icon: dotIcon});")
html.print("map.addLayer(marker);")
html.print("map.setView([" .. lat .. "," .. lon .. "],13);")