The first step will be to create the colored marker images for each of your devices. Losant currently only provides the two built-in ones: greenMarker.png
and redMarker.png
. You’ll also have to host these images somewhere. AWS S3 and Dropbox are good options, but any static hosting service will work.
The handlebar template will then look something like the following:
{{#if isLastPoint}}
{{#eq deviceId "my-device-id-1"}}
https://my-static-server/blueMarker.png
{{/eq}}
{{#eq deviceId "my-device-id-2"}}
https://my-static-server/purpleMarker.png
{{/eq}}
{{/if}}
If you want markers that look just like our built-in ones, the originals are below. You’ll just need to tweak their colors and host them somewhere.