Requesting, loading and getting information about iShare profiles (MapSource)
Methods
(inner) getProfile(iShareUrl, profileName) → {Promise}
Get Profile definition
Parameters:
Name | Type | Description |
---|---|---|
iShareUrl |
String | Base URL for iShare Web app |
profileName |
String | Name of profile to load |
Returns:
Resolves to module:ol-ishare/profile~Profile
object, rejects with {Error}
- Type
- Promise
(inner) getOwsUrl(iShareUrl, profileName) → {String}
Return the base OWS (WMS/ WFS) URL given an iShareUrl and a profileName
Parameters:
Name | Type | Description |
---|---|---|
iShareUrl |
String | Base URL for iShare Web app |
profileName |
String | Name of profile |
Returns:
Base OWS URL
- Type
- String
(inner) filterLayerConfigs(layerGroups, filterFunc) → {Array.<module:ol-ishare/profile~Layer>}
Returns a flattened list of layer configurations found in layerGroups for which the filter returns true
Parameters:
Name | Type | Description |
---|---|---|
layerGroups |
Array.<module:ol-ishare/profile~LayerGroup> | An Array of |
filterFunc |
function | Array#filter function, argument is a layer config, returns true if the layer is wanted |
Returns:
Array of layerConfig objects
(inner) getLayerConfigs(layerGroups, layerNamesopt) → {Array.<module:ol-ishare/profile~Layer>}
Returns a flattened list of all layer configurations found in layerGroups
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layerGroups |
Array.<module:ol-ishare/profile~LayerGroup> | An Array of |
|
layerNames |
Array.<String> |
<optional> |
Optional list of names of required layers |
Returns:
Array of layerConfig objects
(inner) getLayerConfig(layerGroups, layerName) → {module:ol-ishare/profile~Layer|null}
Returns the layer configuration with layerName or null if not found
Parameters:
Name | Type | Description |
---|---|---|
layerGroups |
Array.<module:ol-ishare/profile~LayerGroup> | An Array of LayerGroup instances |
layerName |
String | Name of layer to find the config for |
Returns:
layerConfig Layer configuration object from the profile or null if not found
- Type
- module:ol-ishare/profile~Layer | null
(inner) getBaseConfig(baseMaps, layerName) → {BaseMap|null}
Returns the base map configuration with layerName or null if not found
Parameters:
Name | Type | Description |
---|---|---|
baseMaps |
Array.<BaseMap> | Array of base map definitions |
layerName |
String | Name of base map to find the config for |
Returns:
baseConfig Base map configuration or null if not found
- Type
- BaseMap | null
(inner) getGroupConfig(layerGroups, guid) → {module:ol-ishare/profile~LayerGroup|null}
Return the group definition with the given GUID
Parameters:
Name | Type | Description |
---|---|---|
layerGroups |
Array.<module:ol-ishare/profile~LayerGroup> | An Array of LayerGroup instances |
guid |
String | Id of the layer group |
Returns:
Layer group configuration or null if not found
- Type
- module:ol-ishare/profile~LayerGroup | null
Type Definitions
Profile
Properties:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attribution |
String | Attribution for data in the profile |
|||||||||||||||
baseMaps |
Array.<BaseMap> | List of base map profiles |
|||||||||||||||
config |
Object | Profile config Properties
|
|||||||||||||||
defaultBaseMap |
String | Name of default base map |
|||||||||||||||
defaultProfile |
String | Name of default profile |
|||||||||||||||
extent |
Array.<Number> |
|
|||||||||||||||
initialView |
Object |
|
|||||||||||||||
layerGroups |
Array.<module:ol-ishare/profile~LayerGroup> | List of layer group objects each of which has a |
|||||||||||||||
mapName |
String | The name of this profile |
|||||||||||||||
profiles |
Array.<module:ol-ishare/profile~Profile> | List of all available profiles |
|||||||||||||||
projection |
Object | Projection definition Properties
|
|||||||||||||||
resolutions |
Array.<Number> | List of resolutions (zoom levels) to be used with this profile |
Type:
BaseMap
Properties:
Name | Type | Description |
---|---|---|
attribution |
String | Copyright/ attribution for the base map |
displayName |
String | Name of the base map suitable for display to end-user |
format |
String | Image format (e.g. image/png) |
layers |
Array.<String> | Array of layer names to request from the server |
mapName |
String | The name of the base map |
resolutions |
Array.<Number> | List of resolutions (zoom levels) to be used with this profile |
url |
String | URL to request base map tiles |
Type:
LayerGroup
Properties:
Name | Type | Description |
---|---|---|
layers |
Array.<module:ol-ishare/profile~Layer> | Array of Layer instances that belong to this group |
guid |
String | GUID that identifies this group |
displayName |
String | Name of the group suitable for display to end-user |
Type:
Layer
Properties:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName |
String | Name of the layer suitable for display to end-user |
||||||||||||
fields |
Array.<module:ol-ishare/profile~Field> | Array of Field objects |
||||||||||||
hidden |
Boolean | Whether the layer should be displayed a layer list etc. |
||||||||||||
infoClick |
Boolean | Whether info is enabled for this layer |
||||||||||||
initiallyVisible |
Boolean | Whether the layer should be visible when initially created |
||||||||||||
layerName |
String | The layer ID |
||||||||||||
metadata |
Object | Layer metadata |
||||||||||||
query |
Object | Spatial query configuration |
||||||||||||
searchField |
String | Field to use when performing an attribute search |
||||||||||||
uniqueField |
String | Field containing unique values suitable for use as an ID (undefined in "mapserver" layer) |
||||||||||||
thematic |
ThematicClass | Thematic class config including an SLD to apply to a WMS layer |
||||||||||||
type |
String | Either "ows" or "mapserver" |
||||||||||||
geometry |
Object | Geometry-related properties Properties
|
||||||||||||
zIndex |
Number | Order in which the layer will be rendered; layers with higher values will be shown above those with lower values |
||||||||||||
opacity |
Number | Value between 0 (totally transparent) and 1 (completely opaque) |
Type:
Field
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
displayName |
String | Name of the field suitable for display to end-user |
|||||||||
link |
Object | null | Link information Properties
|
|||||||||
name |
String | Column name |