You probably have a javascript error somewhere in your template.
Thanks for your reply. I checked the template for javascript exception, but there are none.
This is the code section I am using in my chunk for displaying the google map
[!GoogleMap? &key=`ABQI...` &maps=`mapid : map | address1 : Unit 3 Cygnet Park | address2 : Phorpress Way | city : Peterborough | state : Cambs | zip : PE7 8FQ | title : Tile Library | width : 400 | height : 400 | zoom : 9 | type : hybrid `!]
->I have removed the key for security reasons
Do you see other possible areas that might be a problem ?
Another problem that I have is the address parameters are fetched from the another page through POST parameters. Hence the googlemap snippet cannot be called from the chunk, but from another snippet. I’d appreciate it if you can let me know how to do this too.
Thank in advance
Vinzy
Vinzy
Hi,
I went through this forum and found that by remove functions from the onload function in body the google maps is getting displayed.
But i still need to know how to call the googlemaps snippet from another snippet. Your help will be really appreciated.
This is the section of snippet that I am using
$street = $_POST["street"];
$city = $_POST["city"];
$zip = $_POST["zip"];
$key = "`ABQIAAAA..bQ`";
$concatenated = "`mapid : map1 | address1 : ". $street ." | city : ". $city. " | zip : ".$zip." | width : 400 | height : 400 | zoom : 9 | type : hybrid`";
$param = array (
"key" => $key,
"maps" => $concatenated
);
$modx->runSnippet("GoogleMap",$param);
When I run this code, it tells me that google rejected the key and does not display the map. Let me know how to proceed.
Thanks
Vinzy
Vinzy
I tried removing the backticks; the key was not rejected. But the map does not show up...ny bright ideas??
Vinzy
Hi,
I tried including the return statement, but still I dont get the google map to display. I am open to other suggestions on how you would get the address information from POST parameters and then use them to display the map.
Vinzy
Vinzy
Hi,
I have solved the issue. I removed the sidekicks from the parameters also and then used the return statement and all the onload functions in the body that prefetched images and it now works perfectly fine. Thanks everybody for your help.
Cheers,
Vinzy
Vinzy