Custom map pins: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
#REDIRECT [[Global_map#Custom_map_pins]]
#REDIRECT [[Global_map#Custom_map_pins]]
<!--
 
[[Resco mobile apps]] can include maps. Records with location information can be displayed on the map as pins. By default, they look like this:
[[Resco mobile apps]] can include maps. Records with location information can be displayed on the map as pins. By default, they look like this:


Line 26: Line 26:


===Example: Custom map pins for active and inactive accounts===
===Example: Custom map pins for active and inactive accounts===
In this example, we add a custom map pins for the account entity and differentiate between the active and inactive acounts.
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''. The Map_pins part describes the folder where the map pin images are stored. The following .{0} part 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]]
The next step is to add the map pin to the view. Click '''Add Map Pin'''. As a type, we select Raw Vale. 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]]
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.
[[File:Map pins in the images.PNG|alt=upladed map pins in the images folder]]
This is what the result looks like in the app:
[[File:Custom mappins.PNG|alt=custom map pins in the app]]
[[File:Custom mappins.PNG|alt=custom map pins in the app]]


1,214

edits

Navigation menu