Hi,

Thanks for this simple module! I have created a content type which uses the geofield and the geofield Gmap. This content type has also several other fields. When i am going to create a new node i am starting with the placement of the marker to a position, let say _myposition. Then i am going to fill in the other fields of the node (such as the title). When i did this the marker automatically changes its position. Specifically, the new position of the marker is the integer values of lat and lon. (for example if _myposition is 37.44545335433, 45.5454525235, after the editing of the title the marker goes to the position 37,45). I have transformed the lat and lon tables into DOUBLE but nothing happens. Can you help me?

Comments

adam_b’s picture

Title: The marker changes position when another field is editing » The marker changes position when another field is edited
Priority: Normal » Major

I'm getting this also - any time I select/deselect another field in the node-edit form, the map resets. It doesn't necessarily change the geocode data, but it's very confusing for users. Any suggestions please?

i_g_wright’s picture

Component: Miscellaneous » Code
Status: Active » Needs review
StatusFileSize
new1.04 KB

Hi,

Please find attached a patch which should stop the map from jumping when editing any other fields on the node-edit screen. The reason the map is jumping when deselecting fields is due to the JS using onchange - onchange is a global event triggered when a input value has changed (checkboxes, radio buttons, text...) causing the map to lose it's coordinates.

Thank you,

sawtell’s picture

Status: Needs review » Reviewed & tested by the community

I have applied the patch and it has solved the issue of the map location changing after editing other, unrelated fields.

quazardous’s picture

Status: Reviewed & tested by the community » Needs review

dev is patched

thx folks

2pha’s picture

Issue summary: View changes
Status: Needs review » Fixed

closing issue

2pha’s picture

Status: Fixed » Closed (fixed)