Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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,
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.