cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

how state based formatting of multiple markers in map widget can be done?

hraj1
1-Newbie

how state based formatting of multiple markers in map widget can be done?

I have a map widget where markers are displaying multiple machine data. I want to change the state of the marker based on the state i.e. whether the machine is off or on,

2 REPLIES 2
jamesm1
5-Regular Member
(To:hraj1)

You can create a thingworx state with the different markers, give the values something like a string for machine type and set the market images appropriately. Bind a datasource, such as getpropertyvalues or queryimplementingthingswithdata, to your map and find the MarkerFormating property on the map widget. Set your marker state to this property and set the dependent field to the MachineType property (which needs to be in the returned data set along with the location).

You can also dynamically assign the markers on the map.  If you use a service to populate the map with data you return an image URL along with your location information.  You can link this to the MarkerField parameter of the map.  This works great until the marker is selected.  I haven't found a way to override the selected format.

Top Tags