ExpressionEngine® Answers Asked on October 3, 2021
I’m having trouble getting Maps to display the map correctly in my template. The basic template setup is like this:
{stash:embed name="layouts:global"}
{exp:channel:entries channel="{segment_1}"}
{exp:stash:set name="st_content" type="snippet"}
…
{/exp:stash:set}
{/exp:channel:entries}
My field is {centre_address}
. If I just add that within st_content
I get nothing.
If I have:
{exp:reinos_maps:html_header}
{exp:reinos_maps:map center:address="Brisbane,Australia"}
{maps:add_marker address="{centre_address}"}
{/exp:reinos_maps:map}
{exp:reinos_maps:html_footer}
I get a map, but it doesn’t show the correct marker, it’s centred on the Brisbane CBD.
If I do this:
{centre_address}
{exp:reinos_maps:html_header}
{exp:reinos_maps:map center:address="Brisbane,Australia"}
{maps:add_marker address="{centre_address}"}
{/exp:reinos_maps:map}
{exp:reinos_maps:html_footer}
I get two maps: the first is a map showing the correct marker, and the next is the same as in the previous example. Anyone know why that might be?
Also, I want to be able to get the address that’s been entered into the Maps fieldtype, but it’s unclear from the docs how to do that.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP