If true
adds a Background Mesh for each tile
true
if the canvas contains an alpha (transparency) buffer or not. Default is false
.
Set tiling scheme for BackgroundDataSource
The canvas element used to render the scene.
User-defined camera clipping planes distance evaluator. If not defined, TiltViewClipPlanesEvaluator will be used by MapView.
An optional canvas element that renders 2D collision debug information.
Optional WebGL Rendering Context. (https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext)
Antialias settings for the map rendering. It is better to disable the native antialiasing if the custom antialiasing is enabled.
The number of Web Workers used to decode data. The default is
CLAMP(navigator.hardwareConcurrency
- 1, 1, 2).
The URL of the script that the decoder worker runs. The default URL is
./decoder.bundle.js
.
Relative URIs are resolved to full URL using the document's base URL (see: https://www.w3.org/TR/WD-html40-970917/htmlweb.html#h-5.1.2).
Enable that new labels are delayed until movement is finished
Disable all fading animations for debugging and performance measurement.
Set fixed pixel ratio for rendering when the camera is moving or an animation is running. Useful when rendering on high resolution displays with low performance GPUs that may be fill-rate limited.
If a value is specified, a low resolution render pass is used to render the scene into a low resolution render target, before it is copied to the screen.
A value of undefined
disables the low res render pass. Values between 0.5 and
window.devicePixelRatio
can be tried to give good results. The value should not be larger
than window.devicePixelRatio
.
Set true to enable rendering mixed levels of detail (increases rendering performance). If not set will enable mixed levels of detail for spherical projection and disable for other projections.
Whether the native WebGL antialiasing should be enabled. It is better to disable it if the MapView's MSAA is enabled.
Set to true
to allow picking of technique information associated with objects.
Should be the PolarTileDataSource used on spherical projection.
Default is true
.
Enable shadows in the map. Shadows will only be casted on features that use the "standard" or "extruded-polygon" technique in the map theme.
Set to true
to measure performance statistics.
Set to true to extend the frustum culling. This improves the rejection of some tiles, which normal frustum culling cannot detect. You can disable this property to measure performance.
The path to the font catalog file.
How to calculate the Field of View, if not specified, then DEFAULT_FOV_CALCULATION is used.
The maximum scaling factor that may be applied to TextElements due to their distance. If not defined the default value specified in TextElementsRenderer will be used.
The minimum scaling factor that may be applied to TextElements due to their distance. If not defined the default value specified in TextElementsRenderer will be used.
If enableMixedLod is true
, this value will be used to calculate the minimum Pixel Size of a
tile regarding to the screen size. When the area of a tile is smaller then this calculated
area on the screen, the subdivision of tiles is stopped and therefore higher level tiles will
be rendered instead.
If set, the view will constrained within the given bounds in geo coordinates.
The maximum distance for TextElement with icons to be rendered, expressed as a fraction of the distance between the near and far plane [0, 1.0].
The maximum distance for TextElement to be rendered, expressed as a fraction of the distance between the near and far plane [0, 1.0].
Set maximum FPS (Frames Per Second). If VSync in enabled, the specified number may not be
reached, but instead the next smaller number than maxFps
that is equal to the refresh rate
divided by an integer number.
E.g.: If the monitors refresh rate is set to 60hz, and if maxFps
is set to a value of 40
(60hz/1.5), the actual used FPS may be 30 (60hz/2). For displays that have a refresh rate of
60hz, good values for maxFps
are 30, 20, 15, 12, 10, 6, 3 and 1. A value of 0
is ignored.
Optional limit of number of glyphs (characters) for labels. In situations with limited, available memory, decreasing this number may be beneficial.
Limits the number of DataSource labels visible, such as road names and POIs. On small devices, you can reduce this number to to increase performance.
The maximum distance to the screen border as a fraction of screen size [0..1].
The maximum number of tiles rendered from one data source at a time.
The maximum zoom level. The default is 14
.
Determines the minimum camera height, in meters.
Optional initial number of glyphs (characters) for labels. In situations with limited, available memory, decreasing this number may be beneficial.
The minimum zoom level; default is 1
.
Maximum timeout, in milliseconds, before a [[MOVEMENT_FINISHED_EVENT]] is sent after the latest frame with a camera movement. The default is 300ms.
Set fixed pixel ratio for rendering. Useful when rendering on high resolution displays with low performance GPUs that may be fill-rate limited.
Storage level offset of regular tiles from reference datasource to align
PolarTileDataSource tiles to.
Default is -1
.
The name of the [[StyleSet]] used by PolarTileDataSource
to evaluate for the decoding.
Default is "polar"
.
Sets the data sources to use specific country point of view (political view).
This option may result in rendering different country borders then commonly accepted for some regions and it mainly regards to so called disputed borders. Although not all data sources or themes may support it.
Hint for the WebGL implementation on which power mode to prefer.
Preserve the buffers until they are cleared manually or overwritten.
Set to true
in order to copy MapView canvas contents
to an image or another canvas.
Projection
used by the MapView
.
The default value is mercatorProjection.
Limits the number of higher zoom levels (more detailed) to be searched for fallback tiles.
When zooming out, newly elected tiles may have not yet loaded. MapView searches through the tile cache for tiles ready to be displayed in higher zoom levels. These tiles may be located deeper in the quadtree.
To disable a cache search, set the value to 0
.
Limits the number of reduced zoom levels (lower detail) to be searched for fallback tiles.
When zooming in, newly elected tiles may have not yet loaded. MapView searches through the tile cache for tiles ready to be displayed in lower zoom levels. The tiles may be located shallower in the quadtree.
To disable a cache search, set the value to 0
.
Specify if the cache should be counted in tiles or in megabytes.
If true
, a replacement glyph ("?") is rendered for every missing glyph.
Set to true
to allow rendering scene synchronously.
By calling renderSync()
scene draws immediately, opposite to default case when
update
method requests redraw and waits for the next animation frame.
You need to set up your own render loop controller.
Event MapViewEventNames.Update
fired when MapView requests for an redraw.
E.g.: When tiles loaded asynchronously and ready for rendering.
The {@link @here/harp-datasource-protocol#Theme} used by Mapview.
This Theme can be one of the following:
string
: the URI of the theme file used to style this mapTheme
: the Theme
object already loadedPromise<Theme>
: the future Theme
objectundefined
: the theme is not yet set up, but can be set later. Rendering waits until
the theme is set.Note: Layers that use a theme do not render any content until that theme is available.
Relative URIs are resolved to full URL using the document's base URL (see: https://www.w3.org/TR/WD-html40-970917/htmlweb.html#h-5.1.2).
Custom URIs (of theme itself and of resources referenced by theme) may be resolved with help of uriResolver.
Enable throttling for the TaskScheduler
Size of a tile cache for one data source.
Enable map repeat for planar projections.
If true
, map will be repeated in longitudinal direction continuously.
If false
, map will end on lon -180 & 180 deg.
Resolve URI
referenced in MapView
assets using this resolver.
Use, to support application/deployment specific URI
s into actual URLs
that can be loaded
with fetch
.
Example:
uriResolver: new PrefixMapUriResolver({
"local://poiMasterList": "/assets/poiMasterList.json",
// will match only 'local//:poiMasterList' and
// resolve to `/assets/poiMasterList.json`
"local://icons/": "/assets/icons/"
// will match only 'local//:icons/ANYPATH' (and similar) and
// resolve to `/assets/icons/ANYPATH`
})
Generated using TypeDoc
User configuration for the MapView.