Page 1 of 1
[Solved] Company Directory and CGGooglemaps2
Posted: Wed Oct 02, 2013 8:03 pm
by Torpedine
I have a list of companies in Company Directory.
I would like to show a map, on the detail view, showing the location of the single company, but I don't know hot to use the
cggm2_add_dynpoint plugin:
{cggm2_add_dynpoint map=1 name={$entry->company_name} address={$entry->address}}
does not show anything.
How can I use it? and where?
Thanks in advance.
Re: Company Directory and CGGooglemaps2
Posted: Thu Oct 03, 2013 7:45 am
by Rolf
I think the correct Smarty3 syntax is:
Code: Select all
{cggm2_add_dynpoint map=1 name='{$entry->company_name}' address='{$entry->address}'}
Or:
Code: Select all
{cggm2_add_dynpoint map=1 name=$entry->company_name address=$entry->address}
Hope it helps.
Rolf
Re: Company Directory and CGGooglemaps2
Posted: Thu Oct 03, 2013 8:05 am
by Torpedine
Thanks, but, I do I use it? in the Company Directort detail template? together with the {CGGoogleMaps2} tag?
or in the map template of CGGM2?
Re: Company Directory and CGGooglemaps2
Posted: Thu Oct 03, 2013 8:26 am
by Rolf
At
http://buispost.eu/remaining-informatio ... rocom-gmbh I have in CD detailtemplate:
Code: Select all
{cggm_add_dynpoint map='1' name=$entry->company_name address=$entry->address}
{CGGoogleMaps map='1'}
Re: Company Directory and CGGooglemaps2
Posted: Fri Oct 04, 2013 3:08 am
by pwg
Hi Torpedine, I know this is a really big ask, but once you have Company Directory and CGGooglemaps2 working together, would you mind posting a brief how you did it here.
I get very lost, very quickly, but would definitely really like the functionality.
I'm adding all the maps manually in the detail view of CD, it just doesn't seem the best way to do it.
Cheers,
Paul
Re: Company Directory and CGGooglemaps2
Posted: Fri Oct 04, 2013 3:45 am
by calguy1000
In your detail template:
Code: Select all
{cggm_add_dynpoint map='1' name=$entry->company_name address=$entry->address}
{CGGoogleMaps map='1'}
In your summary template
Code: Select all
{foreach $items as $entry}
...
{cggm_add_dynpoint map='1' name=$entry->company_name address=$entry->address}
{/foreach}
{CGGoogleMaps map='1'}
Re: Company Directory and CGGooglemaps2
Posted: Fri Oct 04, 2013 5:57 am
by Torpedine
It gives me back this two errors, showing the map but not the marker:
Code: Select all
Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/mhd-01/www.bimbodove.it/htdocs/modules/CGExtensions/lib/class.cge_http.php on line 87
Warning: file_get_contents(http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Lungarno+Mediceo+9++-+PISA) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/mhd-01/www.bimbodove.it/htdocs/modules/CGExtensions/lib/class.cge_http.php on line 87
Geolocation (address to lat/long) failed.. marker "Libroteca C'era una volta" skipped
Re: Company Directory and CGGooglemaps2
Posted: Fri Oct 04, 2013 6:15 am
by Torpedine
I checked, fopen is disabled on my hosting, I'll see if it's possible to enable it, or I'll change server...
Anyway, thanks in advance!
EDIT: SOLVED!