I'm using Geolocation Field 8.x-2.0-beta1 with the GoogleMapsAPI in Drupal 8.5.0-beta1, testing in Chrome.

When I edit an existing geolocation field of one of my media items, the map on the Edit form is correctly centered on the location, but it's marker is not displayed. The marker only displays after I manually edit the location's latitude and longitude numbers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nick Hope created an issue. See original summary.

sime’s picture

Reproduced.

ChristianAdamski’s picture

Status: Active » Postponed (maintainer needs more info)

Works fine here. What exactly did you do? What do you mean by "media items"? How is your setup different than the demo setup?

sime’s picture

I just added the field to a content type, then went to create some new content. The marker was missing in the form. Also using Chrome (OSX), didn't check other browsers.

I have reverted to 8.x-1.x so I'm unable offer more at this stage.

ChristianAdamski’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Works fine here. Just checked again. Please re-open when you can provide clear steps on how to reproduce

Tomazetti’s picture

Version: 8.x-2.0-beta1 » 8.x-2.x-dev
Status: Closed (cannot reproduce) » Needs work

I'm using the Geolocation Demo - Default Article content type of the demo, I just changed the Geolocation Demo Single field from Geolocation Lat / Lng to Geolocation Maps API.
When I'm creating a new node and clicking the map to set a marker instead of using the geocoder, the latitude and longitude fields are populated, but the marker is not displayed. If I refresh the page or manually change the latitude or longitude fields the marker appears.

ChristianAdamski’s picture

I think I fixed that yesterday. Did you pull since yesterday?

Tomazetti’s picture

If the field has a default value, when creating a new node the map already contains a marker and when clicking on the map it changes the position of the marker.
However if the field does not have a default value when clicking on the map instead of using the geocoder the marker does not appear.

I tested it with your update from yesterday.

ChristianAdamski’s picture

Status: Needs work » Postponed (maintainer needs more info)

Please try again with -dev now.

Tomazetti’s picture

I repeated the same test of comment #8 and it worked.
However, if I use the geocoder before clicking on the map and then click on the map to reposition the marker, two markers appear. One the geocoder places and the other one appears when I click on the map.
If I refresh the page or manually change the latitude or longitude fields all markers disappear.

ChristianAdamski’s picture

Does this still happen with current -dev?

Tomazetti’s picture

Still happens with the current -dev, but only if the field has no default value.
If the field has a default value, whenever I click on the map the marker position is updated, but when using the geocoder the marker position does not update, only the center of the map changes to the location indicated by the geocoder.
Is there a log that I can send you to help?

willeaton’s picture

I have exactly the same issue, see my video capture here:
https://drive.google.com/file/d/1cLcoqmxSTMoifJIrB2sogWrZxAx2CE2w/view?u...

When loading the node with saved points it never shows the first point, but shows other points, not until you change the order of the points does the first appear, this worked fine in previous versions of the module.

ChristianAdamski’s picture

Hard to argue with video evidence. Is this definitely captured on 2.x-dev?

willeaton’s picture

Hi Christian. Thanks for getting back to me. Actually no, it's using the beta version. This is for a site that is already in production. How stable is the dev version to use? Is there a possibility of launching another beta version with this and other fixes?

ChristianAdamski’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
17.32 KB

Took care of a lot more edge cases.

  • ChristianAdamski authored d2fa9b5 on 8.x-2.x
    Issue #2945233 by ChristianAdamski: Marker for existing location does...
ChristianAdamski’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Nick Hope’s picture

The patch in #16 cannot be applied to 8.x-2.0-beta1.

8.x-2.x-dev (updated 19 Sep 2018 at 08:08 UTC), which I think includes that patch, does not fix the issue. And in this version I am also unable to add locations by clicking on the map; only by manually entering co-ordinates. I am using Drupal 8.6.1.

Nick Hope’s picture

8.x-2.x-dev (updated 19 Sep 2018 at 08:08 UTC) is not exhibiting this issue in my testing today. I have patched it manually according to this comment to fix the initial zoom level issue, but that doesn't seem to affect this. It's working in either case. I don't know what has changed to make it work now.

On closer inspection, the patch in #16 does not seem to have been included directly in 8.x-2.x-dev (updated 19 Sep 2018 at 08:08 UTC). Actually the code seems to have changed a lot between 10th August and 19th September, so I guess a fix for this issue was included in a different way?