Constructs a new MapView
with the given options or canvas element.
The MapView
options or the HTML canvas element used to display the map.
The instance of MapRenderingManager managing the rendering of the map. It is a public property to allow access and modification of some parameters of the rendering process at runtime.
The AnimatedExtrusionHandler controls animated extrusion effect of the extruded objects in the Tile
Returns true
if this MapView
is constantly redrawing the scene.
The THREE.js camera used by this MapView
to render the main scene.
Returns true
if the camera moved in the last frame.
The HTML canvas element used by this MapView
.
The alpha used to clear the view.
The alpha used to clear the view.
The color used to clear the view.
The color used to clear the view.
Get camera clipping planes evaluator used.
Changes the clip planes evaluator at run time.
The HTML canvas element used by this MapView
.
Returns DataSources displayed by this MapView
.
Enables or disables adding of new labels during interaction. Has no influence on already placed labels
Whether adding of new labels during interaction is enabled.
Enables or disables adding of new labels during interaction. Has no influence on already placed labels
true
to enable adding false
to disable them.
Whether adding of new labels during interaction is enabled.
Is true
if dispose() as been called on MapView
.
PixelRatio ratio for rendering when the camera is moving or an animation is running.
PixelRatio ratio for rendering when the camera is moving or an animation is running.
Returns the elevation provider.
Environment used to evaluate dynamic scene expressions.
Retrieve the registered event types.
Array of event types.
Specifies whether extended frustum culling is enabled or disabled.
Enable of disable extended frustum culling.
The distance (in pixels) between the screen and the camera.
Public access to MapViewFog allowing to toggle it by setting its enabled
property.
Gets the value of the forced custom camera aspect.
Every time a frame is rendered, MapView
resets the camera aspect.
You can disable this behavior by setting the value to undefined
.
Sets the custom forced camera aspect ratio to use while rendering.
You can disable this behavior by setting the value to undefined
.
The position in geo coordinates of the center of the scene.
The position in geo coordinates of the center of the scene.
Returns heading angle in degrees.
Set the heading angle of the map.
-: New heading angle in degrees.
Returns true
if the current frame will immediately be followed by another frame.
Lists the ISO 639-1 language codes for DataSources to use.
Sets the list of ISO 639-1 language codes for DataSources to use.
The lights configured by the theme, this is just a convenience method, because the lights can still be accessed by traversing the children of the scene.
Returns the status of frustum culling after each update.
Enable of disable frustum culling after each update.
The node in this MapView's scene containing the user MapAnchors.
Maximum FPS (Frames Per Second).
Maximum FPS (Frames Per Second).
The maximum zoom level. Default is 14.
The maximum zoom level.
The minimum camera height in meters.
The minimum zoom level.
The minimum zoom level.
Returns true
if the native WebGL antialiasing is enabled.
The THREE.js overlay scene
Get the PickHandler for this mapView
.
PixelRatio in the WebGlRenderer. May contain values > 1.0 for high resolution screens (HiDPI).
PixelRatio in the WebGlRenderer. May contain values > 1.0 for high resolution screens (HiDPI).
Returns the ratio between a pixel and a world unit for the current camera (in the center of the camera projection).
Gets the optional camera used to render the scene.
Sets the optional camera used to render the scene.
Get currently presented political point of view - the country code.
Country code or undefined if default (majorly accepted) point of view is used.
Set the political view (country code) to be used when rendering disputed features (borders).
The code of the country which point of view should be presented,
if undefined
or empty string is set then "defacto" or most widely accepted point of view
will be presented.
Country code or undefined if default (majorly accepted) point of view is used.
The abstraction of the MapRenderingManager API for post effects.
The abstraction of the MapRenderingManager API for post effects.
The projection used to project geo coordinates to world coordinates.
Changes the projection at run time.
The {@link @here/harp-geoutils#Projection} instance to use.
Enables or disables rendering of labels.
Whether label rendering is enabled.
Enables or disables rendering of labels.
true
to enable labels false
to disable them.
Whether label rendering is enabled.
The THREE.js WebGLRenderer
used by this scene.
The way the cache usage is computed, either based on size in MB (mega bytes) or in number of tiles.
The way the cache usage is computed, either based on size in MB (mega bytes) or in number of tiles.
The THREE.js scene used by this MapView
.
The MapViewEnvironment used by this MapView
.
Returns the storage level for the given camera setup.
Get geo coordinates of camera focus (target) point.
geo coordinates of the camera focus point.
Last known focus point distance.
The TileGeometryManager manages geometry during loading and handles hiding geometry of specified GeometryKinds.
Returns tilt angle in degrees.
Set the tilt angle of the map.
-: New tilt angle in degrees.
Returns true
if an update has already been requested, such that after a currently rendering
frame, the next frame will be rendered immediately.
{@link @here/harp-utils#UriResolver} used to resolve application/deployment
specific URI
s into actual URLs
that can be loaded with fetch
.
Get the ImageCache for user images that belongs to this MapView
.
Images added to this cache can be removed if no longer required.
Get object describing frustum planes distances and min/max visibility range for actual camera setup.
Returns height of the viewport in pixels.
Access the VisibleTileSet
to get access to all current datasources and their visible tiles.
The position in world coordinates of the center of the scene.
world coordinates of the camera focus point.
Returns the ratio between a world and a pixel unit for the current camera (in the center of the camera projection).
Returns the zoom level for the given camera setup.
Returns the zoom level for the given camera setup.
Adds a new DataSource to this MapView
.
The data source.
Adds an event listener. There are various events that are sent before or after a new frame is rendered.
One of the MapViewEventNames strings.
The callback invoked when the MapView
needs to render a new frame.
Adds new overlay text elements to this MapView
.
Array of TextElement to be added.
Begin animating the scene.
Clears any elevation sources and provider previously set.
The datasource to be cleared.
Adds new overlay text elements to this MapView
.
Clear the tile cache.
The name of the DataSource.
Optional tile filter
Dispatch the event to the registered listeners.
The event to dispatch.
Disposes this MapView
.
true
to force ThreeJS to loose the context. Supply false
to keep
the context for further use.
Stop animating the scene.
Returns the cache size.
Returns the unique DataSource matching the given name.
Returns the array of DataSources referring to the same [[StyleSet]].
Same as MapView.getGeoCoordinatesAt but always returning a geo coordinate.
Returns the {@link @here/harp-geoutils#GeoCoordinates} from the given screen position.
The X position in css/client coordinates (without applied display ratio).
The Y position in css/client coordinates (without applied display ratio).
Whether to compute a fallback position if the earth surface is not hit.
Un-normalized geo coordinates
Returns the normalized screen coordinates from the given pixel position.
The X position in css/client coordinates (without applied display ratio).
The Y position in css/client coordinates (without applied display ratio).
Returns the screen position of the given geo or world position.
The position as a {@link @here/harp-geoutils#GeoCoordLike} or THREE.Vector3 world position.
The screen position in CSS/client coordinates (no pixel ratio applied) or
undefined
.
Returns the currently set Theme
as a Promise
as it might be still loading/updating.
Returns the world space position from the given screen position.
The X position in css/client coordinates (without applied display ratio).
The Y position in css/client coordinates (without applied display ratio).
Whether to compute a fallback position if the earth surface is not hit.
Returns the world space position from the given screen position.
Checks if listener is added to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Do a raycast on all objects in the scene. Useful for picking.
The X position in css/client coordinates (without applied display ratio).
The Y position in css/client coordinates (without applied display ratio).
The intersection test behaviour may be adjusted by providing an instance of IntersectParams.
The list of intersection results.
Returns true if the specified DataSource is enabled.
Retrieve the registered listeners to the specified event.
The type of event to listen to.
Array of event listeners.
Loads a post effects definition file.
File URL describing the post effects.
Adjusts the camera to look at a given geo coordinate with tilt and heading angles.
{@labels WITH_PARAMS}
The method that sets the camera to the desired angle (tiltDeg
) and distance
(in meters)
to the target
location, from a certain heading (headingAngle
).
The location to look at.
The distance of the camera to the target in meters.
The camera tilt angle in degrees (0 is vertical), curbed below 89deg @default 0
The camera heading angle in degrees and clockwise (as opposed to yaw) @default 0 starting north.
Visit each tile in visible, rendered, and cached sets.
If passed, only the tiles from this DataSource instance
are processed. If undefined
, tiles from all DataSources are processed.
Optional tile filter
Transfer the NDC point to view space.
Vector to transform.
Result to place calculation.
Remove all event listeners for housekeeping.
Removes DataSource from this MapView
.
The data source to be removed
Removes the given dynamic property from this MapView.
The name of the property to remove.
Removes an event listener. There are various events that are sent before or after a new frame is rendered.
One of the MapViewEventNames strings.
The callback invoked when the MapView
needs to render a new frame.
Redraws scene immediately
Optional timestamp for start of frame. Default: [[PerformanceTimer.now()]]
Requests a redraw of the scene.
Resize the HTML canvas element and the THREE.js WebGLRenderer
.
The new width.
The new height.
Sets the cache size in number of tiles.
The cache size in tiles.
The number of tiles visible, which is size/2 by default.
Moves the camera to the specified {@link @here/harp-geoutils#GeoCoordinates},
sets the desired zoomLevel
and
adjusts the yaw and pitch.
Geolocation to move the camera to.
Desired zoom level.
Camera yaw in degrees, counter-clockwise (as opposed to heading), starting north.
Camera pitch in degrees.
Updates the value of a dynamic property.
The name of the property.
The value of the property.
Sets the DataSource which contains the elevations, the elevation range source, and the elevation provider.
The datasource containing the terrain tiles.
Allows access to the elevation min / max per tile.
Allows access to the elevation at a given location or a ray from the camera.
Set's the way in which the fov is calculated on the map view.
How the FOV is calculated.
Requests a redraw of the scene.
Generated using TypeDoc
The core class of the library to call in order to create a map visualization. It needs to be linked to datasources.