We currently handle google maps integration entirely separate in the field formatter and the views style. This is less than ideal.

See how much of the handling can be joined. In the process, see if "style" handling can be integrated as well.

Comments

ChristianAdamski created an issue. See original summary.

christianadamski’s picture

Title: Join Google Maps handling in Single Field Formatter and Common Map » Merge Google Maps handling in Single Field Formatter and Common Map

On a more general level, one could of course ask the question, whether geolocation field should bother to handle Google maps in the first place. Something like https://www.drupal.org/project/gmap might be more suited. But I don't see them or any alternative around the corner, so I guess that sticks with us for now.

christianadamski’s picture

StatusFileSize
new17.79 KB

v1 - Form handling merged in a new trait.

christianadamski’s picture

Status: Active » Needs review
christianadamski’s picture

StatusFileSize
new47.75 KB

This patch does a number of things:
- fixes some more eslint warnings
- moves JS closer to Drupal standards (camelCase, use Drupal prefix, more documentation)
- lets the commonMap handler run of the geolocation core JS instead of reproducing its functionality
- all of the above patch, which is
-- introduce new googleMapsTrait
-- fetch and process settings in that trait
-- let the field formatter and views style use said trait

christianadamski’s picture

And here's the final thing with Google map styles added.

  • ChristianAdamski committed 67b9b81 on 8.x-1.x
    Issue #2747251 by stella, kae76, ChristianAdamski: Merge Google Maps...
christianadamski’s picture

Status: Needs review » Fixed

christianadamski’s picture

Status: Fixed » Closed (fixed)

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