Class: MapView

MapView()

This class is an abstract class in charge of handling common Map operations.

Constructor

new MapView()

Source:

Extends

Methods

(protected) addEllipseToLayer(layer, ellipseObject)

Associate a ellipseId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Ellipse.props the Layer object
ellipseObject Object the Map ellipse object
Source:

addLayer(layer)

Adds a layer to the view. A broadcastChannel is going to listen the new dataSources
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

(protected) addMarkerToLayer(layer, markerObject)

Associate a markerId to a Layer for a fast lookup
Parameters:
Name Type Description
layer PointMarkerLayer.props the Layer object
markerObject Object the Map marker object
Source:

(protected) addPolylineToLayer(layer, polylineObject)

Associate a polylineId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Polyline.props the Layer object
polylineObject Object the Map polyline object
Source:

attachTo(divId)

Attach the view to a specific div. If the view has already been attached to a div, it will be removed from its current parent and will be attached to new one. Note: the onResize() is called at the end of the process.
Parameters:
Name Type Description
divId String The div element to attach to
Overrides:
Source:

getDataSourcesId() → {Array.<String>}

Gets the list of the dataSource ids contained into the view.
Overrides:
Source:
Returns:
The list of dataSource ids
Type
Array.<String>

getDivId() → {String}

Gets the div id of the DOM element.
Overrides:
Source:
Returns:
The div id of the view
Type
String

(protected) getEllipse(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Source:

(protected) getEllipsoids()

Get all ellpsoids contained in this view
Source:

getId() → {String}

Gets the inner id of the view object.
Overrides:
Source:
Returns:
The id of the view
Type
String

getLayer(layerId) → {Layer}

Get the Layer associated to its id
Parameters:
Name Type Description
layerId String the id of the Layer
Source:
Returns:
- the corresponding layer, null otherwise
Type
Layer

getLayerId(id) → {null|String}

Gets the the Layer id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Source:
Returns:
the Layer id
Type
null | String

(protected) getMarker(props)

Get the markerId associate to the Layer
Parameters:
Name Type Description
props PointMarkerLayer.props the Layer Object
Source:

getMarkerId(id) → {null|String}

Gets the the Marker id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Source:
Returns:
the marker id
Type
null | String

(protected) getMarkers()

Get all markers contained in this view
Source:

(protected) getPolyline(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Source:

(protected) getPolyline(layer)

Get the polyline associate to the Layer
Parameters:
Name Type Description
layer Polyline.props the Layer Object
Source:

(protected) getPolylines()

Get all polylines contained in this view
Source:

hide()

Hide the view
Overrides:
Source:

onMarkerHover(markerId, markerObject, layer, event)

Method to call onHover Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Source:

onMarkerLeftClick(markerId, markerObject, layer, event)

Method to call onLeftClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Source:

onMarkerMove(markerId, markerObject, layer, event)

Method to call onMove Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Source:

onMarkerRightClick(markerId, markerObject, layer, event)

Method to call onRightClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Source:

removeAllFromLayer(layer)

Remove Corresponding Layer
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

removeAllFromLayers()

Removes all view item from the view.
Overrides:
Source:

removeEllipsoids(ellipse)

Remove the ellipsoids corresponding to a EllipseLayer Layer
Parameters:
Name Type Description
ellipse Ellipse the layer to remove the ellipsoids from
Source:

(protected) removeMarkerFromLayer(marker)

Abstract method to remove a marker from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
marker Object The Map marker object
Source:

removeMarkers(layer)

Remove the markers corresponding to a PointMarker Layer
Parameters:
Name Type Description
layer PointMarkerLayer the layer to remove the markers from
Source:

(protected) removePolylineFromLayer(polyline)

Abstract method to remove a polyline from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
polyline Object The Map polyline object
Source:

removePolylines(polyline)

Remove the polylines corresponding to a PolylineLayer Layer
Parameters:
Name Type Description
polyline Polyline the layer to remove the polylines from
Source:

reset()

Calls for resetting the view.
Overrides:
Source:

setData(dataSourceId, data)

Set the data to the view. Each view has to handle the kind of the data separately.
Parameters:
Name Type Description
dataSourceId String The dataSource id of the source providing the data
data Array.<any> The data array to set
Overrides:
Source:

show(properties)

Show the view.
Parameters:
Name Type Description
properties Object A generic object
Overrides:
Source:

Events

beforeAddingItems

This method is called before attaching any view items passed as arguments in the constructor of the view.
Parameters:
Name Type Description
options Object A generic object to use
Overrides:
Source:

onResize

Callback called when the view is resized
Overrides:
Source: