====== Example : Tracking Mobile Mapping Measurements ====== This example assumes you have successfully [[example_embed|embedded the component]] and [[example_checklicense|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 [[.:api:orbit.webclient.PanoramaMeasureEvent|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.