arlas-web-contributors / Exports / MapContributor

Class: MapContributor

This contributor works with the Angular MapComponent of the Arlas-web-components project. This class make the brigde between the component which displays the data and the collaborativeSearchService of the Arlas-web-core which retrieve the data from the server.

Hierarchy

  • Contributor

MapContributor

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new MapContributor(identifier, collaborativeSearcheService, configService, collection, colorGenerator?)

Build a new contributor.

Parameters

Name Type Description
identifier any Identifier of contributor.
collaborativeSearcheService CollaborativesearchService Instance of CollaborativesearchService from Arlas-web-core.
configService ConfigService Instance of ConfigService from Arlas-web-core.
collection string -
colorGenerator? ColorGeneratorLoader -

Overrides

Contributor.constructor

Defined in

src/contributors/MapContributor.ts:210

Properties

additionalFilter

Protected additionalFilter: Filter

Additional Arlas filter to add the BBOX and filter comming from Collaborations

Defined in

src/contributors/MapContributor.ts:163


cacheDuration

Protected cacheDuration: number

Inherited from

Contributor.cacheDuration

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:17


center

center: any

Defined in

src/contributors/MapContributor.ts:169


collaborativeSearcheService

collaborativeSearcheService: CollaborativesearchService

Inherited from

Contributor.collaborativeSearcheService


collection

collection: string

Inherited from

Contributor.collection


collections

collections: CollectionAggField[]

Inherited from

Contributor.collections

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:15


colorGenerator

Optional colorGenerator: ColorGeneratorLoader


configService

configService: ConfigService

Inherited from

Contributor.configService


countExtendBus

countExtendBus: Subject<{ count: number ; threshold: number }>

Defined in

src/contributors/MapContributor.ts:178


dataSources

dataSources: Set<string>

Defined in

src/contributors/MapContributor.ts:203


drawPrecision

drawPrecision: number

Defined in

src/contributors/MapContributor.ts:89


drawingsUpdate

drawingsUpdate: Subject<{ features: any[] ; type: string }>

Defined in

src/contributors/MapContributor.ts:192


endCollaborationEvent

endCollaborationEvent: Subject<unknown>

Inherited from

Contributor.endCollaborationEvent

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:16


expressionFilter

expressionFilter: Expression

A filter that is taken into account when fetching features and that is not included in the global collaboration. It's used in Simple mode only.

Defined in

src/contributors/MapContributor.ts:185


geoPointFields

geoPointFields: string[]

Defined in

src/contributors/MapContributor.ts:175


geoQueryField

geoQueryField: string

Defined in

src/contributors/MapContributor.ts:84


geoQueryOperation

geoQueryOperation: OpEnum

Defined in

src/contributors/MapContributor.ts:83


geoShapeFields

geoShapeFields: string[]

Defined in

src/contributors/MapContributor.ts:176


geojsondraw

geojsondraw: Object

Type declaration

Name Type
features any[]
type string

Defined in

src/contributors/MapContributor.ts:157


identifier

identifier: any

Inherited from

Contributor.identifier


isDataUpdating

isDataUpdating: boolean

Inherited from

Contributor.isDataUpdating

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:13


isFlat

isFlat: boolean

Defined in

src/contributors/MapContributor.ts:90


isSimpleModeAccumulative

isSimpleModeAccumulative: boolean

Defined in

src/contributors/MapContributor.ts:82


legendData

legendData: Map<string, LegendData>

Defined in

src/contributors/MapContributor.ts:189


legendUpdater

legendUpdater: Subject<Map<string, LegendData>>

Defined in

src/contributors/MapContributor.ts:188


mapLoadRawExtent

mapLoadRawExtent: number[]

Defined in

src/contributors/MapContributor.ts:171


mapLoadWrappedExtent

mapLoadWrappedExtent: number[]

Defined in

src/contributors/MapContributor.ts:170


mapTestRawExtent

mapTestRawExtent: number[]

Defined in

src/contributors/MapContributor.ts:173


mapTestWrappedExtent

mapTestWrappedExtent: number[]

Defined in

src/contributors/MapContributor.ts:172


redrawSource

redrawSource: Subject<{ data: Feature<Geometry | GeometryCollection, { [name: string]: any; }>[] ; source: string }>

Defined in

src/contributors/MapContributor.ts:187


