Constructor for the map view objects.
Map view node modes can be SPHERICAL, HEIGHT or PLANAR. PLANAR is used by default. Can also be a custom MapNode instance.
Map color tile provider by default a OSM maps provider is used if none specified.
Map height tile provider, by default no height provider is used.
Array with animation clips.
[]
Indicate if the nodes should cache its children when it is simplified. Nodes that are no longer in use should be kept in memory.
Usefull for fast moving scenarios to prevent reparsing data in fast moving scenes.
Should only be used if the child generation process is time consuming. Should be kept off unless required.
Gets rendered into shadow map.
false
Array with object's children.
[]
Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes. When shadow-casting with a DirectionalLight or SpotLight, if you are (a) modifying vertex positions in the vertex shader, (b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.
Same as customDepthMaterial, but used with PointLight.
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.
true
Map height (terrain elevation) layer provider.
Only used for HEIGHT, HEIGHT_SHADER and MARTINI map modes.
Unique number of this object instance.
Readonly
isReadonly
isUsed to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.
new THREE.Layers()
LOD control object used to defined how tiles are loaded in and out of memory.
Local transform.
new THREE.Matrix4()
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
THREE.Object3D.DefaultMatrixAutoUpdate
The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
new THREE.Matrix4()
When this is set, the renderer checks every frame if the object and its children need matrix updates. Otherwise, you have to maintain all matrices in the object and its children yourself.
THREE.Object3D.DefaultMatrixWorldAutoUpdate
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
false
Readonly
modelnew THREE.Matrix4()
Optional
morphOptional
morphOptional name of the object (doesn't need to be unique).
''
Readonly
normalnew THREE.Matrix3()
Calls after rendering object
Ajust node configuration depending on the camera distance.
Called everytime automatically before render by the renderer.
Object's parent in the scene graph.
null
Readonly
positionObject's local position.
new THREE.Vector3()
Map tile color layer provider.
Readonly
quaternionObject's local rotation as a Quaternion.
new THREE.Quaternion()
Material gets baked in shadow receiving.
false
Overrides the default rendering order of scene graph objects, from lowest to highest renderOrder. Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together.
0
Define the type of map node in use, defined how the map is presented.
Should only be set on creation.
Readonly
rotationObject's local rotation (Euler angles), in radians.
new THREE.Euler()
Readonly
scaleObject's local scale.
new THREE.Vector3()
Up direction.
THREE.Object3D.DefaultUp.clone()
An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
Object gets rendered if true.
true
Static
DefaultStatic
DefaultStatic
DefaultStatic
HEIGHTPlanar map projection with height deformation.
Static
HEIGHT_Planar map projection with height deformation using the GPU for height generation.
Static
MARTINIRTIN map mode.
Static
PLANARPlanar map projection.
Static
SPHERICALSpherical map projection.
Static
mapMap of the map node types available.
Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
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.
Optionally, the x, y and z components of the world space position. Rotates the object to face a point in world space. This method does not support objects having non-uniformly-scaled parent(s).
A world vector to look at.
Removes a listener from an event type.
The type of the listener that gets removed.
The listener function that gets removed.
Change the map height provider of this map view.
Will discard all the tiles already loaded using the old provider.
Change the map provider of this map view.
Will discard all the tiles already loaded using the old provider.
Generated using TypeDoc
Map viewer is used to read and display map tiles from a server.
It was designed to work with a OpenMapTiles but can also be used with another map tiles.
The map is drawn in plane map nodes using a quad tree that is subdivided as necessary to guaratee good map quality.