You are here: Using ArcWeb Explorer JavaScript > Parameter descriptions > AWX JavaScript QueryGroupLayer

ArcWeb Explorer JavaScript queryGroupLayer

The queryGroupLayer in AWX JavaScript API allows users to create maps with custom data or ESRI-provided data. In a traditional mashup, application developers need a database that stores their data and they must write the logic for intelligently retrieving relevant points from the database depending upon the extent and scale.  For example, consider a custom data set that describes a retailer’s store locations in the United States. In a traditional mashup, the application developer needs a database to store all this information and must implement logic to extract points according to map interaction. For instance, if the end user has zoomed into New York City then the logic must retrieve only store locations in New York City.

The queryGroupLayer consumes only point-based SpatialQuery data sources (not lines or polygons). To create your own SpatialQuery data source, see Building spatial query services. The AWX JavaScript API uses a spatially aware mechanism to return only the results that are relevant to the area the user is currently viewing. The fact that no database is needed and no retrieval logic is required to be coded significantly reduces the effort it takes to build your mashup with AWX JavaScript API. Parameter descriptions for the queryGroupLayer are documented in Group Layers.

The queryGroupLayer supports the use of a WHERE clause to filter data and only retrieve and display features that satisfy certain criteria. By default, the 10 points closest to the map center display. You can change the number of points using the “count” option. A live sample of this functionality is provided in the Query Group Layer sample. This query can be changed dynamically depending upon the current extent and scale of the map. The getLatLonExtent() and getScaleForLatLonExtent() methods of AWMap can be used to get the current state of the map.

In addition to custom databases, the queryGroupLayer can be used with the following data sets provided by ESRI. The field names to use in the WHERE clause can be obtained by viewing data source details in the Content Library at http://www.arcwebservices.com. See Spatial Query codes for a list of codes for these data sources. Parameter descriptions for the queryGroupLayer are documented in Group Layers:

ArcWeb:CW.CurrentWeather.World
ArcWeb:CW.HistoricalClimate.World

ArcWeb:ESRI.Airports.World

ArcWeb:ESRI.Cities.US

ArcWeb:ESRI.Cities.World

ArcWeb:INFOUSA.BusinessListings.US

ArcWeb:INFOUSA.BusinessListingsDetails.US

ArcWeb:MX.CurrentWeather.NA

ArcWeb:MX.ForecastWeather.NA

ArcWeb:NT.POI.NA

ArcWeb:TA.POI.CA

ArcWeb:TA.POI.EU

ArcWeb:TA.POI.US

ArcWeb:TA.TelcomSwitches.US

ArcWeb:TC.Traffic.US

ArcWeb:USGS.Earthquakes.World


Visit the Feedback page to give comments or suggestions about the ArcWeb Developer's Guide.

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI