Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PermalinkService

Index

Constructors

constructor

  • The Permalink service for GMF, which uses the ngeo.statemanager.Service to manage the GMF application state. Here's the list of states are are managed:

    • the map center and zoom level
    • the current background layer selected
    • whether to add a crosshair feature in the map or not
    • the dimensions value

    For time layers the time range or time value is added

    It can also be used to add different types of things in the map, such as features, external data sources, etc.

    This is made using parameters in the url, which can be static (i.e. parameters that always have the same name) or dynamic (i.e. parameters that have a static prefix but with a full name being dynamic).

    Here's a complete list of possible parameters and what they do. But first, a legend

    === Parameters [type] ===

    • [paramameter_name] (type) [parameter documentation]

    === Parameters (static) ===

    A static parameter always have the same name.

    • baselayer_ref - "string" The name of the base layer that should be set visible as default in the map. If none is set, then the default one in the loaded theme is set instead.

    • eds_n (string), eds_u (string) These parameters stand for:

      • eds_n: "External Data Sources Names"
      • eds_u: "External Data Sources URLs" These parameters define external WMS/WMTS data sources to add to the map upon initialization. Both values are comma-separated lists, eds_u containing the urls to the services and eds_n the layer names (separated by ;). Here's an example: &eds_n=a;b;c,d,e&eds_u=host1.com,host2.com,host3.com, which reads as:
      • host1.com - layers: a, b and c
      • host2.com - layers: d
      • host3.com - layers: e For these parameters to work properly, they must define the same number of elements, i.e. same number of names and urls.
    • map_crosshair (boolean) If this parameter set to true, then a crosshair marker will be added to the center of the map upon initialization. The marker will stay at this location.

    • map_tooltip (string) If set, then the text defined in this parameter will be added as a tooltip at center of the map upon initialization.

    • map_x (number), map_y (number) These two parameters define a coordinate the map view should be centered to upon initialization. The value must be in the map view projection.

    • map_zoom (number) Defines the zoom level the map view should be zoomed to upon initialitation.

    • rl_features (string) This parameter defines vector features to add to the map upon initializaton. In addition, if the application includes the draw tool, the features added can be modified. The draw tool can also be used to add new features, which are automatically added in the url.

    • tree_groups (string) Defines the layer groups that should be added to the layer tree upon application initialization as a comma-separated list. For example: Layers,Filters,Externals

    • wfs_layer (string) If set, this parameter defines the name of a layer that supports WFS to use to fetch features and add them to the map upon initialization. The dynamic parameter wfs_[] is required to identify the features to fetch.

    • wfs_ngroups (number) If set, then wfs_layer represents the name of a group and this property defines how many layers are in it. Requires wfs_layer to be set.

    • wfs_show_features (boolean) If set to false or 0, then the features returned by the wfs_layer parameter will not be shown in the map.

    === Parameters (dynamic) ===

    Dynamic parameters have variable names, which is always composed of:

    • a static prefix
    • a variable suffix

    The same dynamic parameter can be set multiple times, with different suffix values as name.

    For example: &wfs_a=&wfs_b=.

    • wfs_ is the static prefix

    • the name used as reference for this dynamic parameter is wfs_[]

    • therefore, this example has 2 wfs_[] parameters set, with a and b being the variable suffix

    • dim_[] (string) Variable suffix: the name of a dimension Value: * Defines the value of a specific dimension to set upon loading the application. For example: &dim_time=2019-01-25T14:45:51.986Z. WMS data sources that support the dimension set will be initialized with its value.

    • tree_enable_[] (boolean) Variable suffix: the name of a layer group Value: whether the group should be enabled or not in the layer tree For example: &tree_enable_polygon=true&tree_enable_point=false means that the group polygon will be enabled in the layer tree, but not point.

    • tree_group_layers_[] (string) Variable suffix: the name of a layer group Value: a comma-separated list of layers within the group that should be enabled upon initialization. For example: &tree_group_layers_polygon=forest,lake means that only the layers forest and lake within the group polygon would be enabled upon initialization.

    • tree_opacity_[] (number) Variable suffix: the name of a layer group Value: Number between 0 (transparent) and 1 (opaque) Defines the opacity of a layer group upon initialization.

    • tree_time_[] (date) Variable suffix: the name of a layer group or layer Value: a date or date interval with the resolution of the time of the layer or group Defines the time or time interval for a time layer or a group.

    • wfs_[] (string) Variable suffix: the name of an attribute Value: A comma-separated list of values for the attribute This parameter requires wfs_layer in order to work properly. If set, it defines the filters to build to fetch the features to add to the map. For example: &wfs_layer=fuel&wfs_osm_id=1420918679,441134960 the layer fuel will be fetched features with the attribute osm_id equal to 1420918679 or 441134960. If wfs_ngroups is set, then an index is added to after the prefix of the wfs_[] parameter, for example: wfs_ngroups=2&wfs_0_[]=&wfs_1_[]=

    === More documentation ===

    To have the whole possibilities offer by the permalink, these services should be instantiated: ngeoBackgroundLayerMgr, ngeoFeatureOverlayMgr, ngeoFeatureHelper, gmfPermalinkOptions, gmfThemes, gmfObjectEditingManager, gmfThemeManager, defaultTheme, gmfTreeManager, ngeoWfsPermalink, ngeoAutoProjection and ngeoFeatures.

    Used functionalities:

    • default_theme: Theme to use by default.
    nginject
    ngdoc

    service

    ngname

    gmfPermalink

    Parameters

    • $q: IQService

      The Angular $q service.

    • $timeout: ITimeoutService

      Angular timeout service.

    • $rootScope: IScope

      Angular rootScope.

    • $injector: IInjectorService

      Main injector.

    • ngeoDebounce: miscDebounce<() => void>

      ngeo Debounce factory.

    • gettextCatalog: gettextCatalog

      Gettext service.

    • ngeoEventHelper: EventHelper

      Ngeo event helper service

    • ngeoStateManager: StatemanagerService

      The ngeo statemanager service.

    • ngeoLocation: StatemanagerLocation

      ngeo location service.

    • gmfLayerBeingSwipe: LayerBeingSwipe
    • gmfPermalinkOptions: gmfPermalinkOptions

      The options.

    • gmfDataSourcesManager: DatasourceManager

      The gmf datasourcemanager service.

    • ngeoWMSTime: WMSTime

      The ngeo wmstime service

    Returns PermalinkService

