This is documentation of an archived release.
For documentation on the current version, please check Knowledge Base.
For documentation on the current version, please check Knowledge Base.
Example : Tracking Mobile Mapping Measurements
This example assumes you have successfully embedded the component and validated the license.
Listening to measurement completion events.
The Orbit WebClient Component provides a Panorama component that manages all PanoramaViewer components that are in use. All measurement events are dispatched by the Panorama component because multiple viewers can be concerned when measuring via triangulation techniques.
We can get a reference to the Panorama object by using the getPanorama() method. We can add and remove event listeners by using the addEventListener() and removeEventListener() methods.
For a full list of Measure events, please consult the API.
client.getPanorama().addEventListener(orbit.webclient.PanoramaMeasureEvent.COMPLETE, function(e) { var mode = e.mode; var coordinate = e.properties.coordinate; var coordinates = e.properties.coordinates; console.log("Measurement complete."); console.log("Mode: "+ mode); if (coordinate) console.log("Coordinate: "+coordinate.x+","+coordinate.y+","+coordinate.z); if (coordinates) console.log("Coordinates measured: "+ coordinates.length); });
Result
Please open the JavaScript Console of your browser to see debug messages.
Last modified:: 2019/03/25 11:36