|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mcalsada Smarty n00b
Joined: 17 Oct 2009 Posts: 1
|
Posted: Sat Oct 17, 2009 7:59 pm Post subject: [GoogleMapAPI] Multiple Maps |
|
|
The docs say you can define multiple map instances. How do you get them to work?
If you use the following for each map object that is created, the JS is just duplicated and creates multiple copies of the onLoad event.
$map = new GoogleMapAPI('map_0','');
$map->setAPIKey(GMAP_KEY);
/* Set Markers, polylines, other options */
$map->printMapJS();
$map->printOnLoad();
$map2 = new GoogleMapAPI('map_1','');
$map2->setAPIKey(GMAP_KEY);
/* Set Markers, polylines, other options */
$map2->printMapJS();
$map2->printOnLoad(); |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|