Page 1 of 1

CGGoogleMap and integration with other modules (CompanyDirectory)

Posted: Sun Nov 30, 2008 8:18 pm
by Foden
Trying the excelent CGGoogleMap out (Thanks a lot CalGuy :) you are a champ! :))

Just got one question, if someone please could give me an example as to how I could use the tag {cggm_add_dynpoint} in f.ex. CompanyDirectory?

Regards
Thomas

Re: CGGoogleMap and integration with other modules (CompanyDirectory)

Posted: Fri Dec 05, 2008 12:53 am
by olavt
I was going to aske the same question.  I have been using a previous version of CGGoogleMap for a while. But I cannot get this new function to work. Could we have some examples on how a string should be?

Re: CGGoogleMap and integration with other modules (CompanyDirectory)

Posted: Tue May 05, 2009 11:21 am
by Roobarb
I came across this thread while looking for information about the CGGoogleMaps module. Here's an example of how I got the dynamic markers working:

1. Create a map using the CGGoogleMaps module (in this example, the map id is 1)
2. In the page where you want to include your map, add the following Smarty code:

Code: Select all

{cggm_add_dynpoint map='1' name='pm_home' address='10 Downing Street, London, UK' description='The Prime Minister\'s residence'}

{CGGoogleMaps map='1'}
You can add more markers if necessary - just put them above the {CGGoogleMaps} tag. If you have the latitude & longitude of the marker, you can omit the address attribute in the {cggm_add_dynpoint} tag and use the lat and long attributes instead.

Re: CGGoogleMap and integration with other modules (CompanyD

Posted: Mon Jan 31, 2011 8:23 pm
by musicscore
I also wanna combine CGGooglemap with an other Module (a module created with CTLModule Maker).
In the template of the module I added

Code: Select all

{cggm_add_dynpoint map="2" name="Hier" address=$item->adres + $item->plaatsnaam} 
{CGGoogleMaps}
This created an error.

The temple code below is working perfect but I need dynamice output.

Code: Select all

{cggm_add_dynpoint map="2" name="Hier" address="Streetname, City"} 
{CGGoogleMaps}
How can I put the streetname {$item->adres} and the Cityname {$item-plaatsnaam} in the {cggm_add_dynpoint} tag as an address.

Please help ??

Musicscore

Re: CGGoogleMap and integration with other modules (CompanyD

Posted: Tue Jul 26, 2011 5:51 pm
by dmgd
I search for half a day for an answer to this question. I thought I would post it. Smarty does not make it very easy.

Code: Select all

  {foreach from=$items item=entry}
  {if $entry->latitude != "0"}
	{assign var=des value=""}
	{assign var=des value=$entry->company_name|cat:"<br />"}
	{assign var=des value=$des|cat:$entry->address}
	{assign var=des value=$des|cat:"<br />"}
{* And so on *}
	{cggm_add_dynpoint map=1 name=$entry->company_name lat=$entry->latitude long=$entry->longitude icon=hotel description=$des}
   {/if}
{/foreach}
And produced this. BTW my address field has a <br /> before city.

Code: Select all

SpringHill Suites Houston
2120 Nasa Rd 1
Seabrook, Texas 77586

Re: CGGoogleMap and integration with other modules (CompanyD

Posted: Tue Jul 26, 2011 6:01 pm
by calguy1000
you can do it this way, but I just use {capture assign='marker_description'}... a whole bunch of stuff {/capture}
{cggm_add_dynpoint description=$marker_description ...}

Re: CGGoogleMap and integration with other modules (CompanyD

Posted: Tue Jul 26, 2011 7:29 pm
by dmgd
Thanks that works much better.