Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 SDK Documentation | Builds | BA3 Home
AltusUnified::IVectorMapDelegate Class Reference

A delegate object for a VectorMap. If you create a sub-object of this type, you can receive hit detection events for the VectorMap. More...

Public Member Functions

void onLineSegmentHit (string mapName, string shapeId, GeographicPosition2D geoHitPoint, vec2d screenPoint, int segmentStartIndex, int segmentEndIndex)
 Callback for line segment hit More...
 
void onVertexHit (string mapName, string shapeId, GeographicPosition2D geoHitPoint, vec2d screenPoint, int vertexIndex)
 Callback for vertex hit More...
 
void onPolygonHit (VectorPolygonHit hits, GeographicPosition2D geoHitPoint, vec2d screenPoint)
 Callback for polygon hit More...
 
void onPolygonHit3d (VectorPolygonHit hits, vec2d screenPoint)
 Callback for polygon3d hit More...
 
bool polygonHitDetectionEnabled ()
 Retrieves whether hit detection is enabled for this polygon. More...
 
double lineSegmentHitTestPixelBufferDistance ()
 Retrieves the maximum allowable screen space distance between a click and the line for a hit to be registered, in points. More...
 
double vertexHitTestPixelBufferDistance ()
 Retrieves the maximum allowable screen space distance between a click and the line vertex for a hit to be registered, in points. More...
 

Detailed Description

A delegate object for a VectorMap. If you create a sub-object of this type, you can receive hit detection events for the VectorMap.

Member Function Documentation

double AltusUnified::IVectorMapDelegate::lineSegmentHitTestPixelBufferDistance ( )

Retrieves the maximum allowable screen space distance between a click and the line for a hit to be registered, in points.

void AltusUnified::IVectorMapDelegate::onLineSegmentHit ( string  mapName,
string  shapeId,
GeographicPosition2D  geoHitPoint,
vec2d  screenPoint,
int  segmentStartIndex,
int  segmentEndIndex 
)

Callback for line segment hit

Parameters
mapNameThe map which was clicked
shapeIdThe name of the shape that was clicked
geoHitPointThe geographic location of the click
screenPointThe screen space location of the click, in points.
segmentStartIndexThe segment of the line that was clicked.
void AltusUnified::IVectorMapDelegate::onPolygonHit ( VectorPolygonHit  hits,
GeographicPosition2D  geoHitPoint,
vec2d  screenPoint 
)

Callback for polygon hit

Parameters
hitsThe list of hits
geoHitPointThe geographic location of the click
screenPointThe screen space location of the click, in points.
void AltusUnified::IVectorMapDelegate::onPolygonHit3d ( VectorPolygonHit  hits,
vec2d  screenPoint 
)

Callback for polygon3d hit

Parameters
hitsDetails about which polygon was hit
screenPointThe point on the screen where the hit occurred
void AltusUnified::IVectorMapDelegate::onVertexHit ( string  mapName,
string  shapeId,
GeographicPosition2D  geoHitPoint,
vec2d  screenPoint,
int  vertexIndex 
)

Callback for vertex hit

Parameters
mapNameThe map which was clicked
shapeIdThe name of the shape that was clicked
geoHitPointThe geographic location of the click
screenPointThe screen space location of the click, in points.
vertexIndexThe vertex that was clicked
bool AltusUnified::IVectorMapDelegate::polygonHitDetectionEnabled ( )

Retrieves whether hit detection is enabled for this polygon.

double AltusUnified::IVectorMapDelegate::vertexHitTestPixelBufferDistance ( )

Retrieves the maximum allowable screen space distance between a click and the line vertex for a hit to be registered, in points.