Select to view content in your preferred language

open popuptemplate when map load like the "who is gis app"

789
3
Jump to solution
08-15-2013 07:04 AM
joelde_freitas
Deactivated User
hi, i am using the cluster sample to make a webapplication  like "who is GIS" app. i want to open the popuptemplate when the map is loaded.

How can i do this on the cluster sample. i cannot figure out.

thanks guys
0 Kudos
1 Solution

Accepted Solutions
joelde_freitas
Deactivated User
hi. i solved the popup-template to open onload. and open the the popup windows randomly automatically.

i have copy the function onclick and create a loop that iterate through the clusterdata in the new function i created.
in the index page, i call that new function  in the addClusters(). when the index page open, the map.on("load",function()) call the addClusters().

thanks

View solution in original post

0 Kudos
3 Replies
JasonZou
Frequent Contributor
Do you want to popup the infoWindow for one feature when the map is loaded?
If so, as to the cluster sample, you can invoke a function, like queryMyFeature, near the end of function addClusters. queryMyFeature will query a feature or features that you like to display the infoWindow. Then inside the callback function of the query, you can use

var popLocation = response.features[0].geometry;
map.infoWindow.setFeatures(response.features);
map.infoWindow.show(popLocation);
0 Kudos
joelde_freitas
Deactivated User
i will try.
0 Kudos
joelde_freitas
Deactivated User
hi. i solved the popup-template to open onload. and open the the popup windows randomly automatically.

i have copy the function onclick and create a loop that iterate through the clusterdata in the new function i created.
in the index page, i call that new function  in the addClusters(). when the index page open, the map.on("load",function()) call the addClusters().

thanks
0 Kudos