Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#16 | 2945233-16-widget-fixed.patch | 17.32 KB | ChristianAdamski |
|
Comments
Comment #2
simeReproduced.
Comment #3
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedWorks fine here. What exactly did you do? What do you mean by "media items"? How is your setup different than the demo setup?
Comment #4
simeI 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.
Comment #5
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedWorks fine here. Just checked again. Please re-open when you can provide clear steps on how to reproduce
Comment #6
Tomazetti CreditAttribution: Tomazetti commentedI'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.
Comment #7
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedI think I fixed that yesterday. Did you pull since yesterday?
Comment #8
Tomazetti CreditAttribution: Tomazetti commentedIf 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.
Comment #9
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedPlease try again with -dev now.
Comment #10
Tomazetti CreditAttribution: Tomazetti commentedI 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.
Comment #11
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedDoes this still happen with current -dev?
Comment #12
Tomazetti CreditAttribution: Tomazetti commentedStill 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?
Comment #13
willeaton CreditAttribution: willeaton commentedI 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.
Comment #14
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedHard to argue with video evidence. Is this definitely captured on 2.x-dev?
Comment #15
willeaton CreditAttribution: willeaton commentedHi 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?
Comment #16
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedTook care of a lot more edge cases.
Comment #18
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commentedComment #20
Nick Hope CreditAttribution: Nick Hope commentedThe 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.
Comment #21
Nick Hope CreditAttribution: Nick Hope commented8.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?