Custom map pins: Difference between revisions
Marek Rodak (talk | contribs) No edit summary |
Marek Rodak (talk | contribs) |
||
| Line 27: | Line 27: | ||
===Example: Custom map pins for active and inactive accounts=== | ===Example: Custom map pins for active and inactive accounts=== | ||
In this example, we add | In this example, we add custom map pins for the account entity and differentiate between the active and inactive accounts. | ||
First, we have to define the style for the map pin. Go to the Account entity and open a view that is used in the map. In the style editor, click '''Add''' while ImageCellStyle is selected. This creates a new child style. We name it MapPin. The format string is defined as follows: ''Map_pins.{0}.png''. | First, we have to define the style for the map pin. Go to the Account entity and open a view that is used in the map. In the style editor, click '''Add''' while ImageCellStyle is selected. This creates a new child style. We name it MapPin. The format string is defined as follows: ''Map_pins.{0}.png''. Map_pins describes the folder where the map pin images are stored. The following .{0} represents the value. This is a placeholder for the map pin types mentioned above. It's either for Value or Raw Value. | ||
[[File:Mappin style.PNG|alt=Style we define for the custom map pins|600px]] | [[File:Mappin style.PNG|alt=Style we define for the custom map pins|600px]] | ||
The next step is to add the map pin to the view. Click '''Add Map Pin'''. As a type, we select Raw | The next step is to add the map pin to the view. Click '''Add Map Pin'''. As a type, we select Raw Value. As we want to differentiate the records by their status code, set the field as statuscode. As a style, select the MapPin. | ||
[[File:Configure mappin.PNG|alt=configure map pin window Raw value|600px]] | [[File:Configure mappin.PNG|alt=configure map pin window Raw value|600px]] | ||
Revision as of 09:56, 14 February 2024
Redirect to:
Resco mobile apps can include maps. Records with location information can be displayed on the map as pins. By default, they look like this:
You have the flexibility to set custom map pins for various records based on field differences, which can significantly enhance the visualization of data on maps. Custom map pins are easily set up through the View Designer feature.
To begin configuring a custom map pin, navigate to the View Designer and select the "Add Map Pin" option. This action will open a new configuration window titled "Configure Map Pin," where you can define how your map pins will appear based on specific criteria.
There are three main types of bindings available for custom map pins, allowing for a range of customization options:
- Constant Binding: This option utilizes a single map pin image for all the selected records. To apply this, choose an image from the image folder to represent all records uniformly on the map.
- Value Binding: This option allows the creation of custom map pins based on the name of options within an option set field.
- Raw Value Binding: Similar to Value Binding, this method defines the map pin based on the logical value of options within an option set field.
For both Value and Raw Value bindings, it's necessary to select an option set field as the basis for differentiating the records. After selecting the appropriate field, choose a style that specifies how the map pins should be formatted. The chosen style must be either ImageCellStyle or its child.
When you finish configuring and add a custom map pin to the row, it's displayed above it.
Example: Custom map pins for active and inactive accounts
In this example, we add custom map pins for the account entity and differentiate between the active and inactive accounts.
First, we have to define the style for the map pin. Go to the Account entity and open a view that is used in the map. In the style editor, click Add while ImageCellStyle is selected. This creates a new child style. We name it MapPin. The format string is defined as follows: Map_pins.{0}.png. Map_pins describes the folder where the map pin images are stored. The following .{0} represents the value. This is a placeholder for the map pin types mentioned above. It's either for Value or Raw Value.
The next step is to add the map pin to the view. Click Add Map Pin. As a type, we select Raw Value. As we want to differentiate the records by their status code, set the field as statuscode. As a style, select the MapPin.
The last thing we have to set up is the images. Go to Images and create a new folder Map_pins. Upload two images representing the map pins. The name of the Images should be the logical value for the respective status code. In our use-case, 0 is for active and 1 is for inactive.
This is what the result looks like in the app:
More options
In the configuration of your app project, in the Map, GPS tab, you can set additional options related to map pins and their behavior:
- Map Pin Aggregation
- Map Pin Expansion
-->