Page 1 of 2
Smarty error with CGGoogleMaps
Posted: Tue Feb 15, 2011 3:46 pm
by lucia22
Having trouble with the CG GoogleMaps module.
I am running 1.9.3 and the latest version of CG Googlemaps.
At first I added a map with no markers and it displayed ok. Then added a marker and the map did not display just white space with the marker details showing. I tried all sorts of combinations eventually turning off the streetmap option tool on the map made the map display with the marker on however now I have the following smarty error:
string(154) "Smarty error: [in module_db_tpl:CGGoogleMaps;mapjs_1 line 322]: syntax error: unrecognized tag: $map->sv_radius:1000 (Smarty_Compiler.class.php, line 446)" string(135) "Smarty error: [in module_db_tpl:CGGoogleMaps;mapjs_1 line 322]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Also I wanted the list of markers to appear underneath the map but just as a link to click to display the details as an overlay on the map, I had a picture of the venue included within it, however at the moment they display on the left but instead of it being just a list of links there is a link then underneath is shows the pictures? I am guessing if I play around with the template I can get it to display the list underneath but how do I stop it showing the full details in the list?
Any help you can give would very gratefully be received!
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 1:35 pm
by lucia22
Anyone have any ideas what the smarty error is about? Help!!
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 4:40 pm
by blackhawk
It's a syntax error. maybe you are missing quotes? or an open/closed tag? check the documentation to see if you are using the correct format. If so, and you still can't figure it out, then just install google maps directly from google instead of using this module.
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 5:02 pm
by lucia22
Not sure where you mean. I have the standard templates used that comes with CGGooglemaps. I have added my venue map and markers then in my page I have {CGGoogleMaps map="venues"}
Where would the syntax be wrong? In the actual code for the module? In which case I wouldn't know where to start looking. I haven't changed anything so surely others would have come across the same problem.
The strange thing is I can refresh the page a couple of time and the smarty error goes....is this just the nature of the smarty error codes though?
I am not sure what you meant by installing direct from googlemaps?? I want to use the CGGoogleMaps module as it has the wysiwyg editor for the markers
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 5:09 pm
by Jos
Maybe you incidentaly removed a {literal} tag somewhere?
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 5:18 pm
by lucia22
I didn't think I had changed anything in the templates, however I have gone through and reset them all to factory defaults, refreshed my page several times and so far no error so hoping thats fixed it! fingers crossed, thanks!
Re: Smarty error with CGGoogleMaps
Posted: Mon Feb 21, 2011 5:20 pm
by lucia22
Aaaaah spoke to soon, its back!
Don't know what else to do as I have reset all the templates to defaults etc
Re: Smarty error with CGGoogleMaps
Posted: Tue Feb 22, 2011 1:30 pm
by antiheld2000
I have the same problem and no solution. Anyone something new about this?
Re: Smarty error with CGGoogleMaps
Posted: Wed Feb 23, 2011 5:49 pm
by blast2007
Same here, but problem is shown randomly. Not at every page loading but only sometimes.
regards
blast
Re: Smarty error with CGGoogleMaps
Posted: Wed Feb 23, 2011 6:22 pm
by lucia22
Yes its very frustrating, its random for me, so I try tweaking the settings, think I have fixed it then it returns !!!
Please does any no of a fix? For the moment I have had to go back to the GoogleMaps version which it states is marked as stale and this version doesn't have as good functionality as the CG one which is a shame.
Re: Smarty error with CGGoogleMaps
Posted: Mon Jun 06, 2011 8:05 pm
by musicscore
Same problem here.
I upgrade googlemaps to the latest version, did reset al the templates. Please, please, please ...... does anyone has a solution.
Musicscore
Re: Smarty error with CGGoogleMaps
Posted: Tue Jun 07, 2011 6:20 am
by myshko
Hi,
Seems like a JS / Jquery issue. Are there any errors or warnings in firebug / browser error console?
In your 'Javascript Template', do you have the {jsmin} tag at the top?
Are you calling any other unusual scripts / js libraries?
If yes, try taking them all out, adding them back one at a time and changing the order.
Sometimes multiple jquery calls clash.
Hope that helps.
/m
Re: Smarty error with CGGoogleMaps
Posted: Tue Jun 07, 2011 9:16 am
by musicscore
myshko
Thanks for your quit reply.
I have {jsmin} in my template :
Code: Select all
{* javascript template *}
{jsmin}
<__script__ type="text/javascript" charset="utf-8" {$map_defertxt}>{literal}
//<![CDATA[
if( typeof(jQuery) == 'undefined' ){
alert('JQuery is required for this map to function');
}
jQuery(document).ready(function(){
Googlemaps is the only js I have on that site.
Some advise ??
Musicscore
Re: Smarty error with CGGoogleMaps
Posted: Tue Jun 07, 2011 9:32 am
by myshko
This might work,
In your 'Javascript Template', right down at the bottom, look for this if statement:
Code: Select all
{if $map->sv_controls}
var tmp =mapObj.getStreetView();
var client = new google.maps.StreetViewService();
client.getPanoramaByLocation(marker.getPosition(), {$map->sv_radius|default:1000}, function(result, status) {ldelim}
if (status == google.maps.StreetViewStatus.OK) {ldelim}
document.getElementById('cggm_sv_display_'+mapID).style.display='block';
tmp.setPosition(result.location.latLng);
{rdelim}
{rdelim});
{/if}
And delete it all. See if it helps. It will mean street view won't work however.
I can't recreate the scenario without specific settings, so it's hard to give more specific suggestions.
/m
Re: Smarty error with CGGoogleMaps
Posted: Tue Jun 07, 2011 4:37 pm
by musicscore
Thank you, myshko,
That worked. So it's the streetview function that created the problem. I think you are an expert.
Thanx again.
Musicscore