Optional
addIf true
adds a Background Mesh for each tile
true
Optional
alphatrue
if the canvas contains an alpha (transparency) buffer or not. Default is false
.
Optional
backgroundSet tiling scheme for [[BackgroundDataSource]]
Optional
boundsFit MapView to these boundaries.
If specified, zoomLevel
and distance
parameters are ignored and lookAt
calculates best
zoomLevel
to fit given bounds.
if bounds
is @xyzmaps/harp-geoutils#GeoBox, then lookAt
use target or bounds.target
and
ensure whole box is visible
if bounds
is @xyzmaps/harp-geoutils#GeoPolygon, then lookAt
use bounds.getCentroid()
and ensure whole polygon is visible
if bounds
is @xyzmaps/harp-geoutils#GeoBoxExtentLike,
then lookAt
will use target or
current target and ensure whole extents are visible
if bounds
is [[GeoCoordLike]][], then lookAt
will use target or
calculated target
as center of world box covering given points and ensure all points are
visible
Note in sphere projection some points are not visible if you specify bounds that span more than 180 degrees in any direction.
(MapView.lookAt:WITH_PARAMS) for details on how bounds
interact with target
parameter
The canvas element used to render the scene.
Optional
clipUser-defined camera clipping planes distance evaluator. If not defined, TiltViewClipPlanesEvaluator will be used by MapView.
{@link TiltViewClipPlanesEvaluator}
Optional
collisionAn optional canvas element that renders 2D collision debug information.
Optional
contextOptional WebGL Rendering Context. (https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext)
Optional
customAntialias settings for the map rendering. It is better to disable the native antialiasing if the custom antialiasing is enabled.
Optional
decoderThe number of Web Workers used to decode data. The default is
CLAMP(navigator.hardwareConcurrency
- 1, 1, 2).
Optional
decoderThe 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).
Optional
delayEnable that new labels are delayed until movement is finished
true
Optional
disableDisable all fading animations for debugging and performance measurement.
false
Optional
distanceCamera distance to the target point in world units.
zoomLevel defaults will be used if not set.
Optional
dynamicSet 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
.
Since no anti-aliasing is applied during dynamic rendering with dynamicPixelRatio
defined, visual artifacts may occur, especially with thin lines..
The resolution of icons and text labels is not affected.
undefined
Optional
enableSet 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.
undefined
Optional
enableWhether the native WebGL antialiasing should be enabled. It is better to disable it if the MapView's MSAA is enabled.
true
for pixelRatio
< 2.0
, false
otherwise.
Optional
enableSet to true
to allow picking of technique information associated with objects.
Optional
enableShould be the PolarTileDataSource used on spherical projection.
Default is true
.
Optional
enableNot needed anymore, roads can be picked by default.
Optional
enableEnable shadows in the map. Shadows will only be casted on features that use the "standard" or "extruded-polygon" technique in the map theme.
false
Optional
enableSet to true
to measure performance statistics.
Optional
extendedSet 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.
true
Optional
fontThe path to the font catalog file.
Optional
fovHow to calculate the Field of View, if not specified, then [[DEFAULT_FOV_CALCULATION]] is used.
Optional
headingHeading angle in degrees and clockwise. 0 is north-up.
0 in {@link MapView.constructor} context.
{@link MapView.heading} in {@link (MapView.lookAt:WITH_PARAMS)} context.
Optional
labelThe 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.
[[DEFAULT_LABEL_DISTANCE_SCALE_MAX]].
Optional
labelThe 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.
[[DEFAULT_LABEL_DISTANCE_SCALE_MIN]].
Optional
languagesOptional
Beta
lodIf 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.
256
Optional
maxIf set, the view will constrained within the given bounds in geo coordinates.
Optional
maxThe 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].
[[DEFAULT_MAX_DISTANCE_RATIO_FOR_LABELS]].
Optional
maxThe maximum distance for TextElement to be rendered, expressed as a fraction of the distance between the near and far plane [0, 1.0].
[[DEFAULT_MAX_DISTANCE_RATIO_FOR_LABELS]].
Optional
maxSet 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
maxOptional limit of number of glyphs (characters) for labels. In situations with limited, available memory, decreasing this number may be beneficial.
[[MAX_GLYPH_COUNT]]
Optional
maxLimits the number of DataSource labels visible, such as road names and POIs. On small devices, you can reduce this number to to increase performance.
undefined
(no limit).
Optional
maxThe maximum distance to the screen border as a fraction of screen size [0..1].
[[DEFAULT_MAX_DISTANCE_TO_BORDER]].
Optional
maxThe maximum number of tiles rendered from one data source at a time.
See [[MapViewDefaults.maxVisibleDataSourceTiles]].
Optional
maxThe maximum zoom level. The default is 14
.
Optional
minDetermines the minimum camera height, in meters.
Optional
minOptional initial number of glyphs (characters) for labels. In situations with limited, available memory, decreasing this number may be beneficial.
[[MIN_GLYPH_COUNT]]
Optional
minThe minimum zoom level; default is 1
.
Optional
movementMaximum timeout, in milliseconds, before a [[MOVEMENT_FINISHED_EVENT]] is sent after the latest frame with a camera movement. The default is 300ms.
Optional
pixelSet fixed pixel ratio for rendering. Useful when rendering on high resolution displays with low performance GPUs that may be fill-rate limited.
window.devicePixelRatio
Optional
polarStorage level offset of regular tiles from reference datasource to align
PolarTileDataSource tiles to.
Default is -1
.
Optional
polarThe name of the [[StyleSet]] used by PolarTileDataSource
to evaluate for the decoding.
Default is "polar"
.
Optional
politicalSets 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.
Country code should be coded in lower-case ISO 3166-1 alpha-2 standard, if this option
is undefined
the majority point of view will be used.
Optional
powerHint for the WebGL implementation on which power mode to prefer.
Optional
preservePreserve 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.
Optional
projectionProjection
used by the MapView
.
The default value is [[mercatorProjection]].
Optional
quadLimits 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
.
[[MapViewDefaults.quadTreeSearchDistanceDown]]
Optional
quadLimits 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
.
[[MapViewDefaults.quadTreeSearchDistanceUp]]
Optional
resourceSpecify if the cache should be counted in tiles or in megabytes.
[[MapViewDefaults.resourceComputationType]].
Optional
showIf true
, a replacement glyph ("?") is rendered for every missing glyph.
false
Optional
synchronousSet 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.
Internal maxFps
will be overridden and may not work properly as renderSync
intended to be called from external render loop.
false.
Optional
targetTarget/look at point of the MapView.
If the given point is not on the ground (altitude != 0) MapView will do a raycasting internally to find a target on the ground.
As a consequence target and zoomLevel will not match the values that were passed into the (MapView.lookAt:WITH_PARAMS) method.
new GeoCoordinates(25, 0)
in constructor context.
{@link MapView.target} in {@link (MapView.lookAt:WITH_PARAMS)} context.
Optional
themeThe @xyzmaps/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]].
load for details how theme is loaded
Optional
Beta
throttlingEnable throttling for the TaskScheduler
false
@beta
Optional
tileSize of a tile cache for one data source.
See [[MapViewDefaults.tileCacheSize]].
Optional
tileEnable 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.
true
Optional
tiltTilt angle in degrees. 0 is top down view.
0 in {@link MapView.constructor} context.
{@link MapView.tilt} in {@link (MapView.lookAt:WITH_PARAMS)} context.
Maximum supported tilt is 89°
Optional
uriResolve 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`
})
Optional
zoomZoomlevel of the MapView.
Takes precedence over distance.
5 in {@link MapView.constructor} context.
{@link MapView.zoomLevel} in {@link (MapView.lookAt:WITH_PARAMS)} context.
Generated using TypeDoc
User configuration for the MapView.