1

I am trying to get one map to be shown that is actually a channel field, using Google Maps For ExpressionEngine.

What i have done: 1- created a channel called "retkeilykohteet" 2- set own statusgroup and assigned to it. 3- set own channel fieldgroup with only one field in it, called "retkeilykartta" (it is a Google Maps For ExpressionEngine-field).

Then i created new entry, and i actually need only one entry for this channel, as per i just edit the entry when i want to add more markers into the map. So in my entry, i created 4 markers to map, set zoom etc, and it looked ok because of the live-preview that renders the map while making the entry.

Then i put this code into my template:

{exp:gmap:init id="map" scrollwheel="false" class="gmap" language="fi" style="100%;height:300px" map_type="google.maps.MapTypeId.TERRAIN"}

{exp:channel:entries channel="retkeilykohteet" limit="1" disable="member_data|pagination|categories|category_fields"}

    {exp:gmap:marker id="map" latitude="{retkeilykartta_latitude}" longitude="{retkeilykartta_longitude}" geocode="false" clustering="true"}

        {title}

    {/exp:gmap:marker}

{/exp:channel:entries}

I get only blue map canvas. Any help what is missing from my code so that i get the field "retkeilykartta" shown as it is, a map?

thanks. Using EE2.5.5

1
  • Ok, i got awesome support from Justin and got all working. I just tried to use in this set of map, the wrong way to pull out the map. So i started to use Fieldtype-settings instead of trying to pull markers from actual channel entry: objectivehtml.com/google-maps/fieldtype
    – Finpete
    Commented May 6, 2013 at 18:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.