mobile popups & geolocation

760
3
08-09-2011 12:20 PM
ThomasEbert
Occasional Contributor
Hi all!

Currently, it is necessary to click/touch/dip onto the map for displaying popups.

I would like to open popups automatically (eg. on mobile devices) at the current geolocation of a web map from ArcGIS.com. Therefore no extra click/touch onto the map is required for information. Does anyone have ideas for me to do this with the mobile popups of Vers. 2.4 (esri.dijit.PopupMobile)

ColT
0 Kudos
3 Replies
KellyHutchins
Esri Frequent Contributor
You can display the popup without user interaction using map.infoWindow.show. Here's a short snippet that displays address information in a popup.

  
        geom = candidate.location;
        map.infoWindow.setTitle("Location");
        map.infoWindow.setContent(candidate.address);
        map.infoWindow.show(geom);.


0 Kudos
ThomasEbert
Occasional Contributor
Thank you Kelly. This works for me.

In my next step I would like to show query results of several feature layers in my popup window (without a dip/touch) at my current geolocation.

Thank you for ideas to do this.
ColT
0 Kudos
KellyHutchins
Esri Frequent Contributor
The following sample shows how to populate a popup window with the results of an identify. You could modify this code to display the results of a query task instead.
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_popup.html

If you want to display the results of multiple query task take a look at this forum discussion regarding using dojo Deferred and DeferredLists.

http://forums.arcgis.com/threads/32931-How-to-use-dojo.Deferred-dojo.DeferredList-and-.then?highligh...
0 Kudos