Two field names in the function gmap_set_location on gmap.module are misspelled and should be correct:
replace

                    $("gmap-latitude").value=point.lat();
                    $("gmap-longitude").value=point.lng();

with:

                    $("edit-location-latitude").value=point.lat();
                    $("edit-location-longitude").value=point.lng();

and

                    $("gmap-latitude").value="";
                    $("gmap-longitude").value="";

with

                    $("edit-location-latitude").value="";
                    $("edit-location-longitude").value="";

In the same function, change

                    {id}.zoomIn();
                    {id}.zoomIn();

with

                    {id}.zoomIn();
                    {id}.panTo(point); 

to avoid the marker going off the map.

Comments

webgeer’s picture

Status: Active » Closed (works as designed)

Actually the id's of the form elements are set to the "gmap-..." when the form is created, this is because this is intended to be able to be used in other locations other than just location forms, so the form id's had to be set manually.

The panTo function is already in the function.