Query
Query allows simple, intuitive spatial searching on one or more overlays. A query can look for all features in an overlay that is within a search radius or falls within a user-drawn feature.
Query then creates a table of these search results and also a temporary layer in the MyData menu that contains the map objects.
For example, use Query to search for all Fire Incidents inside a ward. Simply select the incident data layer, 'Select Feature' and click on a Ward (or draw a shape around the ward).
TIP: See this in action on WebMap User Help
Begin by enabling the Query option for your users. On your map click Settings > Map Extensions > Query.
An overlay must first be queryable to use this option. To do this:
- Use CadcorpSIS Desktop to open the SWD containing your WebMap data.
- Select the layer to be used for Query, right click and select Properties and Properties again.
- Click Add to add a new attribute for Search by Area.
Enabling a layer to be used in Query
WML::QueryEnabled@ (Boolean) – set to True - add this attribute to allow the layer to be queried and appear in the dropdown for Query.
Enabling a layer to be downloaded to a CSV file
WML::QueryAllowVectorExport@ (Boolean) – set to True will allow the results to be exported as CSV from the Query Results window.
Once the appropriate properties have been added to your SWD layers, add it as a GeognoSIS SWD.
Allow invisible layers to be included in Query
An overlay property can be added to allow invisible layers to be included in a query search: WML::VisibleDuringSearchOnly&.
Note: WML::Ignore& property must also be set on the overlay.
The overlay is turned off when the search dialog is closed or the search results are deleted by closing the result set (blue box) at the bottom of the Map Window.
Display results in the table view
Allow query results table to be displayed as a handy table and optionally downloaded to a csv file.
WML::AllowTableExport&
0 = Table view disallowed
1 = Table view allowed (1 is the most restrictive and only allows viewing the results in the table).
2 = Table view, Capture and Export to csv allowed.
Changing the colour of the Search Area
You have options to change the styling for map FEATURES or BUFFER surrounding each feature.
- Select Configuration on the map.
- Click Query.
- Enter a Point Zoom Resolution if needed. A Point Zoom Resolution is the resolution the map will change to when a point item is viewed from the query results.
- Toggle between Features and Buffer and use the colour palette and other options to customise the look of query results.