new ImajnetPlugin()
Must be overwrited by the user with custom implementations
Methods
-
<static> addActiveState()
-
Add an active state to a html element
-
<static> addFeature(vectorLayer, pointsArray, featureOptions)
-
This will add a feature (ex: line projection, imajbox triangle, oriented images, sequence traces) to a layer.
If featureOptions.type is LineString or Polygon pointsArray will be an array of objects({x, y}).
If featureOptions.type is MultiPolygon pointsArray will be an array of arrays(objects({x, y})
Parameters:
Name Type Description vectorLayerObject layer in which the feature will be added
pointsArrayArray points that compose the geometry
featureOptionsObject the parameter options for creating the feature {type: eg: 'Point, LineString, Polygon', 'MultiPolygon', zIndex, fillColor: , fillOpacity}
-
<static> addMarker(markerLayer, markerData)
-
This function will add to map photogrammetry position and clicked point when in oriented images mode.
Parameters:
Name Type Description markerLayerObject the map layer object where the marker will be added
markerDataObject lon - longitude position lat - latitude position type - 'clickPositionOnMap(eg: click position on map when oriented images active), 'imagePoint'(eg: )' imagePath - imagePath,
size: {width: number, height: number}, onMouseOver - handler to be called on mouse over, onMouseOut - handler to be called on mouse out, onClick - handler to be called on click -
<static> addMarkerLayerToMap(name)
-
Adds a marker layer to the map.
Parameters:
Name Type Description nameString the name of the layer
-
<static> addVectorLayerToMap(name)
-
Adds a vector layer to the map.
Parameters:
Name Type Description nameString the name of the vector layer to be created and added to the map
-
<static> addWMSLayerToMap(name, url)
-
Adds a wms layer to the map
Parameters:
Name Type Description nameString layer name
urlString layer url
-
<static> afterImajnetLayersAddedToMap()
-
Handler after the all the imajnet layers have been added to the map
-
<static> centerMapToPosition(position, To)
-
Centers the map on the given position
Parameters:
Name Type Description positionObject contains lat and lon
ToBoolean check if the position is already visibile on the map
-
<static> deleteLastPhotogrammetryItem()
-
Handler for deleting last photogrammetry item, do not overwrite it
-
<static> deletePhotogrammetryItem()
-
Handler for deleting photogrammetry item, do not overwrite it
- @param objectId
-
<static> drawUserProjections()
-
Returns a Deferred object. When resolved passes the projections response and an array of objects
projections(imajnet format), array[{ feature: feature, id: projectionId, style: [styles] }] -
<static> getCurrentZoomLevel()
-
Returns the current map zoom level.
Returns:
current zoom level
- Type
- Number
-
<static> getMapScale()
-
Returns the current map scale
Returns:
current map scale;
- Type
- Number
-
<static> getMapSize()
-
Will return map size in pixels (width and height)
Example
{ w: 1000, h: 580 } -
<static> getProjectionCandidates(position)
-
Returns an array of features to pe projected wrapped inside a custom object
Parameters:
Name Type Description position -
<static> hideImajnetItem(id)
-
Will hide a html element
Parameters:
Name Type Description idString HTML element id
-
<static> imajnetLoginError(jqxhr)
-
Handler when imajnet login error
Parameters:
Name Type Description jqxhrObject jquery response
-
<static> imajnetLoginSuccess()
-
Handler when imajnet login success
-
<static> imajnetLogoutComplete()
-
Handler when imajnet logout complete
-
<static> onFeatureMouseout(featureWrapper)
-
Handler when the mouse leaves a projection(line or polygon)
Parameters:
Name Type Description featureWrapperObject imajnet object that wraps the feature to be selected.
-
<static> onFeatureMouseover(featureWrapper)
-
Handler when the mouse is over a projection(line or polygon)
Parameters:
Name Type Description featureWrapperObject imajnet object that wraps the feature to be selected.
-
<static> onImageChange(position)
-
Custom handler after imajnet image change
Parameters:
Name Type Description positionObject current imajnet position
-
<static> onImajnetActivated()
-
Handler after the imajnet plugin was activated
-
<static> onImajnetDeactivated()
-
Handler after the imajnet plugin was deactivated
-
<static> onImajnetDeactivated()
-
Handler when imajnet deactivated complete
-
<static> onItemMouseOut(event, hoveredElement, featureWrapperId)
-
Handler when the mouse leaves a projection(point)
Parameters:
Name Type Description eventObject mouse event
hoveredElementObject html element
featureWrapperIdString -
<static> onItemMouseOver(event, hoveredElement, featureWrapperId)
-
Handler when the mouse is over a projection(point)
Parameters:
Name Type Description eventObject mouse event
hoveredElementObject html element
featureWrapperIdString -
<static> onMeasurementCreated(customData)
-
Handler after a measurement was created
Parameters:
Name Type Description customDataObject {objectId, measurement - size of the measurement, precision, firstPoint, secondPoint}
-
<static> onPinPointCreated(customData)
-
Handler after a pinpoint was created
Parameters:
Name Type Description customDataObject {objectId, point - lon lat object}
-
<static> onPolyligneCreated(customData)
-
handler after a polyligne was created
Parameters:
Name Type Description customDataObject {objectId, pointsArray - Array of lon lat objects, type: LineString or Polygon}
-
<static> redrawLayer()
-
Forces a layer redraw
-
<static> registerMapEvents()
-
Registers the imajnet map events to the underlying map component.
-
<static> removeActiveState()
-
Remove an active state from a html element
-
<static> removeAllFeatures(vectorLayer)
-
Removes all the features contained by the given vector layer.
Parameters:
Name Type Description vectorLayerObject the vector layer on the map from which all the features will be removed
-
<static> removeAllMarkersFromLayer(markerLayer)
-
Removes all markers from a layer
Parameters:
Name Type Description markerLayerObject layer object from which the marker will be removed
-
<static> removeFeatures(vectorLayer, featuresArray)
-
Removes a list of features from the given vector layer.
Parameters:
Name Type Description vectorLayerObject The layer from which the features will be removed
featuresArrayArray The array of features to be removed. The features are wrapped inside imajnet FeatureWrapper objects.
-
<static> removeLayerFromMap(layer)
-
Removes a layer from the map
Parameters:
Name Type Description layerObject to be removed from map
-
<static> removeMarker(markerLayer, markerWrapper)
-
Removes a marker from a layer
Parameters:
Name Type Description markerLayerObject layer object from which the marker will be removed
markerWrapperObject custom objects that wraps the marker
-
<static> selectFeature(vectorLayer, featureWrapper)
-
Selects a feature on the map
Parameters:
Name Type Description vectorLayerObject the vector layer on the map to which the feature belongs to
featureWrapperObject imajnet object that wraps the feature to be selected.
-
<static> selectMarker(markerLayer, markerWrapper)
-
Selects a marker on the map
Parameters:
Name Type Description markerLayerObject layer object that contains the marker
markerWrapperObject custom object that wraps the marker
-
<static> selectPolygonFeature(vectorLayer, featureWrapper)
-
Selects a polygon feature on the map
Parameters:
Name Type Description vectorLayerObject the vector layer on the map to which the feature belongs to
featureWrapperObject imajnet object that wraps the feature to be selected.
-
<static> setFeatureColor(vectorLayer, featureWrapper, color)
-
Sets the feature color for a given feature. Used for selection/unselection and highlight of features.
Parameters:
Name Type Description vectorLayerObject object to which the feature belongs to
featureWrapperObject custom object that wraps the feature
colorString the desired color in hex format
-
<static> setLayerZIndex(layer, zIndex)
-
Set zindex for a layer to be able to order them
Parameters:
Name Type Description layerObject layer object for which to set the zIndex
zIndexNumber -
<static> showImajnetItem(id)
-
Will show a html element
Parameters:
Name Type Description idString html element id
-
<static> unregisterMapEvents()
-
Unregisters the imajnet map event handlers
-
<static> unselectFeature(vectorLayer, featureWrapper)
-
Unselects a map feature
Parameters:
Name Type Description vectorLayerObject the vector layer to which the feature belongs to
featureWrapperObject imajnet object that wraps the feature to be un-selected.
-
<static> unselectMarker(markerLayer, markerWrapper)
-
Remove selection for a marker on the map
Parameters:
Name Type Description markerLayerObject layer object that contains the marker
markerWrapperObject custom object that wraps the marker
-
<static> unselectPolygonFeature(vectorLayer, featureWrapper)
-
Unselects a polygon feature on map
Parameters:
Name Type Description vectorLayerObject the vector layer to which the feature belongs to
featureWrapperObject imajnet object that wraps the feature to be un-selected.
-
<static> zoomMapTo(zoomLevel)
-
Zooms the underlying map to the given zoom level
Parameters:
Name Type Description zoomLevelNumber zoom level
-
<static> zoomMapToFeatureWrapper(featureWrapper, onlyIfNotVisible)
-
Zooms the underlying map to the given zoom level
Parameters:
Name Type Description featureWrapperObject onlyIfNotVisibleBoolean
Imajnet JavaScript SDK