- map.events.register("click", map, function (e) {
- closeMapPopup();
-
- if (document.getElementById('updatehome').checked) {
- var lonlat = getEventPosition(e);
+ map.on("click", function (e) {
+ if ($('#updatehome').is(':checked')) {
+ $('#homerow').removeClass();
+ $('#home_lat').val(e.latlng.lat);
+ $('#home_lon').val(e.latlng.lng);