Since upgrade to 2.10 the function to center the map seems to have gone. At the same time a set marker button has appeared. I cannot seem to find the right way to set the marker either by pressing the new button or by clicking on the map.

Comments

scot.hubbard’s picture

Status: Active » Postponed (maintainer needs more info)

Can you give me some more info please? Browser being used, OS etc.

Thanks.

brewerkr’s picture

I'm seeing the same issue (Center field missing - can't enter address to center on - so I get stuck with London as the default map and have to zoom way out, drag over to the US, zoom way in, etc.). Mac, Firefox and Chrome (field isn't hidden, it's not in the code anymore).

magpie5212’s picture

I figured out how to set the marker by filling in the lat/long fields, but still can't set from the map field.

When I click on the map the fist closes but there is no movement of the marker.

This is the same on Opera 34, IE 11 and Firefox 35 on Windows 8.

Miss the old center function where I could enter an address. I am currently having to open maps in another window and then paste back the lat/long.

scot.hubbard’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

brewerkr - You should be able to set the default location for the map field when you add the field to the content type - this I have tested and it should work fine.

magpie5212 - The map that you see in the actual field on the edit screen is a preview. To set the marker you should click "Set Map Marker" which will open a fresh map in a modal dialog - use that to set the marker location and then click "Insert map".

I have tested these features in IE11, FireFox, Chrome and Opera and all operate as expected.

magpie5212’s picture

There is no modal dialog in my case.

Even if there were, the help text at the top of the field needs to have a change so that it includes pressing the button, at present it reads 'Once you have found the correct location click that point to set the map.' so does not help users enough.

magpie5212’s picture

Status: Closed (works as designed) » Active
scot.hubbard’s picture

Status: Active » Closed (cannot reproduce)

I have just added another release to update the help text that goes with the field.

As for the issues that you are seeing, I simply cannot replicate them. I would suggest checking you browser compatibility mode for IE, and maybe try the module again on a fresh install of Drupal.

magpie5212’s picture

I have been trying to figure this out for an hour or so now. What puzzles me is that there is no 'onclick' attribute for the Set Map Marker button. It just submits the form.

How is the button supposed to connect to the JS?

scot.hubbard’s picture

There is no onclick.

Lines 130 to 133 of js/google_map_field_setter.js uses jQuery to add the interaction with the button:

$('#map_setter_' + data_delta).unbind('click').on('click', function(event) {
  event.preventDefault();
  googleMapFieldSetter($(this).attr('data-delta'));
});

Have you installed jQuery update? There may be a dependency that I have missed.

magpie5212’s picture

Status: Closed (cannot reproduce) » Active

On my new installation I have not done anything with JQuery. On my one of my old installations I have JQuery used by SuperFish menus, but just installed that as instructed in that module and did not change JQuery.

scot.hubbard’s picture

The ".on" method is not supported until jQuery 1.7.

Try 7.x-2.12. I managed to replicate the issue you are seeing by disabling the jQuery Update module and the changes I have made in 7.x-2.12 fixed the problem.

magpie5212’s picture

Fixed for me in 7.12.

scot.hubbard’s picture

Status: Active » Closed (fixed)