For documentation on the current version, please check Knowledge Base.
Notes on migrating from 10.4 to 10.5
This page highlights the most important API changes when migrating from the 10.4 to 10.5 APIs.
Loading the API
Loading the API changed; the script reference now includes an API version. This ensures your application will always be using the API you used when writing your application, even when the server is updated and a newer version of the API becomes available. The old API's will stay around until you find the time to migrate your application.
<script type="text/javascript" source="<server>/api/orbit_webclient.js"></script>
becomes…
<script type="text/javascript" source="<server>/api/10.5.1/webclient_api.js"></script>
Event name changes
Some events moved to their own class. Therefore, referring to an event names changed as well.
- ClientEvent.LOAD_PUBLICATION_FAILURE → LoadPublicationEvent.FAILURE
- ClientEvent.LOAD_PUBLICATION_SUCCESS → LoadPublicationEvent.SUCCESS
- ClientEvent.LOAD_PUBLICATION_LIST_FAILURE → LoadPublicationListEvent.FAILURE
- ClientEvent.LOAD_PUBLICATION_LIST_SUCCESS → LoadPublicationListEvent.SUCCESS
- PanoramaEvent.MEASURE_START → PanoramaMeasureEvent.START
- PanoramaEvent.MEASURE_STOP → PanoramaMeasureEvent.STOP
- PanoramaEvent.MEASURE_CLEAR → PanoramaMeasureEvent.CLEAR
- PanoramaEvent.MEASURE_UPDATE → PanoramaMeasureEvent.UPDATE
- PanoramaEvent.MEASURE_COMPLETE → PanoramaMeasureEvent.COMPLETE
Example : Tracking Mobile Mapping Measurements Example : Tracking Mobile Mapping Measurements
Searching for Photo Positions
The signature for the searchPhotoPostions function no longer allows you to add a target CRS. Since 10.5, the target CRS is always the publication CRS, or an user-defined CRS. You can set the user-defined CRS by calling the setCRS() function of the client.
Note : Setting a user CRS has an effect on the api as a whole. It sets the CRS of the returned photo positions as well as any measurements.
License Check
Since version 10.5.2 we require the API user to first execute a license check. If the license check is valid, you can make use of the API functions you have access to.