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 vectorLayer
Object layer in which the feature will be added
pointsArray
Array points that compose the geometry
featureOptions
Object 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 markerLayer
Object the map layer object where the marker will be
addedmarkerData
Object 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 name
String the name of the layer
-
<static> addVectorLayerToMap(name)
-
Adds a vector layer to the map.
Parameters:
Name Type Description name
String 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 name
String The layer name
url
String The WMS formatted 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 position
Object contains lat and lon
To
Boolean check if the position is already visibile on the map
-
<static> deleteLastPhotogrammetryItem()
-
Deletes the last photogrammetry item that was created, do not overwrite
it unless you need to do more. -
<static> deletePhotogrammetryItem(id)
-
Deletes a photogrammetry item by it's id, do not overwrite it unless you
need to do more. *Parameters:
Name Type Description id
-
<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: [{ fillColor: eg: '#000000' for
polygons color to fill strokeColor: for polygons and lines stroke color
strokeWidth strokeDashstyle: string: [“”, “-”, “.”, “-.”, “-..”, “. ”, “- ”,
“--”, “- .”, “--.”, “--..”] externalGraphic: path to image pointRadius:
if point radius graphicName: square, circle, triangle, star, cross, x,
image, font(ex: "ttf://ESRI Default Marker#0x0021") label: string
${labelName} }] }] -
<static> getCurrentZoomLevel()
-
Returns the current map zoom level.
Returns:
current zoom level. The zoom level must be a number
between 0(min zoom) and 24(max zoom).- Type
- Number
-
<static> getMapScale()
-
Returns the current map scale
Returns:
The current scale of the map. The scale of a map is
defined as the ratio of a single unit of distance on the map to
the corresponding distance on the ground. The SDK assumes that
the unit of distance on the ground is 1 meter. The SDK uses this
value to adjust the size of markers(eg. image orientation
geometry) to a proper size.- Type
- Number
-
<static> getProjectionCandidates(position)
-
Returns an array of features to pe projected wrapped inside a custom
objectParameters:
Name Type Description position
-
<static> hideImajnetItem(id)
-
Will hide a html element
Parameters:
Name Type Description id
String HTML element id
-
<static> highlightFeatureOnImage(featureWrapper)
-
Handler triggered by client when the mouse is over a feature for
highlight correspondent object on imajnet image, do not overwrite itParameters:
Name Type Description featureWrapper
Object imajnet object that wraps the feature to be
selected. -
<static> imajnetLoginError(jqxhr)
-
Handler when imajnet login error
Parameters:
Name Type Description jqxhr
Object jquery response
-
<static> imajnetLoginSuccess()
-
Handler when imajnet login success
-
<static> imajnetLogoutComplete()
-
Handler when imajnet logout complete
-
<static> onFeatureClick(featureWrapper)
-
When feature clicked on image
Parameters:
Name Type Description featureWrapper
Object imajnet object that wraps the feature to be
selected. -
<static> onFeatureMouseOut(featureWrapper)
-
Handler when the mouse leaves a feature on imajnet image
Parameters:
Name Type Description featureWrapper
Object -
<static> onFeatureMouseOver(featureWrapper, event, jQuery)
-
Handler when the mouse is over a feature on imajnet image
Parameters:
Name Type Description featureWrapper
Object event
event that trigger mouse over
jQuery
hoveredElement element from image
-
<static> onImageChange(position)
-
Custom handler after imajnet image change
Parameters:
Name Type Description position
Object current imajnet position
-
<static> onImajnetActivated()
-
Handler after the imajnet plugin was activated
-
<static> onImajnetDeactivated()
-
Handler after the imajnet plugin was deactivated
-
<static> onMeasurementCreated(customData)
-
Handler after a measurement was created
Parameters:
Name Type Description customData
Object {id, measurement - size of the measurement,
precision, firstPoint, secondPoint} -
<static> onPinPointCreated(customData)
-
Handler after a pinpoint was created
Parameters:
Name Type Description customData
Object {id, point - lon lat object}
-
<static> onPolyligneCreated(customData)
-
handler after a polyligne was created
Parameters:
Name Type Description customData
Object {id, pointsArray - Array of lon lat objects, type:
LineString or Polygon} -
<static> positionImageOnFeature(featureWrapper)
-
Handler triggered by client when the mouse is over a feature for
highlight correspondent object on imajnet image, do not overwrite itParameters:
Name Type Description featureWrapper
Object imajnet object that wraps the feature to be
selected. -
<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 vectorLayer
Object 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 markerLayer
Object 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 vectorLayer
Object The layer from which the features will be removed
featuresArray
Array 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 layer
Object to be removed from map
-
<static> removeMarker(markerLayer, markerWrapper)
-
Removes a marker from a layer
Parameters:
Name Type Description markerLayer
Object layer object from which the marker will be
removedmarkerWrapper
Object custom objects that wraps the marker
-
<static> selectFeature(vectorLayer, featureWrapper)
-
Selects a feature on the map
Parameters:
Name Type Description vectorLayer
Object the vector layer on the map to which the feature
belongs tofeatureWrapper
Object imajnet object that wraps the feature to be
selected. -
<static> selectMarker(markerLayer, markerWrapper)
-
Selects a marker on the map
Parameters:
Name Type Description markerLayer
Object layer object that contains the marker
markerWrapper
Object custom object that wraps the marker
-
<static> selectPolygonFeature(vectorLayer, featureWrapper)
-
[DEPRECATED] Use selectFeature instead Selects a polygon feature on the
mapParameters:
Name Type Description vectorLayer
Object the vector layer on the map to which the feature
belongs tofeatureWrapper
Object imajnet object that wraps the feature to be
selected. -
<static> setFeatureColor(vectorLayer, featureWrapper, color)
-
[DEPRECATED] Use selectFeature instead Sets the feature color for a given
feature. Used for selection/unselection and highlight of features.Parameters:
Name Type Description vectorLayer
Object object to which the feature belongs to
featureWrapper
Object custom object that wraps the feature
color
String 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 layer
Object layer object for which to set the zIndex
zIndex
Number -
<static> showImajnetItem(id)
-
Will show a html element
Parameters:
Name Type Description id
String html element id
-
<static> unHighlightFeatureOnImage(featureWrapper)
-
Handler triggered by client when the mouse is out a feature for highlight
correspondent object on imajnet image, do not overwrite itParameters:
Name Type Description featureWrapper
Object imajnet object that wraps the feature to be
selected. -
<static> unregisterMapEvents()
-
Unregisters the imajnet map event handlers
-
<static> unselectFeature(vectorLayer, featureWrapper)
-
Unselects a map feature
Parameters:
Name Type Description vectorLayer
Object the vector layer to which the feature belongs to
featureWrapper
Object 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 markerLayer
Object layer object that contains the marker
markerWrapper
Object custom object that wraps the marker
-
<static> unselectPolygonFeature(vectorLayer, featureWrapper)
-
[DEPRECATED] Use unselectFeature instead Unselects a polygon feature on
mapParameters:
Name Type Description vectorLayer
Object the vector layer to which the feature belongs to
featureWrapper
Object 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 zoomLevel
Number zoom level. The zoom level is a number between 0(min
zoom) and 24(max zoom). -
<static> zoomMapToFeatureWrapper(featureWrapper)
-
Zooms the underlying map to the given zoom level
Parameters:
Name Type Description featureWrapper
Object The featureWrapper contains the feature or
feature reference to which the map needs to be zoomed to. The
featureWrapper object is a FeatureWrapper instance previously
returned by a create marker or a create feature operation.