...
Note |
---|
The following properties This bundle version also added support for the above properties in all of the data grid views, but unless they need to be customised per-window it's recommended that the global resource values be used instead since they change all the views at once. |
Positioning Highlight Markers
When you click on a row in the data grid the map will highlight the geometry related to the selected row on the map, normally the highlighting geometry is determined by the geometry associated with the entity that the row corresponds to, but it's also possible to include a coordinate within the data definition that the data grid is displaying and instead have a marker places at that coordinate.
For example a land parcel entity would generally be represented as using a polygon boundary, but if you have water meter records associated with a parcel you could include a coordinate in the water meter data definition so that when a user clicks on a row in the data grid a marker is placed at the location of the water meter on the property rather than having the property boundary highlighted.
To replace the default highlight with a marker in this way you should include a numeric x
and y
(lower case) parameters in your data definition, which contains the coordinate for the point, you can also include a crs
parameter that provides the EPSG code for the projection that the coordinate is stored in, the coordinates will be assumed to be in the same coordinate system as the underlying map if this is not included. Note that you can also use latitude
and longitude
or lat
and lon
as the field names, and if the crs
parameter isn't included it's be assumed to be WGS84
in this case. It's suggested that a crs
parameter always be included to explicitly provide the CRS allowing the same data definition to be used regardless of what CRS is used in the underlying map.
Code Block | ||||
---|---|---|---|---|
| ||||
<data:datadefinition id="water_meter">
<datasourcedataconnection datasource="db1" table="WATER_METER" key="COMPKEY">
<parameter column="COMPKEY" />
<parameter column="CATEGORY" />
<parameter column="TYPE" />
<parameter column="OTHER" />
<parameter name="x" label="X" column="LOCATION_X" type="float" />
<parameter name="y" label="Y" column="LOCATION_Y" type="float" />
<parameter name="crs" label="CRS" column="'EPSG:28355'" />
</datasourcedataconnection>
</data:datadefinition>
<data:data id="water_meter" datadefinition="water_meter" entity="water_meter" label="Water Meter"/> |
On a final note, it's possible to hide the additional parameters by setting hidden
to true
when formatting the columns, as described in the examples below.
Warning |
---|
There was a bug, fixed in 2.5.22.1, that caused the marker not to be displayed if the |
Examples
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<view id='com.cohga.html.client.main.gridView'> <label>Identify</label> <location>south</location> </view> |
...