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

Add a `placeId` subfield #25

Closed lindseydiloreto closed 2 years ago

lindseydiloreto commented 3 years ago

We are currently storing the Place ID returned by the Google API, however, it is not readily accessible. The value is not visible in the Address field within the control panel, and accessing it via Twig is slightly clunky...

{% set placeId = address.raw.place_id %}

It would be nice if this value were brought up to the top level of subfields, on par with the coordinates fields.

We could (optionally) make the Place ID value visible within the Address field. Calling it via Twig would look more like this...

{% set placeId = address.placeId %}
lindseydiloreto commented 2 years ago

The placeId subfield has been added, and will be formally released with v4.1.0. 👍

In the meantime, you can get it by switching to the dev branch...

"doublesecretagency/craft-googlemaps": "dev-v4-dev"