new PopupCollection(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
Mapspace.street.threejs.PopupCollectionOptions | Options. |
- Source:
- mapspace-street/sceneobjects/popupcollection.js
Fires:
- ol.events.Event#event:objectchanged
- ol.events.Event#event:ready
Extends
Members
-
annotationLayer :boolean
-
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
children :Array.<SceneObject>
-
The SceneObjects children of this object. Any SceneObject can have any number of SceneObject children in its own hierachy.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
measurementLayer :boolean
-
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
object3D :THREE.Object3D
-
The THREE.Object3D that contains this SceneObject. Each SceneObject can contain one and only one THREE.Object3D, but any THREE.Object3D can have any number of THREE.Object chidren in its own hierachy.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Methods
-
addAnnotationPopup(output, localCoord, shift)
-
Creates a popup for showing a annotation info and adds it to this popup collection.
Parameters:
Name Type Description output
string The content for the inner HTML of the popup.
localCoord
Mapspace.Coordinate The coordinate where position the popup in local coordinate system.
shift
number A shift in the Y axis to apply to the coordinate once it is positioned.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
addChild(child)
-
Adds a child SceneObject to this object.
Parameters:
Name Type Description child
Mapspace.street.threejs.SceneObject Child SceneObject.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
addFeatureInfoPopup(element, localCoord, shift)
-
Creates a popup for showing a feature info and adds it to this popup collection.
Parameters:
Name Type Description element
Element The HTML element to use as popup.
localCoord
Mapspace.Coordinate The coordinate where position the popup in local coordinate system.
shift
number A shift in the Y axis to apply to the coordinate once it is positioned.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
addMeasurementPopup(output, localCoord, shift)
-
Creates a popup for showing a measurement info and adds it to this popup collection.
Parameters:
Name Type Description output
string The content for the inner HTML of the popup.
localCoord
Mapspace.Coordinate The coordinate where position the popup in local coordinate system.
shift
number A shift in the Y axis to apply to the coordinate once it is positioned.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
addPopup(element, position)
-
Add a popup to the collection.
Parameters:
Name Type Description element
Element The HTML element to use as popup.
position
Mapspace.Coordinate The position for the 3D object inside the scene.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
addToScene(scene)
-
Adds all visible objects of these popup collection to scene.
Parameters:
Name Type Description scene
THREE.Scene Scene where add objects.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
findSceneObjects(raycaster)
-
Returns an array of SceneObjects that are intersected by given raycaster. Function to be overrided in derived classes.
Parameters:
Name Type Description raycaster
THREE.Raycaster Raycaster.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Returns:
Array of SceneObject.
- Type
- Array.<Mapspace.street.threejs.SceneObject>
-
findThreeObjects(raycaster)
-
Returns an array of THREE.Object3D that are intersected by given raycaster. Function to be overrided in derived classes.
Parameters:
Name Type Description raycaster
THREE.Raycaster Raycaster.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Returns:
Array of THREE.Object3D.
- Type
- Array.<THREE.Object3D>
-
getScene()
-
Returns the Three.js scene the object3D contained inside this object is attached to.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Returns:
The scene.
- Type
- THREE.Scene
-
getSceneManager()
-
Returns the SceneManager this SceneObject is attached to.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Returns:
SceneManager.
- Type
- Mapspace.streetthreejs.SceneManager
-
getVisible()
-
Returns the visibility of the objects of this object.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
Returns:
- Type
- boolean
-
removeAll()
-
Remove all objects.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
removeChild(child)
-
Removes a child SceneObject from this object.
Parameters:
Name Type Description child
Mapspace.street.threejs.SceneObject Child SceneObject.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
removeFromScene(scene)
-
Removes all objects of these popup collection from scene.
Parameters:
Name Type Description scene
THREE.Scene Scene where remove objects.
- Source:
- mapspace-street/sceneobjects/popupcollection.js
-
rotateAroundWorldAxis(axis, radians)
-
Rotate the object3D of this SceneObject around an arbitrary axis in world space.
Parameters:
Name Type Description axis
THREE.Vector3 Axis. It is not needed the axis to be normalized.
radians
number Angle in radians.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
setObject3D(object3D)
-
Sets the THREE.Object3D of this object.
Parameters:
Name Type Description object3D
THREE.Object3D The Object3D of this object.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
setPosition(x, y, z)
-
Move this object to new coordinates.
Parameters:
Name Type Description x
number X coord.
y
number Y coord.
z
number Z coord.
- Inherited From:
- Source:
- mapspace-street/sceneobjects/sceneobject.js
-
setVisible(visible)
-
Change the visibility of this object.
Parameters:
Name Type Description visible
boolean If object should be visible or not.
- Overrides:
- Source:
- mapspace-street/sceneobjects/popupcollection.js