saturationWeight

saturationWeight: number = 0.5

Defined in

src/contributors/MapContributor.ts:179


searchSize

searchSize: number

Number of features fetched in a geosearch request. It's used in Simple mode only. Default to 100.

Defined in

src/contributors/MapContributor.ts:86


searchSort

searchSort: string

comma seperated field names that sort the features. Order matters. It's used in Simple mode only.

Defined in

src/contributors/MapContributor.ts:88


visibilityStatus

visibilityStatus: Map<string, boolean>

Defined in

src/contributors/MapContributor.ts:191


visibilityUpdater

visibilityUpdater: Subject<Map<string, boolean>>

Defined in

src/contributors/MapContributor.ts:190


visibleSources

visibleSources: Set<string>

Defined in

src/contributors/MapContributor.ts:174


zoom

zoom: any

List of fields pattern or names that will be included in features mode as geojson properties.

Defined in

src/contributors/MapContributor.ts:168

Accessors

updateData

get updateData(): boolean

Returns

boolean

whether the data of contributor should be updated.

Inherited from

Contributor.updateData

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:43

set updateData(value): void

Parameters

Name Type Description
value boolean set if the data of contributor should be updated or not.

Returns

void

whether the data of contributor should be updated.

Inherited from

Contributor.updateData

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:47

Methods

addFilter

Protected addFilter(filter, additionalFilter): void

adds the second filter to the first filter

Parameters

Name Type Description
filter Filter filter to enrich
additionalFilter Filter filter to add to the first filter

Returns

void

Defined in

src/contributors/MapContributor.ts:2345


changeVisualisation

changeVisualisation(visibleLayers): void

Parameters

Name Type
visibleLayers Set<string>

Returns

void

Defined in

src/contributors/MapContributor.ts:365


clearData

clearData(s): void

Parameters

Name Type
s string

Returns

void

Defined in

src/contributors/MapContributor.ts:2089


computeAggData

computeAggData(fc, aggSource, aggType): void

Parameters

Name Type
fc FeatureCollection
aggSource SourcesAgg
aggType string

Returns

void

Defined in

src/contributors/MapContributor.ts:1619


computeClusterData

computeClusterData(featureCollection, aggSource): void

Parameters

Name Type
featureCollection FeatureCollection
aggSource SourcesAgg

Returns

void

Defined in

src/contributors/MapContributor.ts:1696


computeData

computeData(data): void

Parameters

Name Type
data any

Returns

void

Overrides

Contributor.computeData

Defined in

src/contributors/MapContributor.ts:389


computeFeatureData

computeFeatureData(featureCollection, sources): void

Parameters

Name Type
featureCollection FeatureCollection
sources string[]

Returns

void

Defined in

src/contributors/MapContributor.ts:1627


computeSimpleModeFeature

computeSimpleModeFeature(featureCollection, sources, renderStrategy, maxPages?, whichPage?): void

Parameters

Name Type
featureCollection FeatureCollection
sources string[]
renderStrategy RenderStrategy
maxPages? number
whichPage? PageEnum

Returns

void

Defined in

src/contributors/MapContributor.ts:1863


computeTopologyData

computeTopologyData(featureCollection, aggSource): void

Parameters

Name Type
featureCollection FeatureCollection
aggSource SourcesAgg

Returns

void

Defined in

src/contributors/MapContributor.ts:1673


downloadClusterSource

downloadClusterSource(source): any[]

Parameters

Name Type
source string

Returns

any[]

Defined in

src/contributors/MapContributor.ts:1267


downloadLayerSource

downloadLayerSource(source, layerName, downloadType): void

Parameters

Name Type
source any
layerName any
downloadType any

Returns

void

Defined in

src/contributors/MapContributor.ts:993


downloadSearchSource

downloadSearchSource(s): any[]

Parameters

Name Type
s string

Returns

any[]

Defined in

src/contributors/MapContributor.ts:1372


downloadTopologySource

downloadTopologySource(s): any[]

Parameters

Name Type
s string

Returns

any[]

Defined in

src/contributors/MapContributor.ts:1315


drawGeoSearch

drawGeoSearch(fromParam?, appendId?): void

Cleans all the old data, then it draws new fetched data using formParam and appendId

Parameters

