arlas-web-contributors / 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.
Extends
Contributor
Constructors
new MapContributor()
new MapContributor(
identifier
,collaborativeSearcheService
,configService
,collection
,colorGenerator
?):MapContributor
Build a new contributor.
Parameters
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
Returns
Overrides
Contributor.constructor
Defined in
src/contributors/MapContributor.ts:211
Properties
additionalFilter
protected
additionalFilter:Filter
Additional Arlas filter to add the BBOX and filter comming from Collaborations
Defined in
src/contributors/MapContributor.ts:164
cacheDuration
protected
cacheDuration:number
Inherited from
Contributor.cacheDuration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:18
center
center:
number
[]
Defined in
src/contributors/MapContributor.ts:170
collaborativeSearcheService
collaborativeSearcheService:
CollaborativesearchService
Instance of CollaborativesearchService from Arlas-web-core.
Inherited from
Contributor.collaborativeSearcheService
Defined in
src/contributors/MapContributor.ts:211
collection
collection:
string
Inherited from
Contributor.collection
Defined in
src/contributors/MapContributor.ts:212
collections
collections:
CollectionAggField
[]
Inherited from
Contributor.collections
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:15
colorGenerator?
optional
colorGenerator:ColorGeneratorLoader
Defined in
src/contributors/MapContributor.ts:213
configService
configService:
ConfigService
Instance of ConfigService from Arlas-web-core.
Inherited from
Contributor.configService
Defined in
src/contributors/MapContributor.ts:211
countExtendBus
countExtendBus:
Subject
\<{count
:number
;threshold
:number
; }>
Defined in
src/contributors/MapContributor.ts:179
dataSources
dataSources:
Set
\<string
>
Defined in
src/contributors/MapContributor.ts:204
drawingsUpdate
drawingsUpdate:
Subject
\<{features
:any
[];type
:string
; }>
Defined in
src/contributors/MapContributor.ts:193
drawPrecision
drawPrecision:
number
Defined in
src/contributors/MapContributor.ts:90
endCollaborationEvent
endCollaborationEvent:
Subject
\<CollaborationEvent
>
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:186
geojsondraw
geojsondraw:
object
features
features:
any
[]
type
type:
string
Defined in
src/contributors/MapContributor.ts:158
geoPointFields
geoPointFields:
string
[]
Defined in
src/contributors/MapContributor.ts:176
geoQueryField
geoQueryField:
string
Defined in
src/contributors/MapContributor.ts:85
geoQueryOperation
geoQueryOperation:
OpEnum
Defined in
src/contributors/MapContributor.ts:84
geoShapeFields
geoShapeFields:
string
[]
Defined in
src/contributors/MapContributor.ts:177
identifier
identifier:
any
Identifier of contributor.
Inherited from
Contributor.identifier
Defined in
src/contributors/MapContributor.ts:211
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:91
isSimpleModeAccumulative
isSimpleModeAccumulative:
boolean
Defined in
src/contributors/MapContributor.ts:83
legendData
legendData:
Map
\<string
,LegendData
>
Defined in
src/contributors/MapContributor.ts:190
legendUpdater
legendUpdater:
Subject
\<Map
\<string
,LegendData
>>
Defined in
src/contributors/MapContributor.ts:189
linkedContributorId
linkedContributorId:
string
Inherited from
Contributor.linkedContributorId
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:17
mapLoadRawExtent
mapLoadRawExtent:
number
[]
Defined in
src/contributors/MapContributor.ts:172
mapLoadWrappedExtent
mapLoadWrappedExtent:
number
[]
Defined in
src/contributors/MapContributor.ts:171
mapTestRawExtent
mapTestRawExtent:
number
[]
Defined in
src/contributors/MapContributor.ts:174
mapTestWrappedExtent
mapTestWrappedExtent:
number
[]
Defined in
src/contributors/MapContributor.ts:173
redrawSource
redrawSource:
Subject
\<{data
:Feature
\<Geometry
|GeometryCollection
, {}>[];source
:string
; }>
Defined in
src/contributors/MapContributor.ts:188
saturationWeight
saturationWeight:
number
=0.5
Defined in
src/contributors/MapContributor.ts:180
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:87
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:89
visibilityStatus
visibilityStatus:
Map
\<string
,boolean
>
Defined in
src/contributors/MapContributor.ts:192
visibilityUpdater
visibilityUpdater:
Subject
\<Map
\<string
,boolean
>>
Defined in
src/contributors/MapContributor.ts:191
visibleSources
visibleSources:
Set
\<string
>
Defined in
src/contributors/MapContributor.ts:175
zoom
zoom:
number
List of fields pattern or names that will be included in features mode as geojson properties.
Defined in
src/contributors/MapContributor.ts:169
Accessors
updateData
Get Signature
get updateData():
boolean
Returns
boolean
whether the data of contributor should be updated.
Set Signature
set updateData(
value
):void
Parameters
value
boolean
set if the data of contributor should be updated or not.
Returns
void
Inherited from
Contributor.updateData
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:49
Methods
addFilter()
protected
addFilter(filter
,additionalFilter
):void
adds the second filter to the first filter
Parameters
filter
Filter
filter to enrich
additionalFilter
Filter
filter to add to the first filter
Returns
void
Defined in
src/contributors/MapContributor.ts:2395
changeVisualisation()
changeVisualisation(
visibleLayers
):void
Parameters
visibleLayers
Set
\<string
>
Returns
void
Defined in
src/contributors/MapContributor.ts:370
clearData()
clearData(
s
):void
Parameters
s
string
Returns
void
Defined in
src/contributors/MapContributor.ts:2135
computeAggData()
computeAggData(
fc
,aggSource
,aggType
):void
Parameters
fc
FeatureCollection
aggSource
SourcesAgg
aggType
string
Returns
void
Defined in
src/contributors/MapContributor.ts:1640
computeClusterData()
computeClusterData(
featureCollection
,aggSource
):void
Parameters
featureCollection
FeatureCollection
aggSource
SourcesAgg
Returns
void
Defined in
src/contributors/MapContributor.ts:1717
computeData()
computeData(
data
):void
Parameters
data
any
Returns
void
Overrides
Contributor.computeData
Defined in
src/contributors/MapContributor.ts:394
computeFeatureData()
computeFeatureData(
featureCollection
,sources
):void
Parameters
featureCollection
FeatureCollection
sources
string
[]
Returns
void
Defined in
src/contributors/MapContributor.ts:1648
computeSimpleModeFeature()
computeSimpleModeFeature(
featureCollection
,sources
,renderStrategy
,maxPages
?,whichPage
?):void
Parameters
featureCollection
FeatureCollection
sources
string
[]
renderStrategy
RenderStrategy
maxPages?
number
whichPage?
PageEnum
Returns
void
Defined in
src/contributors/MapContributor.ts:1899
computeTopologyData()
computeTopologyData(
featureCollection
,aggSource
):void
Parameters
featureCollection
FeatureCollection
aggSource
SourcesAgg
Returns
void
Defined in
src/contributors/MapContributor.ts:1694
downloadClusterSource()
downloadClusterSource(
source
):any
[]
Parameters
source
string
Returns
any
[]
Defined in
src/contributors/MapContributor.ts:1288
downloadLayerSource()
downloadLayerSource(
source
,layerName
,downloadType
,displayFieldNameMap
?):void
Parameters
source
string
layerName
string
downloadType
string
displayFieldNameMap?
Map
\<string
, string
>
Returns
void
Defined in
src/contributors/MapContributor.ts:1011
downloadSearchSource()
downloadSearchSource(
s
):any
[]
Parameters
s
string
Returns
any
[]
Defined in
src/contributors/MapContributor.ts:1393
downloadTopologySource()
downloadTopologySource(
s
):any
[]
Parameters
s
string
Returns
any
[]
Defined in
src/contributors/MapContributor.ts:1336
drawGeoSearch()
drawGeoSearch(
fromParam
?,appendId
?):void
Cleans all the old data, then it draws new fetched data using formParam
and appendId
Parameters
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:1988
exportSourceAsCSV()
exportSourceAsCSV(
features
,displayFieldNameMap
?):Blob
Parameters
features
any
[]
displayFieldNameMap?
Map
\<string
, string
>
Returns
Blob
Defined in
src/contributors/MapContributor.ts:1123
fetchAggSources()
fetchAggSources(
extent
,rawExtent
,zoom
,aggs
,aggType
):void
Parameters
extent
number
[]
rawExtent
number
[]
zoom
number
aggs
Map
\<string
, SourcesAgg
>
aggType
string
Returns
void
Defined in
src/contributors/MapContributor.ts:1589
fetchData()
fetchData(
collaborationEvent
?):Observable
\<any
>
Parameters
collaborationEvent?
CollaborationEvent
Returns
Observable
\<any
>
Overrides
Contributor.fetchData
Defined in
src/contributors/MapContributor.ts:296
fetchSearchSources()
fetchSearchSources(
filter
,searches
,renderStrategy
,maxPages
?,whichPage
?):void
Parameters
filter
Filter
searches
Map
\<string
, SourcesSearch
>
renderStrategy
RenderStrategy
maxPages?
number
whichPage?
PageEnum
Returns
void
Defined in
src/contributors/MapContributor.ts:1565
fetchTiledSearchSources()
fetchTiledSearchSources(
extent
,rawExtent
,searches
):void
Parameters
extent
number
[]
rawExtent
number
[]
searches
Map
\<string
, SourcesSearch
>
Returns
void
Defined in
src/contributors/MapContributor.ts:1522
getAdditionalFilter()
getAdditionalFilter():
Filter
Returns
Filter
Defined in
src/contributors/MapContributor.ts:289
getBoundsToFit()
getBoundsToFit(
elementidentifier
,collection
?):Observable
\<number
[][]>
Parameters
elementidentifier
collection?
string
Returns
Observable
\<number
[][]>
Defined in
src/contributors/MapContributor.ts:757
getConfigValue()
getConfigValue(
key
):any
Parameters
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:34
getFeatureToHightLight()
getFeatureToHightLight(
elementidentifier
):object
Parameters
elementidentifier
Returns
object
elementidentifier
elementidentifier:
object
elementidentifier.idFieldName
idFieldName:
string
elementidentifier.idValue
idValue:
string
=id
isleaving
isleaving:
boolean
Defined in
src/contributors/MapContributor.ts:765
getFilterDisplayName()
getFilterDisplayName():
string
Returns
string
Pretty name of contribution.
Overrides
Contributor.getFilterDisplayName
Defined in
src/contributors/MapContributor.ts:790
getFilterForCount()
getFilterForCount(
rawExtent
,wrappedExtent
,countGeoField
,ignoreCollab
):Filter
Parameters
rawExtent
string
wrappedExtent
string
countGeoField
string
ignoreCollab
boolean
= false
Returns
Filter
Defined in
src/contributors/MapContributor.ts:2028
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:41
getPackageName()
getPackageName():
string
Returns
string
Package name for the configuration service.
Overrides
Contributor.getPackageName
Defined in
src/contributors/MapContributor.ts:784
getPage()
getPage(
reference
,sort
,whichPage
,maxPages
):void
Get the previous/following set of data.
Parameters
reference
Map
\<string
, ItemDataType
>
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:1876
getReturnedGeometries()
getReturnedGeometries(
returnedGeometries
):Set
\<string
>
Parameters
returnedGeometries
string
Returns
Set
\<string
>
Defined in
src/contributors/MapContributor.ts:654
getWideModeData()
getWideModeData(
rawTestExtent
,wrapTestExtent
,mapLoadExtent
,mapLoadRawExtent
,zoom
,visibleSources
):void
Parameters
rawTestExtent
string
wrapTestExtent
string
mapLoadExtent
number
[]
mapLoadRawExtent
number
[]
zoom
number
visibleSources
Set
\<string
>
Returns
void
Defined in
src/contributors/MapContributor.ts:496
getWindowModeData()
getWindowModeData(
wrapExtent
,rawExtent
,visibleSources
,sort
,keepOldData
,afterParam
?,whichPage
?,maxPages
?,fromParam
?):void
Fetches the data for the Simple mode
Parameters
wrapExtent
any
rawExtent
any
visibleSources
Set
\<string
>
sort
string
comma separated field names on which feature are sorted.
keepOldData
boolean
= true
afterParam?
string
comma seperated field values from which next/previous data is fetched
whichPage?
PageEnum
Whether to fetch next or previous set.
maxPages?
number
fromParam?
any
(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:434
isMyLinkedContributorCollaboration()
isMyLinkedContributorCollaboration(
collaborationEvent
):boolean
Parameters
collaborationEvent
CollaborationEvent
Returns
boolean
Inherited from
Contributor.isMyLinkedContributorCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:37
isMyOwnCollaboration()
isMyOwnCollaboration(
collaborationEvent
):boolean
Parameters
collaborationEvent
CollaborationEvent
Returns
boolean
Inherited from
Contributor.isMyOwnCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:36
isUpdateEnabledOnOwnCollaboration()
isUpdateEnabledOnOwnCollaboration():
boolean
Returns
boolean
Overrides
Contributor.isUpdateEnabledOnOwnCollaboration
Defined in
src/contributors/MapContributor.ts:281
onChangeAoi()
onChangeAoi(
fc
):void
Beta
Runs when a geometry (bbox, polygon, ...) is drawn, removed or changed
This method is being tested. It will replace onChangeBbox
and onRemoveBbox
Parameters
fc
FeatureCollection
\<Geometry
| GeometryCollection
, {}>
FeatureCollection object
Returns
void
Defined in
src/contributors/MapContributor.ts:806
onChangeGeoQuery()
onChangeGeoQuery():
void
Applies the geoQueryOperation
Returns
void
Defined in
src/contributors/MapContributor.ts:601
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
moveParams
OnMoveResult
recalculateWindow
boolean
Returns
void
Defined in
src/contributors/MapContributor.ts:335
onMove()
onMove(
newMove
,recalculateWindow
):void
Parameters
newMove
OnMoveResult
recalculateWindow
boolean
Returns
void
Defined in
src/contributors/MapContributor.ts:870
renderAggSources()
renderAggSources(
sources
,isLastCall
):void
Renders the data of the given agg sources.
Parameters
sources
string
[]
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:878
renderClusterSources()
renderClusterSources(
sources
,isLastCall
):void
Renders the data of the given cluster sources.
Parameters
sources
string
[]
List of sources names (sources must be of the same type : cluster)
isLastCall
boolean
= false
Returns
void
Defined in
src/contributors/MapContributor.ts:1178
renderSearchSources()
renderSearchSources(
sources
):void
Render raw data provided by feature
mode sources. It's used for both simple and dynamic mode.
Parameters
sources
string
[]
List of sources names (sources must be of the same type : feature)
Returns
void
Defined in
src/contributors/MapContributor.ts:928
renderTopologySources()
renderTopologySources(
sources
):void
Renders the data of the given topology sources.
Parameters
sources
string
[]
List of sources names (sources must be of the same type : topology)
Returns
void
Defined in
src/contributors/MapContributor.ts:1049
resolveAggSources()
resolveAggSources(
visitedTiles
,aggId
,aggregation
):Observable
\<FeatureCollection
>
Parameters
visitedTiles
Set
\<string
>
aggId
string
aggregation
Aggregation
Returns
Observable
\<FeatureCollection
>
Defined in
src/contributors/MapContributor.ts:1487
resolveSearchSources()
resolveSearchSources(
filter
,searchId
,search
):Observable
\<FeatureCollection
>
Resolves data for features sources (used in simple mode only) using geosearch (arlas-api)
Parameters
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:1481
resolveTiledSearchSources()
resolveTiledSearchSources(
tiles
,searchId
,search
):Observable
\<FeatureCollection
>
Resolves data for features sources (used in dinamic mode only) using tiled geosearch (arlas-api)
Parameters
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:1448
saveJson()
saveJson(
json
,filename
,separator
?):void
Parameters
json
any
filename
string
separator?
string
Returns
void
Defined in
src/contributors/MapContributor.ts:1151
setAdditionalFilter()
setAdditionalFilter(
value
):void
Parameters
value
Filter
Returns
void
Defined in
src/contributors/MapContributor.ts:292
setData()
setData(
data
):void
Parameters
data
any
Returns
void
Overrides
Contributor.setData
Defined in
src/contributors/MapContributor.ts:659
setDataCellGeoaggregate()
setDataCellGeoaggregate(
features
):any
Parameters
features
any
[]
Returns
any
Defined in
src/contributors/MapContributor.ts:1866
setDrawings()
setDrawings(
collaboration
):void
Parameters
collaboration
Collaboration
Returns
void
Defined in
src/contributors/MapContributor.ts:667
setGeoQueryField()
setGeoQueryField(
geoQueryField
):void
Sets the geometry/point field to query
Parameters
geoQueryField
string
Returns
void
Defined in
src/contributors/MapContributor.ts:422
setGeoQueryOperation()
setGeoQueryOperation(
geoQueryOperation
):void
Sets the query operation to apply (within
, intersects
, notintersects
, notwithin
)
Parameters
geoQueryOperation
string
Returns
void
Defined in
src/contributors/MapContributor.ts:401
setLegendSearchData()
setLegendSearchData(
s
):void
Parameters
s
any
Returns
void
Defined in
src/contributors/MapContributor.ts:891
setName()
setName(
name
):void
Parameters
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:45
setSelection()
setSelection(
data
,collaboration
):any
Parameters
data
any
collaboration
Collaboration
Returns
any
Overrides
Contributor.setSelection
Defined in
src/contributors/MapContributor.ts:662
updateFromCollaboration()
updateFromCollaboration(
collaborationEvent
):void
Parameters
collaborationEvent
CollaborationEvent
Returns
void
Inherited from
Contributor.updateFromCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:62
wrap()
wrap(
n
,minimum
,maximum
):number
Parameters
n
number
minimum
number
maximum
number
Returns
number
Defined in
src/contributors/MapContributor.ts:794
getClusterAggregration()
static
getClusterAggregration(source
):Aggregation
Parameters
source
Returns
Aggregation
Defined in
src/contributors/MapContributor.ts:2233
getClusterSource()
static
getClusterSource(ls
):LayerClusterSource
Parameters
ls
Returns
LayerClusterSource
Defined in
src/contributors/MapContributor.ts:2160
getFeatureSearch()
static
getFeatureSearch(source
):Search
Parameters
source
Returns
Search
Defined in
src/contributors/MapContributor.ts:2352
getFeatureSource()
static
getFeatureSource(ls
):LayerFeatureSource
Parameters
ls
Returns
LayerFeatureSource
Defined in
src/contributors/MapContributor.ts:2213
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
rawExtent
string
wrappedExtent
string
geoQueryField
string
Returns
Filter
Defined in
src/contributors/MapContributor.ts:2007
getJsonSchema()
static
getJsonSchema():Object
Returns
Object
Defined in
src/contributors/MapContributor.ts:285
getTopologyAggregration()
static
getTopologyAggregration(source
):Aggregation
Parameters
source
Returns
Aggregation
Defined in
src/contributors/MapContributor.ts:2276
getTopologySource()
static
getTopologySource(ls
):LayerTopologySource
Parameters
ls
Returns
LayerTopologySource
Defined in
src/contributors/MapContributor.ts:2184