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

GoogleMaps_MapDataModel could not be converted to string #13

Closed
rdhrkns opened this issue Oct 10, 2014 · 1 comment
Closed

GoogleMaps_MapDataModel could not be converted to string #13

rdhrkns opened this issue Oct 10, 2014 · 1 comment

Comments

@rdhrkns
Copy link

rdhrkns commented Oct 10, 2014

Hello Justin,

Let me describe my setup as requested in our previous email conversation. I have a setup where the GoogleMaps field is called in the Section entry using the code below:

    {% for entry in craft.entries.section('SectionName').find() %}
    {{entry.title}}
    {{entry.body}}
    {{entry.googlemap}}
    {% endfor %}

It provides me however with the following error:

Interne Serverfout
Object of class Craft\GoogleMaps_MapDataModel could not be converted to string

-Ruud

@objectivehtml
Copy link
Owner

The problem is exactly as I described in the email. {{entry.googlemap}} returns an object, not a string. So this is expected behavior. My assumption is that you just want to plot all the data from that field on a map you have defined, correct?

You should follow this example:
https://github.com/objectivehtml/Google-Maps-for-Craft/wiki/Using-the-Field-Type

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

2 participants