Name Type Description
fromParam? number Index of the search scrolling. Default to 0;
appendId? boolean Whether to append the id field name to the sort string. Default to 'false'

Returns

void

Defined in

src/contributors/MapContributor.ts:1940


exportSourceAsCSV

exportSourceAsCSV(features): Blob

Parameters

Name Type
features any

Returns

Blob

Defined in

src/contributors/MapContributor.ts:1108


fetchAggSources

fetchAggSources(extent, rawExtent, zoom, aggs, aggType): void

Parameters

Name Type
extent number[]
rawExtent number[]
zoom number
aggs Map<string, SourcesAgg>
aggType string

Returns

void

Defined in

src/contributors/MapContributor.ts:1568


fetchData

fetchData(collaborationEvent?): Observable<any>

Parameters

Name Type
collaborationEvent? CollaborationEvent

Returns

Observable<any>

Overrides

Contributor.fetchData

Defined in

src/contributors/MapContributor.ts:291


fetchSearchSources

fetchSearchSources(filter, searches, renderStrategy, maxPages?, whichPage?): void

Parameters

Name Type
filter Filter
searches Map<string, SourcesSearch>
renderStrategy RenderStrategy
maxPages? number
whichPage? PageEnum

Returns

void

Defined in

src/contributors/MapContributor.ts:1544


fetchTiledSearchSources

fetchTiledSearchSources(extent, rawExtent, searches): void

Parameters

Name Type
extent number[]
rawExtent number[]
searches Map<string, SourcesSearch>

Returns

void

Defined in

src/contributors/MapContributor.ts:1501


getAdditionalFilter

getAdditionalFilter(): Filter

Returns

Filter

Defined in

src/contributors/MapContributor.ts:284


getBoundsToFit

getBoundsToFit(elementidentifier, collection?): Observable<number[][]>

Parameters

Name Type
elementidentifier ElementIdentifier
collection? string

Returns

Observable<number[][]>

Defined in

src/contributors/MapContributor.ts:752


getConfigValue

getConfigValue(key): any

Parameters

Name Type Description
key string a key defined in configuration.

Returns

any

value of the key in configuration.

Inherited from

Contributor.getConfigValue

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:31


getFeatureToHightLight

getFeatureToHightLight(elementidentifier): Object

Parameters

Name Type
elementidentifier ElementIdentifier

Returns

Object

Name Type
elementidentifier Object
elementidentifier.idFieldName string
elementidentifier.idValue string
isleaving boolean

Defined in

src/contributors/MapContributor.ts:760


getFilterDisplayName

getFilterDisplayName(): string

Returns

string

Pretty name of contribution.

Overrides

Contributor.getFilterDisplayName

Defined in

src/contributors/MapContributor.ts:785


getFilterForCount

getFilterForCount(rawExtent, wrappedExtent, countGeoField): Filter

Parameters

Name Type
rawExtent string
wrappedExtent string
countGeoField string

Returns

Filter

Defined in

src/contributors/MapContributor.ts:1980


getName

getName(): string

Returns

string

name of contributor set in configuration.

Inherited from

Contributor.getName

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:35


getPackageName

getPackageName(): string

Returns

string

Package name for the configuration service.

Overrides

Contributor.getPackageName

Defined in

src/contributors/MapContributor.ts:779


getPage

getPage(reference, sort, whichPage, maxPages): void

Get the previous/following set of data.

Parameters

Name Type Description
reference Map<string, string | number | Date> the last/first feature returned and from which next/previous data is fetched.
sort string comma separated field names on which feature are sorted.
whichPage PageEnum Whether to fetch next or previous set.
maxPages number The maxumum number of set features.

Returns

void

Defined in

src/contributors/MapContributor.ts:1840


getReturnedGeometries

getReturnedGeometries(returnedGeometries): Set<string>

Parameters

Name Type
returnedGeometries string

Returns

Set<string>

Defined in

src/contributors/MapContributor.ts:649


getWideModeData

getWideModeData(rawTestExtent, wrapTestExtent, mapLoadExtent, mapLoadRawExtent, zoom, visibleSources): void

Parameters

Name Type
rawTestExtent any
wrapTestExtent any
mapLoadExtent any
mapLoadRawExtent any
zoom number
visibleSources Set<string>

Returns

void

Defined in

src/contributors/MapContributor.ts:491


