I’ve been using this Plugin for quite some time but have run into a problem using it in a different way, specifically with Ditto.
I use template variables for each field so that the client can enter their details and the maps show up accordingly (site is still in development so excuse things that aren’t working:
Roncesvalles Location
http://dev.turnerporter.net/index.php?id=11
Yorke Location
http://dev.turnerporter.net/index.php?id=12
So that’s fine. But if you visit the locations page, it is an index of each location (the reason they can click through to an individual location is to view a future gallery which isn’t there yet):
http://dev.turnerporter.net/index.php?id=10
Each map does have a distinct id (I can see it in the code and in the div id= for the Google Map portion but still the moment I unpublish Yorke, the Roncesvalles location shows up but the moment there is more than one location it only renders the last one.
Here is the Ditto call:
[!Ditto?&parents=`10`&summarize=`10`&total=`all`&depth=`0`&tpl=`locations-tpl`&paginate=`0`&hideFolders=`1`&hiddenFields=`gmid,gmaddress1,gmcity,gmprov,gmcountry,gmpc,gmtitle,gmwidth,gmheight,gmzoom,gmcontrol,gmtypecontrol,gmtype,gmshowbubble,googlebubble,content,phone,fax,locationemail`&orderBy=`longtitle ASC`!]
And the template (locations-tpl):
<div class="two-cols clearfix">
<div class="tc-left">
<h2 class="ahead">[+title+]</h2>
<p>[+content+]</p>
<p>[+gmaddress1+]<br />
[+gmcity+], [+gmprov+] [+gmpc+]<br />
Telephone [+phone+]<br />
Fax [+fax+]<br />
[+locationemail+]</p>
<p><a href="[~[+id+]~]">view gallery</a></p>
</div>
<div class="tc-right">
[[GoogleMap? &key=`[+gmkey+]` &maps=`mapid : [+gmid+] | address1 : [+gmaddress1+] | city : [+gmcity+] | state : [+gmprov+], [+gmcountry+] | zip : [+gmpc+] | title : [+gmtitle+] | width : [+gmwidth+] | height : [+gmheight+] | zoom : [+gmzoom+] | control : [+gmcontrol+] | typecontrol : [+gmtypecontrol+] | type : [+gmtype+] | showbubble: [+gmshowbubble+] | bubbletpl: googlebubble`]]
<p align="right"><a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=[+gmaddress1+], [+gmcity+], [+gmprov+], [+gmpc+], [+gmcountry+]">[map]</a> <a href="http://maps.google.com/maps?daddr=[+gmaddress1+], [+gmcity+], [+gmprov+], [+gmpc+], [+gmcountry+]">[directions]</a></p>
</div>
</div>
Now you’ll note that the gmkey is missing from the list of hidden fields in the Ditto call. This is because when I had it in there I got thrown the "you’ll need a key" error so I just assigned the locations index page the key itself.
Any ideas as to why I can only see one map?