- document.getElementById('homerow').className = '';
- document.getElementById('home_lat').value = lonlat.lat;
- document.getElementById('home_lon').value = lonlat.lon;
+ if (OSM.home) {
+ marker.setLatLng([OSM.home.lat, OSM.home.lon]);
+ marker.addTo(map);
+ }
+
+ map.on("click", function (e) {
+ if ($('#updatehome').is(':checked')) {
+ var zoom = map.getZoom(),
+ precision = zoomPrecision(zoom),
+ location = e.latlng.wrap();