getWindowModeData

getWindowModeData(wrapExtent, rawExtent, visibleSources, sort, keepOldData?, afterParam?, whichPage?, maxPages?, fromParam?): void

Fetches the data for the Simple mode

Parameters

Name Type Default value Description
wrapExtent any undefined -
rawExtent any undefined -
visibleSources Set<string> undefined -
sort string undefined comma separated field names on which feature are sorted.
keepOldData boolean true -
afterParam? string undefined comma seperated field values from which next/previous data is fetched
whichPage? PageEnum undefined Whether to fetch next or previous set.
maxPages? number undefined -
fromParam? any undefined (page.from in arlas api) an offset from which fetching hits starts. It's ignored if afterParam is set.

Returns

void

Defined in

src/contributors/MapContributor.ts:429


onChangeAoi

onChangeAoi(fc): void

Runs when a geometry (bbox, polygon, ...) is drawn, removed or changed

beta This method is being tested. It will replace onChangeBbox and onRemoveBbox

Parameters

Name Type Description
fc FeatureCollection<Geometry | GeometryCollection, { [name: string]: any; }> FeatureCollection object

Returns

void

Defined in

src/contributors/MapContributor.ts:801


onChangeGeoQuery

onChangeGeoQuery(): void

Applies the geoQueryOperation

Returns

void

Defined in

src/contributors/MapContributor.ts:596


onMapMoved

onMapMoved(moveParams, recalculateWindow): void

This method is triggered after the map has been moved by the user. Its aim is - Verify if there new data to fetch on the new map extent - Verify if the zoom has changed and therefore verify if there is a need to fetch more/less precise data - Update the state variables of this contributor instance used for: zoom, center, loadextent, testextent,...

Parameters

Name Type
moveParams OnMoveResult
recalculateWindow boolean

Returns

void

Defined in

src/contributors/MapContributor.ts:330


onMove

onMove(newMove, recalculateWindow): void

Parameters

Name Type
newMove OnMoveResult
recalculateWindow boolean

Returns

void

Defined in

src/contributors/MapContributor.ts:869


renderAggSources

renderAggSources(sources, isLastCall?): void

Renders the data of the given agg sources.

Parameters

Name Type Default value Description
sources string[] undefined List of sources names (sources must be of the same type : cluster OR topology)
isLastCall boolean false -

Returns

void

Defined in

src/contributors/MapContributor.ts:877


renderClusterSources

renderClusterSources(sources, isLastCall?): void

Renders the data of the given cluster sources.

Parameters

Name Type Default value Description
sources string[] undefined List of sources names (sources must be of the same type : cluster)
isLastCall boolean false -

Returns

void

Defined in

src/contributors/MapContributor.ts:1155


renderSearchSources

renderSearchSources(sources): void

Render raw data provided by feature mode sources. It's used for both simple and dynamic mode.

Parameters

Name Type Description
sources string[] List of sources names (sources must be of the same type : feature)

Returns

void

Defined in

src/contributors/MapContributor.ts:925


renderTopologySources

renderTopologySources(sources): void

Renders the data of the given topology sources.

Parameters

Name Type Description
sources string[] List of sources names (sources must be of the same type : topology)

Returns

void

Defined in

src/contributors/MapContributor.ts:1031


resolveAggSources

resolveAggSources(visitedTiles, aggId, aggregation): Observable<FeatureCollection>

Parameters

Name Type
visitedTiles Set<string>
aggId string
aggregation Aggregation

Returns

Observable<FeatureCollection>

Defined in

src/contributors/MapContributor.ts:1466


resolveSearchSources

resolveSearchSources(filter, searchId, search): Observable<FeatureCollection>

Resolves data for features sources (used in simple mode only) using geosearch (arlas-api)

Parameters

Name Type Description
filter Filter Filter object (from arlas-api) that requests the data to be resolved
searchId string identifier of search responsible of fetching this data
search Search Search object (from arlas-api) that indicates how data will be resolved

Returns

Observable<FeatureCollection>

Defined in

src/contributors/MapContributor.ts:1460


resolveTiledSearchSources

resolveTiledSearchSources(tiles, searchId, search): Observable<FeatureCollection>

Resolves data for features sources (used in dinamic mode only) using tiled geosearch (arlas-api)

Parameters

