Hi, is there a way to get the raw address format instead of map itself (by using Twig)? Basically I need to display map and the address in other section of a page.

I tried using several of mentioned methods without any result: https://drupal.stackexchange.com/a/228393

Comments

Gugols created an issue. See original summary.

jhodgdon’s picture

Status: Active » Postponed (maintainer needs more info)

The formatter for this module already has a checkbox in its options that you can use to display the address along with the map. You can look at the existing Twig template to see how it is output.

But maybe you are looking for something else?

jhodgdon’s picture

Status: Postponed (maintainer needs more info) » Fixed

So, just to be clear... If you look at templates/simple-gmap-output.html.twig ... you will see this:

{% if address_text is not empty %}
  <p class="simple-gmap-address">{{ address_text }}</p>
{% endif %}

The way this works is that if the "Include address text" box is checked in the field formatter settings (either in Views or in your Manage Display screen), that "address_text" variable will be sent to the Twig template. So if you're making a custom template for your site, you can do the same thing as that to display the address.

Hope this helps... Tentatively marking this support request Fixed, but if this doesn't answer your question, you can mark it back to Active and add some information to clarify what you are trying to do.

Status: Fixed » Closed (fixed)

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