Location
Spotfire reserves two document properties for adding location
services (or geo-positioning) to an analysis. Such an analysis is designed to
be used on an iOS mobile device. The document properties are named
AppGeoLatitude
and
AppGeoLongitude
and they are both of the data type
Real
.
An analysis that contains these document properties shows an active location icon on an iOS mobile device, such as an iPad or iPhone. If the document properties are not included in the analysis, the positioning icon is not available.
When you add the document properties to a Spotfire analysis, set them both to 0.0. (The mobile app interprets these values as setting the location to inactive.) When the iOS device user taps the location icon in the app, the current latitude and longitude are passed to the document properties.
- For kilometers use 6371.
- For miles use 3959.
For example, the following expression gives the distance in kilometers:
6371*GreatCircleDistance(${AppGeoLatitude}, ${AppGeoLongitude},
[latitude_column_name], [longitude-column_name])
For detailed instructions and examples, see Adding location capabilities to an analysis and Finding your location on a map using the Spotfire app.
For more information about designing for a small screen, see Designing Spotfire® Analytics for Small-Screen Display.
- Adding location capabilities to an analysis
If your data has latitude and longitude columns, you can create an analysis that an iOS mobile device user can access to determine the distance from a location. Just add the reserved document properties and a calculated column for distance calculation, and then share your analysis with mobile users. The document properties activate the location icon in the mobile device. The following example demonstrates how to create such an analysis and test it. - Finding your location on a map using the Spotfire app
You can add a marker showing the current latitude and longitude in a map visualization, identifying where iOS mobile app users are currently located when they tap the location icon in the app.