doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 8 forks source link

Exception with the `infoWindowTemplate` option for the `map` method in Twig #48

Closed MoritzLost closed 2 years ago

MoritzLost commented 2 years ago

I just tried the update to Google Maps 4.1.5. I have an entry type with a location field, the template for that entry type displays a map with a marker pointing to that location. The marker has an info-window with the address entered into the field.

Here's the Twig code, this was working fine in version 4.1.1:

{% set map = googleMaps
    .map(location, {
        id: 'offer-institute-single-map',
        infoWindowTemplate: 'maps/marker-info-window',
        mapOptions: {
            fullscreenControl: true,
            gestureHandling: 'cooperative',
            mapTypeControl: false,
            streetViewControl: false,
        },
        styles: get_map_styles(),
    })
    .zoom(location.zoom ?? 13)
%}

{{ map.tag({ assets: false, init: false, }) }}

This causes the following exception:

google-maps-exception

Looks like a regression caused by the info window refactoring.

Let me know if you need the full stack trace.

lindseydiloreto commented 2 years ago

This is now fixed in v4.1.6, thanks for reporting it.

@MoritzLost I'll follow up with you via Discord DM to resolve your GDPR concerns.