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

Creating a map layer to highlight the device location

This task adds a marker to the latitude and longitude to a map analysis, identifying where a mobile app user is currently located when the user taps the location icon in the app.

About this task

Perform this task in Spotfire Analyst

Before you begin

You must have completed the following tasks:

Procedure

  1. If it's not already open, open the analysis you created in Adding location capabilities for mobile users.
  2. Right-click the map, and in the menu, click Properties.
  3. In the Map Chart Properties dialog, select Layers.
  4. Click Marker Layer, and add the Location data table you created in Adding expressions to find your location to your layers.
  5. Select the new Location data table layer, and then click Settings.
  6. In the Map Layer Settings dialog select Colors, and set the color so the location value stands out. For example, if your data points are all set to blue, you could set it to red.
  7. Click Shape and select a shape to distinguish the marker, such as an X, a triangle, or a star.
  8. Click Data, and then scroll down to the box Limit data using expression, and click Edit.
  9. In the Limit Data Using Expression dialog, select the column isLocationSet, and then click Insert Columns.
  10. Click OK to close and save the change, and then close the Settings and Properties dialogs.
    The column name is added as an expression.
  11. Click Layers make sure that the Location layer is first, the data layer, is second, and the map layer is last.

Results

  • When the value of isLocationSet is set to False, the marker in the Location map layer does not appear.
  • In the map, if the value of latitude and longitude both are not 0, and if the isLocationSet is True, the specified shape and color marker appears on the map at the specified latitude and longitude.

This image shows a map chart with the current location marked by a red triangle and the data points (zip codes) as light blue circles. One data point is selected, and its location is shown with a darker blue circle. Its columns, including distance from the device location, is shown in the Data Visualization.


map chart showing device location and distance from point