CGGoogleMap and integration with other modules (CompanyDirectory)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Foden

CGGoogleMap and integration with other modules (CompanyDirectory)

Post 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
olavt

Re: CGGoogleMap and integration with other modules (CompanyDirectory)

Post 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?
Roobarb
New Member
New Member
Posts: 3
Joined: Wed Apr 29, 2009 8:03 am

Re: CGGoogleMap and integration with other modules (CompanyDirectory)

Post 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.
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

Re: CGGoogleMap and integration with other modules (CompanyD

Post 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
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm
Location: TX

Re: CGGoogleMap and integration with other modules (CompanyD

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGGoogleMap and integration with other modules (CompanyD

Post 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 ...}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm
Location: TX

Re: CGGoogleMap and integration with other modules (CompanyD

Post by dmgd »

Thanks that works much better.
Locked

Return to “Modules/Add-Ons”