Properties

$timeout_

$timeout_: ITimeoutService

crosshairEnabledByDefault_

crosshairEnabledByDefault_: boolean

crosshairFeature_

crosshairFeature_: Feature<Geometry>

crosshairStyle_

crosshairStyle_: StyleLike

defaultTheme_

defaultTheme_: string

featureHashFormat_

featureHashFormat_: default

featureHelper_

featureHelper_: FeatureHelper

featureOverlay_

featureOverlay_: FeatureOverlay

gmfDataSourcesManager_

gmfDataSourcesManager_: DatasourceManager

gmfExternalDataSourcesManager_

gmfExternalDataSourcesManager_: ExternalDatSourcesManager

gmfLayerBeingSwipe_

gmfLayerBeingSwipe_: LayerBeingSwipe

gmfObjectEditingManager_

gmfObjectEditingManager_: ObjecteditingManagerService

gmfThemeManager_

gmfThemeManager_: ThemeManagerService

gmfThemes_

gmfThemes_: ThemesService

gmfTreeManager_

gmfTreeManager_: LayertreeTreeManager

gmfUser

gmfUser: any

listenerKeys_

listenerKeys_: EventsKey[]

mapTooltip_

mapTooltip_: default

mapViewPropertyChangeEventKey_

mapViewPropertyChangeEventKey_: EventsKey

The key for map view 'propertychange' event.

map_

map_: Map

ngeoAutoProjection_

ngeoAutoProjection_: AutoProjectionService

ngeoBackgroundLayerMgr_

ngeoBackgroundLayerMgr_: MapBackgroundLayerManager

ngeoDebounce_

ngeoDebounce_: miscDebounce<() => void>

ngeoEventHelper_

ngeoEventHelper_: EventHelper

ngeoFeatures_

ngeoFeatures_: Collection<Feature<Geometry>>

ngeoLocation_

ngeoLocation_: StatemanagerLocation

ngeoQuerent_

ngeoQuerent_: Querent

ngeoStateManager_

ngeoStateManager_: StatemanagerService

ngeoWMSTime_

ngeoWMSTime_: WMSTime

ngeoWfsPermalink_

ngeoWfsPermalink_: WfsPermalinkService

pointRecenterZoom_

pointRecenterZoom_: number

q_

q_: IQService

rootScope_

rootScope_: IScope

setExternalDataSourcesStatePromise_

setExternalDataSourcesStatePromise_: IPromise<void>

sourceProjections_

sourceProjections_: Projection[]

