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

A map where the tiles are specified by a tile provider. This map allows you to generate the data however you like, by creating a custom TileProvider. There are available TileProviders as well, such as the InternetTileProvider, for downloading tiles from a URL. More...

Inheritance diagram for AltusUnified::VirtualMap:
Collaboration diagram for AltusUnified::VirtualMap:

Public Member Functions

 VirtualMap (string name, MapDesc desc, TileProvider tileProvider)
 Constructor More...
 
MapDesc getDesc ()
 Retrieves the descriptor for this 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 applyVectorMapLineStyle (uint styleID, uint layerOrder, LineStyle style, double animationDuration)
 Apply a line style to the map. This is only applicable to virtual vector maps. More...
 
void applyVectorMapPolygonStyle (uint styleID, uint layerOrder, PolygonStyle style, double animationDuration)
 Apply a polygon style to the vector map. This is only applicable to virtual vector maps. More...
 
void setVectorWindingOrder (VectorWindingOrder windingOrder)
 Sets the vector winding order, which determines which directions the "front" of the polygon is, based on the order of the border vertices. This is only applicable to virtual vector maps. More...
 
void setDepthRead (BooleanState depthRead)
 Turns depth testing on or off for this map. This is only applicable to virtual vector maps and marker maps. See VectorMapBase::SetDepthRead and MarkerMap::SetDepthRead for more details. More...
 
void setTesselationThreshold (double thresholdInMeters)
 Sets the tesselation threshold for this map, in meters. Lines longer than this threshold are split up. This is only applicable to virtual vector maps. More...
 
void setStaticStyles (bool bStaticStyles)
 Tell the engine if the styles in this map will not be updated. This enables more efficient tile generation because the engine will not generate outlines for polygons if the style has no stroke or outline. The engine may or may not generate polygon interiors for styles when fillColor.alpha = 0 and may or may not generate any geometry for polygons with styles that do not exist in the map. In order to employ this optimization, you must create and add the map in the following order: 1. Create the Map 2. Apply line and vector styles to the map 3. Call SetStaticStyles(true) 3. Add the map to the Scene Calling SetStaticStyles(false) will not effect tiles which have already been generated but will remove the optimization for future tiles. You should be able to modify line and polygon colors if static styles are enabled, but you cannot add outlines or strokes to polygons which previously had no outline or stroke. 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...
 

Static Public Member Functions

static MapDesc defaultRasterMapDesc ()
 Retrieves the default raster map descriptor. More...
 
static MapDesc defaultVectorMapDesc ()
 Retrieves the default vector map descriptor. More...
 
static MapDesc defaultLabelMapDesc ()
 Retrieves the default label map descriptor. More...
 
static MapDesc defaultMarkerMapDesc ()
 Retrieves the default marker map descriptor. More...
 
static MapDesc defaultShadedReliefMapDesc ()
 Retrieves the default shaded relief map descriptor. More...
 
static MapDesc defaultTerrainMapDesc ()
 Retrieves the default terrain map descriptor. More...
 
static MapDesc defaultTawsMapDesc ()
 Retrieves the default taws map descriptor. More...
 

Detailed Description

A map where the tiles are specified by a tile provider. This map allows you to generate the data however you like, by creating a custom TileProvider. There are available TileProviders as well, such as the InternetTileProvider, for downloading tiles from a URL.

Constructor & Destructor Documentation

AltusUnified::VirtualMap::VirtualMap ( string  name,
MapDesc  desc,
TileProvider  tileProvider 
)

Constructor

Parameters
nameThe name of the map. This must be unique.
descA map descriptor. You can use DefaultRasterMapDesc() or similar to get a good MapDesc to start with. This determines what kind of data the map contains.
tileProviderThe tile provider which provides the data for the map.

Member Function Documentation

void AltusUnified::VirtualMap::applyVectorMapLineStyle ( uint  styleID,
uint  layerOrder,
LineStyle  style,
double  animationDuration 
)

Apply a line style to the map. This is only applicable to virtual vector maps.

Parameters
styleIDThe identifier for this style. All lines with this styleId will be updated.
layerOrderThe layer order of the style (to determine which vectors in the map are drawn first).
styleThe line style.
animationDurationThe animation duration for this style change.
void AltusUnified::VirtualMap::applyVectorMapPolygonStyle ( uint  styleID,
uint  layerOrder,
PolygonStyle  style,
double  animationDuration 
)

Apply a polygon style to the vector map. This is only applicable to virtual vector maps.

Parameters
styleIDThe identifier for this style. All polygons with this styleId will be updated.
layerOrderThe layer order of the style (to determine which vectors in the map are drawn first).
styleThe polygon style.
animationDurationThe animation duration for this style change.
static MapDesc AltusUnified::VirtualMap::defaultLabelMapDesc ( )
static

Retrieves the default label map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultMarkerMapDesc ( )
static

Retrieves the default marker map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultRasterMapDesc ( )
static

Retrieves the default raster map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultShadedReliefMapDesc ( )
static

Retrieves the default shaded relief map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultTawsMapDesc ( )
static

Retrieves the default taws map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultTerrainMapDesc ( )
static

Retrieves the default terrain map descriptor.

static MapDesc AltusUnified::VirtualMap::defaultVectorMapDesc ( )
static

Retrieves the default vector map descriptor.

MapDesc AltusUnified::VirtualMap::getDesc ( )

Retrieves the descriptor for this map.

void AltusUnified::VirtualMap::setDepthRead ( BooleanState  depthRead)

Turns depth testing on or off for this map. This is only applicable to virtual vector maps and marker maps. See VectorMapBase::SetDepthRead and MarkerMap::SetDepthRead for more details.

void AltusUnified::VirtualMap::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.

Parameters
levelThe maximum level.
void AltusUnified::VirtualMap::setOrder ( uint  order)

Set the map order (which maps get drawn first).

void AltusUnified::VirtualMap::setPriority ( int  priority)

Set the map priority, used for queing downloads, for example.

Parameters
priorityLower means higher priority
void AltusUnified::VirtualMap::setStaticStyles ( bool  bStaticStyles)

Tell the engine if the styles in this map will not be updated. This enables more efficient tile generation because the engine will not generate outlines for polygons if the style has no stroke or outline. The engine may or may not generate polygon interiors for styles when fillColor.alpha = 0 and may or may not generate any geometry for polygons with styles that do not exist in the map. In order to employ this optimization, you must create and add the map in the following order: 1. Create the Map 2. Apply line and vector styles to the map 3. Call SetStaticStyles(true) 3. Add the map to the Scene Calling SetStaticStyles(false) will not effect tiles which have already been generated but will remove the optimization for future tiles. You should be able to modify line and polygon colors if static styles are enabled, but you cannot add outlines or strokes to polygons which previously had no outline or stroke.

void AltusUnified::VirtualMap::setTesselationThreshold ( double  thresholdInMeters)

Sets the tesselation threshold for this map, in meters. Lines longer than this threshold are split up. This is only applicable to virtual vector maps.

Parameters
thresholdInMeterstesselation threshold in meters
void AltusUnified::VirtualMap::setVectorWindingOrder ( VectorWindingOrder  windingOrder)

Sets the vector winding order, which determines which directions the "front" of the polygon is, based on the order of the border vertices. This is only applicable to virtual vector maps.

Parameters
windingOrderThe winding order.