Name Type Description
tiles Set<string> newly visited tiles on which data will be resolved
searchId string identifier of search responsible of fetching this data
search Search Search object (from arlas-api) that indicates how data will be resolved

Returns

Observable<FeatureCollection>

Defined in

src/contributors/MapContributor.ts:1427


saveJson

saveJson(json, filename, separator?): void

Parameters

Name Type
json any
filename string
separator? string

Returns

void

Defined in

src/contributors/MapContributor.ts:1128


setAdditionalFilter

setAdditionalFilter(value): void

Parameters

Name Type
value Filter

Returns

void

Defined in

src/contributors/MapContributor.ts:287


setData

setData(data): void

Parameters

Name Type
data any

Returns

void

Overrides

Contributor.setData

Defined in

src/contributors/MapContributor.ts:654


setDataCellGeoaggregate

setDataCellGeoaggregate(features): any

Parameters

Name Type
features any[]

Returns

any

Defined in

src/contributors/MapContributor.ts:1830


setDrawings

setDrawings(collaboration): void

Parameters

Name Type
collaboration Collaboration

Returns

void

Defined in

src/contributors/MapContributor.ts:662


setGeoQueryField

setGeoQueryField(geoQueryField): void

Sets the geometry/point field to query

Parameters

Name Type
geoQueryField string

Returns

void

Defined in

src/contributors/MapContributor.ts:417


setGeoQueryOperation

setGeoQueryOperation(geoQueryOperation): void

Sets the query operation to apply (within, intersects, notintersects, notwithin)

Parameters

Name Type
geoQueryOperation string

Returns

void

Defined in

src/contributors/MapContributor.ts:396


setLegendSearchData

setLegendSearchData(s): void

Parameters

Name Type
s any

Returns

void

Defined in

src/contributors/MapContributor.ts:890


setName

setName(name): void

Parameters

Name Type
name string

Returns

void

set the name of the contributor

Inherited from

Contributor.setName

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:39


setSelection

setSelection(data, collaboration): any

Parameters

Name Type
data any
collaboration Collaboration

Returns

any

Overrides

Contributor.setSelection

Defined in

src/contributors/MapContributor.ts:657


updateFromCollaboration

updateFromCollaboration(collaborationEvent): void

Parameters

Name Type
collaborationEvent CollaborationEvent

Returns

void

Inherited from

Contributor.updateFromCollaboration

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:56


wrap

wrap(n, minimum, maximum): number

Parameters

Name Type
n number
minimum number
maximum number

Returns

number

Defined in

src/contributors/MapContributor.ts:789


getClusterAggregration

Static getClusterAggregration(source): Aggregation

Parameters

Name Type
source LayerSourceConfig

Returns

Aggregation

Defined in

src/contributors/MapContributor.ts:2187


getClusterSource

Static getClusterSource(ls): LayerClusterSource

Parameters

Name Type
ls LayerSourceConfig

Returns

LayerClusterSource

Defined in

src/contributors/MapContributor.ts:2114


getFeatureSearch

Static getFeatureSearch(source): Search

Parameters

Name Type
source LayerSourceConfig

Returns

Search

Defined in

src/contributors/MapContributor.ts:2302


getFeatureSource

Static getFeatureSource(ls): LayerFeatureSource

Parameters

Name Type
ls LayerSourceConfig

Returns

LayerFeatureSource

Defined in

src/contributors/MapContributor.ts:2167


getFilterFromExtent

Static getFilterFromExtent(rawExtent, wrappedExtent, geoQueryField): Filter

Static method that returns an ARLAS geographical filter, given the map extent and the geo_query field

Parameters

Name Type
rawExtent string
wrappedExtent string
geoQueryField string

Returns

Filter

Defined in

src/contributors/MapContributor.ts:1959


getJsonSchema

Static getJsonSchema(): Object

Returns

Object

Defined in

src/contributors/MapContributor.ts:280


getTopologyAggregration

Static getTopologyAggregration(source): Aggregation

Parameters

Name Type
source LayerSourceConfig

Returns

Aggregation

Defined in

src/contributors/MapContributor.ts:2227


getTopologySource

Static getTopologySource(ls): LayerTopologySource

Parameters

Name Type
ls LayerSourceConfig

Returns

LayerTopologySource

Defined in

src/contributors/MapContributor.ts:2138