...
Name | Type | Cardinality | Default | Description | |
---|---|---|---|---|---|
label | String | 0..1 |
| Label to display in button, default 'Spatial Identify' | |
defaultEntity | String | 0..1 | The id of the entity to select by defaultbe displayed the first time the tool is used. This is more of a suggestion, if there are no entities of that type where the user clicks then a different entity will be the one displayed on first use. | ||
entity | entity | 0..n | Optional list of entities to refine/sort the entity list | ||
useVisibleEntities | Boolean | 0..1 | false | As of 2.5.22 rather than specify the entities that are to be used, the tool can look up the visible entities configured in the toc. You must add the entity attribute to each layer in the toc for this function to work. | |
windowTitle | String | 0..1 | "Spatial Identify" | The title of the popup window | |
windowWidth | Integer | 0..1 | 800 | The width of the popup window | |
windowHeight | Integer | 0..1 | 500 | The height of the popup window | |
highlight | highlight | 0..1 | Styling to apply to the highlighted entity | ||
entityListWidth | Integer | 0..1 | 220 | the initial width of the entity list | |
entityListWidthMin | Integer | 0..1 | 175 | the minimum width of the entity list | |
entityListWidthMax | Integer | 0..1 | 400 | the maximum width of the entity list | |
timeout | integer | 0..1 | 30000 | number of milliseconds to timeout the request | |
crs | CRS | 0..1 | client map crs | Which coordinate reference system to use to perform the calculations |
Entity
Name | Type | Required | Description |
---|---|---|---|
id | string | yes | The unique entity id for this entity |
minScale | number | no | Min zoom scale for this entity to be reported for |
maxScale | number | no | Max zoom scale for this entity to be reported for |
isDefault | boolean | no | Set this entity as the default |
...
Note |
---|
See Client Views Data for other i18n options and Common grid panel configuration options for other grid related options |
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<item action="com.cohga.html.client.map.spatialIdentify"> <label>Identify</label> </item> |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<item action="com.cohga.html.client.map.spatialIdentify"> <entity id="property" maxScale="12000"/> <entity id="road" isDefault="true"/> <entity id="suburb" minScale="25000"/> </item> |
Note that prior to Weave 2.5.18 there is a bug that stopped the following example from working, and from 2.5.18 on-ward the highlight
section can be added to the map view anyway which allows it to be set once and applied to all the tools that highlight an entity so it doesn't need to be set for each tool individually.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.html.client.map.spatialIdentify">
<highlight>
<marker>
<icon>resources/images/markers/w-marker-red.png</icon>
<width>24</width>
<height>30</height>
<offsetx>-8</offsetx>
<offsety>-28</offsety>
</marker>
<vector>
<strokeWidth>3</strokeWidth>
<strokeColor xsd:type="xsd:string">#d27316</strokeColor>
<strokeOpacity>0.75</strokeOpacity>
<fillColor>red</fillColor>
<fillOpacity>0.25</fillOpacity>
</vector>
</highlight>
</item> |
You can also change the tool which is used when identifying features on the map. By default the tool used is a circle. Valid options are
- DragCircle (default)
DragRectangle
Polyline
Polygon
Point
e.g. to change the tool to a DragRectangle
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.html.client.map.spatialIdentify">
<mapAction>DragRectangle</mapAction>
</item> |
As of 2.5.22 you can let the toc drive the layers that will be interrogated when using the spatial identify tool.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.html.client.map.spatialIdentify">
<useVisibleEntities>true</useVisibleEntities>
</item> |