Fix map when lat/lon unknown (#245)

This commit is contained in:
Tim Wilkinson 2022-03-01 19:06:55 -08:00 committed by GitHub
parent a3f9e98577
commit 5a47d39b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -793,7 +793,7 @@ html.print([[
}).addTo(map);
]])
if lat and lon then
if type(lat) == "number" and type(lon) == "number" 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);")