A list of projections that the coordinates in the permalink can be in.

Methods

addNgeoFeature_

  • addNgeoFeature_(feature: Feature<Geometry>): void
  • Listen to any changes that may occur within the feature in order to update the state of the permalink accordingly.

    Parameters

    • feature: Feature<Geometry>

      Feature.

    Returns void

cleanParams

containsLayerName

  • containsLayerName(layer: BaseLayer, name: string): boolean

createFilterGroup_

defaultThemeName

  • defaultThemeName(): string

defaultThemeNameFromFunctionalities

  • defaultThemeNameFromFunctionalities(): string

getBackgroundLayer

  • getBackgroundLayer(layers: BaseLayer[]): BaseLayer
  • Get the background layer object to use to initialize the map from the state manager.

    Parameters

    • layers: BaseLayer[]

      Array of background layer objects.

    Returns BaseLayer

    Background layer.

getBackgroundLayerOpacity

  • getBackgroundLayerOpacity(): number

getFeatures

  • getFeatures(): Feature<Geometry>[]

getMapCenter

  • getMapCenter(): Coordinate

getMapCrosshair

  • getMapCrosshair(): boolean

getMapTooltip

  • getMapTooltip(): string

getMapZoom

  • getMapZoom(): number

getWfsPermalinkData_

handleBackgroundLayerManagerChange_

  • handleBackgroundLayerManagerChange_(): void

handleExternalDSGroupCollectionAdd_

  • handleExternalDSGroupCollectionAdd_(evt: BaseEvent | Event): void

handleExternalDSGroupCollectionRemove_

  • handleExternalDSGroupCollectionRemove_(evt: BaseEvent | Event): void

handleLayerBeingSwipeChange_

  • handleLayerBeingSwipeChange_(layer: Layer<Source> | LayerGroup, oldLayer: Layer<Source> | LayerGroup): void

handleMapSwipeValue_

  • handleMapSwipeValue_(): void

handleNgeoFeaturesAdd_

  • handleNgeoFeaturesAdd_(event: BaseEvent | Event): void

handleNgeoFeaturesChange_

  • handleNgeoFeaturesChange_(): void
  • Called once upon initialization of the permalink service if there's at least one feature in the ngeoFeatures collection, then called every time the collection changes or any of the features within the collection changes.

    Returns void

handleNgeoFeaturesRemove_

  • handleNgeoFeaturesRemove_(event: BaseEvent | Event): void

initExternalDataSources_

  • initExternalDataSources_(): IPromise<void>

initLayers_

  • initLayers_(): void

refreshFirstLevelGroups

  • refreshFirstLevelGroups(): void

refreshLayerTime

registerExternalDSGroup_

  • registerExternalDSGroup_(group: Group): void

registerMap_

  • registerMap_(map: Map, oeFeature: Feature<Geometry>): void
  • Listen to the map view property change and update the state accordingly.

    Parameters

    • map: Map

      The ol3 map object.

    • oeFeature: Feature<Geometry>

      ObjectEditing feature

    Returns void

removeNgeoFeature_

  • removeNgeoFeature_(feature: Feature<Geometry>): void

setDimensions

  • setDimensions(dimensions: Object): void

setExternalDataSourcesState_

  • setExternalDataSourcesState_(): void

setMap

  • setMap(map: Map): void
  • Bind an ol3 map object to this service. The service will, from there on, listen to the properties changed within the map view and update the following state properties: map_x, map_y and map_zoom.

    If the service is already bound to a map, those events are unlistened first.

    Parameters

    • map: Map

      The ol3 map object.

    Returns void

setMapCrosshair

  • setMapCrosshair(opt_center: Coordinate): void
  • Sets the map crosshair to the center (or the map center if nothing provided). Overwrites an existing map crosshair.

    Parameters

    • opt_center: Coordinate

    Returns void

setMapTooltip

  • setMapTooltip(tooltipText: string, opt_center: Coordinate): void
  • Sets the map tooltip to the center (or the map center if nothing provided). Overwrites an existing map tooltip.

    Parameters

    • tooltipText: string

      Text to display in tooltip.

    • opt_center: Coordinate

    Returns void

setNodeTime_

setThemeInUrl_

  • setThemeInUrl_(themeName: string): void

themeInUrl_

  • themeInUrl_(pathElements: string[]): boolean

unregisterExternalDSGroup_

  • unregisterExternalDSGroup_(group: Group): void

unregisterMap_

  • unregisterMap_(): void

Generated using TypeDoc