The ArcGIS Online Web Map Query Functionality
We recently extended map.apps query functionalities with the ability to find web maps in ArcGIS Online and dynamically load them in a map.apps app. The query functionality is accessible in two ways:
- through the existing omni-search widget normally used for location queries; this is a simple query that works with simple search terms
- through a new, dedicated ArcGIS Online Web Map Query Widget; this allows to query for additional parameters, like title, owner, tag, etc
Both widgets will display results, if there are any, as list entry with thumbnail. A click on a result will load the web map into the app. That way, the content of an app can change based on user interactions. It is also be possible to add additional content to an app this way.
DataStores - Base Concept for Querying External Services
The new functionality uses the map.apps built-in concept for datastores. This concepts defines a uniform (and in map.apps standardized) interface for query and transaction operations as well as the JSON encoding for the corresponding input and output parameters. This interface is called a “datastore”. Each and every search/query/selection request for features is handled through a specific implementation of a datastore. This allows us to handle completely different types of data sources, and encodings to be integrated, in a common way.
The core tasks of a datastore are:
- Transform the query/transaction requests from within map.apps to the REST dialect of the service that should be queried
- Transform the JSON dialect of the original response from the foreign service back to JSON map.apps features
For sure, custom implementations can do more, like, for example, data model mapping, attribute aliasing, and so forth. Existing query functionalities for geographic names, for example, is in fact using a “geonames datastore”. Also selections, identify tools etc. work with datastores. Instead of handing the datastore as a query term, the selection/identify tools hands the datastore a geometry. The tasks of the datastore to translate to and from the external service stays the same.
And Next?
In the same way that the datastore concept defines a uniform interface for query and transaction operations against spatial services and datasets, map.apps now offers a datastore for interacting with ArcGIS Online. This allows for many exciting opportunities to extend query capabilities for the good of the user. For example, allowing users to select web maps based on their spatial coverage, or to see a dynamic gallery that can be preconfigured to automatically query for web maps that apply to a certain query and that are within the extent of the current map. Such a live web map-ticker-gallery is currently in development, and it will enable real-time galleries in, for example, emergency apps that always show the latest 10 web maps of an organization that deal with “oil spill” in a defined area. Things like that make apps much more interactive, dynamic and intelligent. Exciting times!
Run Live App