The settings of the feature "Marker Icon Adjustment" have no effect when using geolocation_google_maps. I can see the settings being available in geolocation-marker-icon.js, but the callback for marker_icon in "Drupal.geolocation.executeFeatureOnAllMaps" never gets fired.

Additionally (and I understand very little of the design of this module) geolocation-google-maps.js deals with the marker_icon_path setting, but uses the wrong configuration keys. I've applied a patch that fixes that mismatch, resulting in at least the marker icon being shown.

Any guidance in how to help resolve the issue is appreciated!

Comments

jsst created an issue. See original summary.

christianadamski’s picture

Good point. This shoud move to the MapFeatue instead if possible

christianadamski’s picture

Status: Active » Needs work
christianadamski’s picture

jsst’s picture

I believe you've related the wrong issue here :)

jacobbell84’s picture

I think this was a symptom of a larger problem. Looks like the architecture had changed at some point and the google maps marker related scripts never got updated. The fix seems to be binding the marker code to addPopulatedCallback in addition to addMarkerAddedCallback. The script also had a couple typos that were causing issues. This patch, combined with jsst's patch, has fixed the issues for me.

christianadamski’s picture

The larger issue is fixed. Now this patch therefor is slightly off.

christianadamski’s picture

The jsst patch is incorrect. Kinda. The issue is you can add the icon path in two very different ways:

- either hardcoded through this MapIcon Feature
or
- Through the views style by using a views image field

So the code is correct and the way it is meant to be. Instead, the feature has to decide, whether it overrides a given IconURL or not.

christianadamski’s picture

Here is an adjusted patch

  • ChristianAdamski authored 2f44d25 on 8.x-2.x
    Issue #3034891 by ChristianAdamski, jsst, jacobbell84: Map marker icon...
christianadamski’s picture

Status: Needs review » Fixed

Thanks for testing and all the work!

Status: Fixed » Closed (fixed)

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

jacobbell84’s picture