Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address Fields doesn't work if the field is of type Address #53

Open
jimmylorunning opened this issue Nov 17, 2015 · 2 comments
Open

Address Fields doesn't work if the field is of type Address #53

jimmylorunning opened this issue Nov 17, 2015 · 2 comments

Comments

@jimmylorunning
Copy link

If my address is Plaintext, and I add it to the "address fields" box, then the marker gets created automatically.

However, if my address is of fieldtype "Address", it doesn't seem to populate the map with a marker at all. Am I missing something?

@objectivehtml
Copy link
Owner

Sorry for the delayed reply. Had some health issues last year and was unable to support my add-ons, but now I am back at it.

If you have time and/or still having this issue, can you elaborate a bit more? Just not sure exactly what you are trying to do.

@chadcrowell
Copy link

Hi Justin - I am having this issue as well. I am using fieldtype VZ Address to store addresses in Craft. Looks like this: http://d.pr/i/tb5z

VZ Address allows me to output the address in several formats, as shown on the GitHub page, and none of them place markers on the map. I've verified that the Craft entries loop is outputting the address info to the template, but when used with the code below, it is not outputting the content, like Craft is building the map and then not parsing the tags that come after it.

{% set options = { id: 'map', width: '100%', height: '400px', center: '38.3434416, -122.6501194', zoom: '9' } %} {{ craft.googleMaps.map(options) }} {% for affiliate in craft.entries.section('affiliates') %} {% set marker = { address: '{{ affiliate.address.street }}, {{ affiliate.address.city }}, {{ affiliate.address.region }}, {{ affiliate.address.postalCode }}', content: '{{ affiliate.title }} ' } %} {{ craft.googleMaps.marker('map', marker) }} {% endfor %}

Here is what I see in the inspector: http://d.pr/i/Nesg


I was able to get mine working using the formatting in this Stack Exchange comment:
http://craftcms.stackexchange.com/a/9664/4911

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants