Work with Location Data

With the Views service, you can quickly create apps with location capabilities such as visualizing location information or gathering, creating, and modifying location data.

All map rendering is provided by Mapbox.

The Views service does not respect styles and tiles configured in Mapbox when rendering the map view in your mobile app.

This article contains the following information:

Show Location Data

You can visualize location data in your app using a Map view or a Location field.

Show Full-Screen Maps

With Map views, you can visualize your data as pins on a full-screen map.

  1. Verify that you are a registered Mapbox user and that you have obtained an access token at https://www.mapbox.com.
    You can use a free access token for development. However, for production, you might want to consider subscribing to avoid the map views and mobile users limitations of the free plan. For more information, see Mapbox: Plans & Pricing.
  2. Based on your data provider, verify that the location data meets the following requirements:
    • All: The location data that you want to show in your app is geolocation coordinates data in a latitude and longitude format. For more information about the data format requirements, see Mapbox GL JS: LngLat.
    • Backend Services: The location data is stored in a content type with a Geopoint field.
    • Progress Sitefinity: The longitude and latitude coordinates are stored in two separate fields.
  3. Verify that you have added a Map view or a Progress Sitefinity-based view to your app. The view must be bound to the content type which contains the location data.
  4. On the Manage Views tab, select the view which you want to use to create your map view.
  5. In the List Screen section, expand Client-side options.
  6. Verify that the Show the list items on a map check-box is selected.
  7. Provide your Mapbox access token.
  8. From the Geopoint drop-down menu, select the field which provides location data.
  9. Configure the remaining view-specific settings.
  10. Click Apply.

Show Embedded Maps

With Location fields, you can visualize your data as pins on a smaller embedded map.

  1. Verify that you are a registered Mapbox user and that you have obtained an access token at https://www.mapbox.com.
    You can use a free access token for development. However, for production, you might want to consider subscribing to avoid the map views and mobile users limitations of the free plan. For more information, see Mapbox: Plans & Pricing.
  2. Based on your data provider, verify that the location data meets the following requirements:
    • All: The location data that you want to show in your app is geolocation coordinates data in a latitude and longitude format. For more information about the data format requirements, see Mapbox GL JS: LngLat.
    • Backend Services: The location data is stored in a content type with a Geopoint field.
    • Progress Sitefinity: The longitude and latitude coordinates are stored in two separate fields.
  3. Verify that you have added a Master Detail or a Progress Sitefinity-based view to your app. The view must be bound to the content type which contains the location data.
  4. On the Manage Views tab, select the view in which you want to show location data.
  5. If you are working with a Master Detail or a Progress Sitefinity-based view, navigate to the Detail screen.
  6. Expand the Custom Fields section and click Add field.
  7. Select Location.
  8. Provide a name and a label.
  9. Choose the label position.
  10. From the Data Binding drop-down menu, select the content field which provides the location data.
  11. If you are working with a Master Detail or a Progress Sitefinity-based view, in the Display as section, select Map.
  12. Provide your Mapbox access token.
  13. Click Apply.

Show Location Information

With Location fields, you can visualize your data as location information, such as coordinates or distance.

  1. Verify that you are a registered Mapbox user and that you have obtained an access token at https://www.mapbox.com.
    You can use a free access token for development. However, for production, you might want to consider subscribing to avoid the map views and mobile users limitations of the free plan. For more information, see Mapbox: Plans & Pricing.
  2. Based on your data provider, verify that the location data meets the following requirements:
    • All: The location data that you want to show in your app is geolocation coordinates data in a latitude and longitude format. For more information about the data format requirements, see Mapbox GL JS: LngLat.
    • Backend Services: The location data is stored in a content type with a Geopoint field.
    • Progress Sitefinity: The longitude and latitude coordinates are stored in two separate fields.
  3. Verify that you have added a Master Detail or a Progress Sitefinity-based view to your app. The view must be bound to the content type which contains the location data.
  4. On the Manage Views tab, select the view in which you want to show location data.
  5. Navigate to the Detail screen.
  6. Expand the Custom Fields section and click Add field.
  7. Select Location.
  8. Provide a name and a label.
  9. Choose the label position.
  10. From the Data Binding drop-down menu, select the content field which provides the location data.
  11. In the Display as section, choose how you want to show the location information.

    OPTION DESCRIPTION
    Distance from current location Shows the air distance (in km) between the current device location and the selected target location.
    Actual coordinates Shows the coordinates of the selected location in a latitude-longitude format.
  12. Provide your Mapbox access token.
  13. Click Apply.

