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

A map of markers, where some of the markers are hidden when the camera is zoomed far away. As you zoom in, more markers appear. Tiles are generated up to the specified maxLevel and the tiles are stored in memory. More...

Inheritance diagram for AltusUnified::ClusteredMarkerMap:
Collaboration diagram for AltusUnified::ClusteredMarkerMap:

Public Member Functions

 ClusteredMarkerMap (string name, VectorMarkerData markers, int clusterDistance, uint maxLevel, TargetImageFormat targetImageFormat, bool bHitTestingEnabled)
 Constructor More...
 
void setClusterDistance (int clusterDistance)
 Sets the cluster distance for this map. More...
 
void setMaxLevel (uint maxLevel)
 Sets the maximum level for this map. A higher level requires more memory but can store markers that are closer together. More...
 
void setTargetImageFormat (TargetImageFormat targetImageFormat)
 Sets the target image format for this map. More...
 
void setHitTestingEnabled (bool hitTestingEnabled)
 Enables or disables hit testing. More...
 
void updateMarkerRotation (string name, double rotation)
 Updates the rotation for a marker. More...
 
 Public Member Functions inherited from AltusUnified::MarkerMap
void setDelegate (MarkerMapDelegate delegate)
 Sets the delegate for this map. This must be called before adding the map to the scene. More...
 
void setDepthRead (BooleanState depthRead)
 Turns depth testing on or off for this map. When on, markers can be occluded by other geometry, such as terrain. However, it can be difficult to get desirable results with this. For best results, create markers with an altitude that is significantly above the terrain, and having an anchorPoint at the bottom of the marker. If the anchorPoint is in the middle of the marker and the marker has an altitude of 0, when the camera is tilted, half of the marker will be below the Earth surface and not invisible. More...
 
VectorMarkerData getVisibleMarkers ()
 Returns the list of markers in this map that are visible. More...
 
 Public Member Functions inherited from AltusUnified::Map
string getName ()
 Retrieves the name of this map. More...
 
void setAlpha (double alpha)
 Sets the alpha transparency of the map. More...
 
void setOrder (uint order)
 Set the map order (which maps get drawn first). More...
 
void setPriority (int priority)
 Set the map priority, used for queing downloads, for example. More...
 
void setMaxLevel (uint level)
 Sets the maximum level of the map. The higher the level, the more detail the map will display as you zoom in. More...
 
void setVisibility (bool visible)
 Sets the visibility of the map. More...
 
void setLightingParameters (float minLightness, bool nightAlphaMaskEnabled)
 Sets lighting parameters. More...
 
MapType getMapType ()
 Retrieves the type of this map. More...
 
void reload ()
 Reload this map. More...
 
void reloadRegion (BoundingBox boundingBox)
 Reload a region of this map. More...
 

Detailed Description

A map of markers, where some of the markers are hidden when the camera is zoomed far away. As you zoom in, more markers appear. Tiles are generated up to the specified maxLevel and the tiles are stored in memory.

Constructor & Destructor Documentation

AltusUnified::ClusteredMarkerMap::ClusteredMarkerMap ( string  name,
VectorMarkerData  markers,
int  clusterDistance,
uint  maxLevel,
TargetImageFormat  targetImageFormat,
bool  bHitTestingEnabled 
)

Constructor

Parameters
nameThe map name
markersList of markers to cluster
clusterDistanceA metric for how close markers can be before one of them is hidden.
maxLevelThe maximum tile level. A higher level requires more memory but can store markers that are closer together.
targetImageFormatThe image format of the marker's texture, if the texture is created internally in Altus. This can happen if the makers list contains markers with no textures and the delegate GetMarkerImage returns an image.
bHitTestingEnabledWhether or not markers are clickable. If so, the MarkerMapDelegate is called upon a marker click.

Member Function Documentation

void AltusUnified::ClusteredMarkerMap::setClusterDistance ( int  clusterDistance)

Sets the cluster distance for this map.

Parameters
clusterDistanceA metric for how close markers can be before one of them is hidden.
void AltusUnified::ClusteredMarkerMap::setHitTestingEnabled ( bool  hitTestingEnabled)

Enables or disables hit testing.

void AltusUnified::ClusteredMarkerMap::setMaxLevel ( uint  maxLevel)

Sets the maximum level for this map. A higher level requires more memory but can store markers that are closer together.

Parameters
maxLevelThe maximum tile level.
void AltusUnified::ClusteredMarkerMap::setTargetImageFormat ( TargetImageFormat  targetImageFormat)

Sets the target image format for this map.

Parameters
targetImageFormatThe image format used for marker textures that are created internally by Altus. This can happen if the map was created with markers that do not have textures and the delegate GetMarkerImage returns an image.
void AltusUnified::ClusteredMarkerMap::updateMarkerRotation ( string  name,
double  rotation 
)

Updates the rotation for a marker.

Parameters
nameThe name of the marker
rotationThe rotation, in degrees, from the default orientation of the marker (either from True North or screen space).