Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[GoogleMapAPI] Multiple Maps

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
mcalsada
Smarty n00b


Joined: 17 Oct 2009
Posts: 1

PostPosted: Sat Oct 17, 2009 7:59 pm    Post subject: [GoogleMapAPI] Multiple Maps Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP