-
Notifications
You must be signed in to change notification settings - Fork 0
Features
The mp-layers module of the Madrona Portal stack is where an administrator defines and organizes all of the layers that will appear in the Visualize Tool (see mp-visualize).
Layers define an externally available web map layer, how to display it, and how it interacts with the user and other layers.
- XYZ - A web map tiles or 'slippy map' service that can be represented via a URL template given variables
x,y, andz - WMS - Web Map Service, specifically Open Geospatial Consortium's OGC-WMS
- ArcGIS REST - Specifically ArcGIS MapServer (MapServices)
- ArcGIS FeatureServer - An ArcGIS FeatureServer (FeatureServices)
- Vector - a vector souce, specifically a GeoJSON or other single file that can be directly interpreted by OpenLayers
- VectorTile - limited support may exist (TBD) for some VectorTile sources
- slider - Specifies that this record only functions to support tying multiple related records together using 1 or more sliders to organize across a dimension like time, vessel type, species, etc.
When you select a Layer type (see the 'Service Technologies' list above), the layer form is expanded to create a supplemental table to store fields that are specific to defining the proposed layer type.
Sometimes a layer needs additional context from another layer to be clearly understood. You can add any number of 'companion' layers to your layer - they will be activated when your primary layer is activated, and deactivated when your primary layer is deactivated. They may also be deactivated individually, and the companion layer doesn't need to be displayed in another theme (it may need to belong to the invisible 'companion' theme: TBD).
see Lookup Infos section below.
See Attribute Infos section below.
- Multilayer Dimension
- Adding a Multlayer Dimension record to a 'slider' type layer will result in a new slider bar being presented to the user
- You can add multiple dimensions, but the more dimensions and more values you have on those dimensions greatly harm performance.
- Each record should represent a concept you wish to organize the elements of a slider by, such as 'month', 'vessel type', or 'species'
- Multilayer Dimension Value
- These can only be added directly to a defined Multilayer Dimension
- Each record represents a label (or 'node') you want users to see and select on your slider bar
- Again, too many of these can result in poor performance: multiply the number of 'values' on each dimension (slider bar) by each other to get the total number of layers (or 'Associations', described below) you will need. A good guideline is to keep this number as small as possible, and always less than 100.
- Example: you have AIS data for 8 vessel types across 12 months of a year. One dimension is 'month' with 12 values, another is 'vessel type' with 8 values. This means the slider will host 96 (12x8) associated layers.
- Multilayer Association
- This is the record that ties a layer to the selected dimension values.
- If a slider layer has 3 dimensions, then each association maps 3 values (one for each dimension) with a specific layer record.
- this way, a layer is displayed on the map for each possible combination of values between the sliders.
Themes are how layers are organized and added to the map viewer's layer-selection panel. It might be helpful to think of these as 'folders' on your computer, and layers like 'files': a folder can contain any combination of folder and files, but files are end-nodes in the hierarchy and do not support further organization. In the same way, a Theme can contain 'subthemes', which in turn can contain themes of their own. This also allows layers to be associated with multiple themes without needing to be defined again, if the layer's content is relevant to different themes.
These are not directly managed by a site administrator. These models represent the many-to-many relationships between themes and subthemes, or themes and layers. In each case they create a parent-child relationship. These relationships can be defined in the theme form, either by creating children or parent relationships, or by the layer form by associating the layer with parent themes.
These records enable a site administrator to control the content and format of layer 'identification' request reports. If a layer allows users to click on a feature and get information back, that information goes into a report. The Madrona Portal by default will do it's best to interpret and display every record in that report as a key value pair. Using Attribute Info records, you can limit which fields are displayed, what order they're displayed in, the maximum precision of any decimal-point number values, and whether or not to 'humanize' numbers larger than 999 with comma separators.
- Uuid - a fixed unique identifier that cannot be changed
- Display name (Record name) - How this record will show up for selection in the 'layer' form
- Field name - the 'key' in the key-value pair returned by your layer. This is how the tool knows which field to display and in which order.
- Precision - if the value is a floating point number (non-integer, or has a decimal point), this number will limit the number of digits displayed after the decimal point. Leave it blank to show the full number returned
- Order - A numeric value for what relative order to show the value in. These do not have to be sequential, but a layer with multiple Attribute Info records will show the lowest 'Order' values first (1,2,3,4 or 100, 115, 260, 512).
- Preserve format - By default, numeric values larger than 999 will have commas inserted (1000000 -> 1,000,000). If it is inappropriate to insert commas into your number (such as the year 2026), check this box and numeric values will be left alone.
For some layer service types, the logic will try to override the given field name (the 'key' of the report's key-value pairs) and replace it with the 'Display name' field. This is NOT the intent of the field. Instead, a new feature is desired where 'Display name' is renamed to 'Record name', clarified in the form, and a new field is added called "Field label". If this value is neither None or '', the report should override the raw field name with this.
For Vector type layers ('Vector', 'VectorTile', or 'ArcFeatureServer'), you may wish to alter the cartography. These records will alter the appearance of features whose value (for a given 'Lookup field' defined by the layer itself) matches. You have the following control over the layer's carography (style):
- Fill color
- Stroke color
- Stroke width
- Dash style (for strokes)
- Fill (yes or no)
- Graphic (for point data)
- Graphic scale (to size the 'graphic')
This only allows for cartography to be dependent on a single variable for the entire layer.