Version 30 (modified by 14 years ago) ( diff ) | ,
---|
Feature Layers
- A 'Feature' is a Resource Record which has a Lat/Lon available.
Features can be Points, Lines or PolygonsFeatures can be exported in KML/GPX/etc- Need to update S3XRC for GPS symbol detection when FeatureClass allocation changes
- Need to update gis.get_marker() when FeatureClass allocation changes
- Features can be added to the Map
- A Feature Layer is a query of Features
- Resource
- Filtered
- Resource.Category (Report/Incident table, Missing Persons, L0->L3 in gis_location table)
- Collection of Resources <- is this required?
- New gis_landmark table can have Transport category for Port/Airport/Railway sub_categories
- A Feature Layer is a query of Features
- Features can be removed from the map or moved on the map interactively.
- To do this via a single set of Controls means having a single Vector Layer (or having to manually select the active layer!).
- Build up this Vector Layer from multiple Feature Layers
- In order to be able to dynamically enable/disable individual Feature Groups whilst viewing the map, we need to write a custom layer switcher which refreshes the whole Features Layer client-side upon changes.
- To do this via a single set of Controls means having a single Vector Layer (or having to manually select the active layer!).
User can define which layers should be selectable/enabled-by-default in the Situation Mapping layer switcher.- This list is personalisable.
- move from layer definitions to gis_config
- Have 1->M for Feature_Layers for available.
- Attribute of visible stored in a separate multiple field.
- Combine with special widget?
- move from layer definitions to gis_config
- This list is personalisable.
Markers
The Marker used for the Features will be:
- Cluster marker if multiple markers close together (styled in size & # for >2)
- prevents performance issues as well as making things clearer
- The Feature marker (if defined) <- is this required? (Will speed things up if removed)
- Q: Should we provide an option to allow the FeatureClass icon to over-ride individual Feature Icons?
The FeatureClass marker (if defined)- Styling based on values of an attribute of the resource
- add new gis.thematic_map table
- fields
- values
- marker_id
- fields
- add field, thematic_map_id (multiple=True) to the gis.feature_class table
- Q: This is for display in specialist report views only? (not main Situation Mapping)
- once we have core functionality, want UI to be able to choose the attribute, the values & the markers
- add new gis.thematic_map table
- Styling based on values of an attribute of the resource
The Default marker
Popups
Clicking a Feature should bring up a Popup
- This can be a URL to load (flexible, but slow) however, if not provided, the default is:
- Loaded into the map during main load: no server-side calls
- Header should be found from a set of common options (name/code)
- All the list_fields with their labels
- A link to open the record in a new tab
Clicking a Cluster should bring up a Popup
- a list of the features within the cluster
- each list item is hyperlinked to bring up the Feature's Popup (as well?)
Q: Provide option to add Labels to Features?
Implementation
Option A (preferred)
Hardcode the link between FeatureClass & Resource (with optional category, e.g. for 'Report/Incident' table)
- Add optional category_field/category_value columns to the feature_class table
- If wanting feature-specific markers then add marker_id to resource tables (by bundling with location_id)
- Replace feature_group table with feature_layer table
- fields:
- name
- resource (used to populate the query field via an 'onvalidation')
- filter_field (optional. used to populate the query field via an 'onvalidation')
- filter_value (optional. used to populate the query field via an 'onvalidation')
- query (hidden behind 'Advanced' button?)
- comments
- fields:
Option B
FeatureClass is an attribute of the link table
- location_id extended to include feature_class_id (& marker_id) fields
- => a Feature Group cannot be a collection of Feature Classes since we can't trawl through all resources to see if any of them have been tagged for this FC
Storage
Docs
- http://docs.openlayers.org/library/overlays
- http://dev.openlayers.org/docs/files/OpenLayers/Feature/Vector-js.html
- http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html
Examples
- Use HTTP to pull down Features List as XML: http://openlayers.org/dev/examples/behavior-fixed-http-gml.html
- Controls to Add/Drag Features: http://openlayers.org/dev/examples/drag-feature.html
- Select Feature (inc via Box): http://www.openlayers.org/dev/examples/select-feature.html
- Popup on Feature: http://www.openlayers.org/dev/examples/select-feature-openpopup.html
- Style Features:
- Download/Upload serialized feature data: http://www.openlayers.org/dev/examples/vector-formats.html
- Cluster Strategy: http://www.openlayers.org/dev/examples/strategy-cluster.html
Limitations
Note:
See TracWiki
for help on using the wiki.