Create Location Data from Your App

For apps that interact with location data, you can provide the app users with the ability to create location data entries from inside the app. For example, in an app that manages the shipment of goods, the app users might need to create new shipments with a send and receive address.

  1. Verify that you are a registered Mapbox user and that you have obtained an access token at https://www.mapbox.com.
    You can use a free access token for development. However, for production, you might want to consider subscribing to avoid the map views and mobile users limitations of the free plan. For more information, see Mapbox: Plans & Pricing.
  2. Based on your data provider, verify that the location data meets the following requirements:
    • All: The location data that you want to show in your app is geolocation coordinates data in a latitude and longitude format. For more information about the data format requirements, see Mapbox GL JS: LngLat.
    • Backend Services: The location data is stored in a content type with a Geopoint field.
    • Progress Sitefinity: The longitude and latitude coordinates are stored in two separate fields.
  3. Verify that you have added a Form, Master Detail or a Progress Sitefinity-based view to your app. The view must be bound to the content type which contains the location data.

    For Form views, you need to implement the functionality that writes the data in your data provider.

  4. On the Manage Views tab, select the view from which you want to create location data in your data provider.
  5. If you are working with a Master Detail or a Progress Sitefinity-based view, in the General section, verify that Enable 'Create' screen is selected and navigate to the Create screen.
  6. Expand the Custom Fields section and click Add field.
  7. Select Location.
  8. Provide a name and a label.
  9. Choose the label position.
  10. From the Data Binding drop-down menu, select the content field which provides the location data.
  11. Provide your Mapbox access token.
  12. If you have additional fields in your location content type, add the corresponding custom fields and bind them to the remaining fields. For example, if you store the name or address for the location as text, you can create an Input field and bind it to the corresponding text field in the data provider.
  13. Click Apply.

Modify Location Data from Your App

For apps that interact with location data, you can provide the app users with the ability to modify location data entries from inside the app. For example, in an app that manages the shipment of goods, the app users might need to modify the address for an existing shipment.

  1. Verify that you are a registered Mapbox user and that you have obtained an access token at https://www.mapbox.com.
    You can use a free access token for development. However, for production, you might want to consider subscribing to avoid the map views and mobile users limitations of the free plan. For more information, see Mapbox: Plans & Pricing.
  2. Based on your data provider, verify that the location data meets the following requirements:
    • All: The location data that you want to show in your app is geolocation coordinates data in a latitude and longitude format. For more information about the data format requirements, see Mapbox GL JS: LngLat.
    • Backend Services: The location data is stored in a content type with a Geopoint field.
    • Progress Sitefinity: The longitude and latitude coordinates are stored in two separate fields.
  3. Verify that you have added a Master Detail or a Progress Sitefinity-based view to your app. The view must be bound to the content type which contains the location data.
  4. On the Manage Views tab, select the view from which you want to create location data in your data provider.
  5. In the General section, verify that Enable 'Edit' screen is selected.
  6. Navigate to the Edit screen.
  7. Expand the Custom Fields section and click Add field.
  8. Select Location.
  9. Provide a name and a label.
  10. Choose the label position.
  11. From the Data Binding drop-down menu, select the content field which provides the location data.
  12. Provide your Mapbox access token.
  13. If you have additional fields in your location content type, add the corresponding custom fields and bind them to the remaining fields. For example, if you store the name or address for the location as text, you can create an Input field and bind it to the corresponding text field in the data provider.
  14. Click Apply.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.