Adding Location or Machine Readable Capabilities to a Mobile-Ready Analysis

Adding expressions to find your location

After you have created a location-aware analysis for a mobile app, you can add expressions that can determine your location in the analysis on the mobile device.

About this task

Perform this task first using an application to create a single-column data table, and then in Spotfire Analyst using a data set that includes latitude and longitude columns.

Before you begin

You must have completed the task Adding location capabilities for mobile users.

Procedure

  1. Create a single-column data table that contains a name row and one placeholder data row.
    A CSV file with a single column called Placeholder and a data row containing any string as a placeholder does nicely. Save it with any name, such as Location.
  2. Open Spotfire Analyst, and then open your analysis from Adding location capabilities for mobile users.
  3. From the menu, click File > Add Data Tables.
  4. In the Add Data Tables dialog, click Add > File, and then add your placeholder data table.
  5. From the menu, click Insert > Calculated Column, and create the following three calculated columns.
    Column name Expression Data type
    lat ${AppGeoLatitude} Real
    long ${AppGeoLongitude} Real
    isLocationSet Not(${AppGeoLatitude} = 0.0 and ${AppGeoLongitude} =0.0) Boolean

Results

You now have a data set with three calculated columns that you can use in a Spotfire app to mark your current location. This is extremely useful in a map visualization designed for the Spotfire mobile app.

What to do next

Create a map layer to highlight the device location.