Global map

From Resco's Wiki
(Redirected from Custom map pins)
Jump to: navigation, search

The Map function is available on from the Home screen of Resco Mobile CRM app. Entities that have GPS coordinates can be displayed on the map.

See also:

  • For information about how to use maps in the app, see Map and route planner.
  • For information about how to add GPS coordinates to various entities, see Geocoding.
  • For information about adding a map tab to your form, see Add map to form. Unlike global maps accessible from home, form maps can display records from a single entity only.

Configuring map views

You can define multiple different map views. Each of the maps must be added separately to the Home screen if you want them displayed.

To create or edit maps:

  1. Edit an app project in Woodford.
  2. Select Global Map from the Project menu.
    • Click New and enter a name to create a new map.
    • Double-click an existing map to edit it.
  3. Edit the details of the map view in the Edit Map window.
    • On the Views tab, add or delete entities that should be available. Click Initial View for entities that you want to be displayed by default. App users can modify the selection in the app.
    • On the Setup tab, configure the start map location and zoom level. You can also configure whether to aggregate and expand map pins.
  4. Click Save & Close.

To add maps to the home screen:

  1. Select Home from the Project menu.
  2. Select the map from the Available Items pane and click Add.
  3. Click Save.

The map settings defined for global map also apply to other parts of the application, for example Mobile Audit Analysis.

Custom map pins

You can set the map pin for different records, according to the field difference. In this case it is an option set. Let’s demonstrate it on the field Preferred Method of Contact on an Account entity.

Creating a new style

You need to create a new style. Styles allow you to define where the map pin images are taken from. First, create a new style to make it easier in the future. Or you can use a predefined one.

  1. Select Account entity from the Project menu.
  2. Click Show UI and double-click the view used on the global map to open it for editing.
  3. Click Edit Styles.
  4. Select ImageCellStyle and click Add.
  5. Select the new style and name it, for example Map Pins.
  6. Use the FormatString parameter to tell the application how the picture or map pin is named and where it is taken from, i.e. where it is stored; for example Map_Pins.{0}.png. You just need to select the folder (in Images section of the project), where you custom pins shall be stored (each picture added to the project needs to be in png format).
  7. Click Save & Close to close the styles editor.
Note Styles are global, you can use this style also for other pins on different views.

Adding the style to view

Now update the view to add custom map pins.

  1. Click Add Map Pin to add a static map pin.
  2. Select the pin in the Designer pane to display its properties.
  3. In the Properties pane:
    • Change Binding to Value.
    • Click Select... and choose Preferred Method of Contact.
    • As Style, select the name of your new style, for example Map Pins.
  4. Click Save & Close to close the view designer.

Adding the images

You need to add the custom map pin images to your project.

  1. Select Images entity from the Project menu.
  2. Click Add Directory and name it. Use the exact name as used when creating the style, for example Map_Pins.
  3. Click Add to add images. As name, use the values (options) available in the Preferred Method of Contact drop down list, for example Any, Mail, Phone, etc. Click the placeholder icon to upload images. Then click Add.

Using the view in global maps

As the last step, make sure that the view is used by global maps.

GPS coordinates of parent or related entities

Not all entities have GPS coordinates as fields. However, they might have a related entity or parent entity that does include the fields. For example, Opportunity entity does not have address fields, but Lead does. Opportunity is linked to Lead by the field Originating Lead, and we can use that to find the lead and use its location.

  1. Select Opportunity entity from the Project menu.
  2. Click Show UI and double-click the view used on the global map to open it for editing.
  3. Click Select Fields and expand Lead and select the latitude and longitude fields, then click OK.
  4. Click Save & Close to close the view designer. The Opportunity view now includes GPS coordinates and can be displayed on maps.
  5. Select Global Map from the Project menu.
  6. Edit the map and add the Opportunity entity and the appropriate view to the map.
  7. Click Save & Close to close the Edit Map window.

Offline maps

Warning This function is currently unavailable in the latest version of Woodford. It will be reintroduced in a future release.

This function allows the administrator to define map regions that will be downloaded to the device and available offline. In order to use this function, you have to use Mapbox map provider: https://www.mapbox.com/.

Mapbox token

  1. Go to Mapbox website and sign up / sign in.
  2. Go to https://account.mapbox.com/ and create a token.
  3. In Woodford, edit an app project and select Configuration from the Project menu.
  4. Paste the token generated from Mapbox website as the Mapbox Access Token, then click Save.

Mapbox custom style

Copy style URL into Woodford

Optionally, you can create a custom style for your maps.

  1. Use Mapbox studio to create a custom map style.
  2. Go to https://studio.mapbox.com/ to display your list of styles.
  3. Expand the additional options for your style and copy the style URL.
  4. You can use the style in the setup of offline maps in Woodford.

Configure regions for offline maps

  1. Using Woodford, edit an app project.
  2. Select Global Map from Project menu
  3. Click Offline Setup to display a list of regions.
  4. Click Add to define a new region.
    • As Type, use the style URL created in Mapbox Studio.
    • Enter the GPS coordinates of the northeast and southwest corner of your map region.
    • As Zoom Level(s), specify the zoom levels to download.
  5. Click OK to save your changes.
Note Offline maps can take a lot of storage space on your mobile device. Also, the synchronization of your app might take significant time.

See also