Making the Widget Device Map Widget map pins to different dashboards


#1

Hello,

I am with a little problem, on a device map widget. I put two devices on device map widget but when a go to the options “GO to the url pages” both pins go to same url.

I would like to each one redirect for a specific dashboard.

Thanks!!
Have a nice Day.


#2

Hi @arthur92,

The Device Map Widget has three options for what happens when a device/pin is selected on the map. It can use the device as a ‘caller’, which passes the selected object to another widget that has a subscription to the map widget. This allows the second widget to read that device, and most often display a histogram of a specific dataport. This exchanged can only be setup between multiple ‘Off the Shelf Widgets’ and cannot be used with custom widgets.

The second option is to launch the given device’s Portal dashboard(AKA a Domain dashboard) if it is not a ‘generic’ device and has a dashboard associated with it. This will cause the browser to navigate to a new page passing the device’s RID to the dashboard. This is the most commonly used option, as many vendors setup specific Domain Dashboards for their devices.

The last option is to include a custom URL, which it appears you have done. The limitation here is that the behavior will always be the same, regardless of each device’s type.

Because I am a bit familiar with your application, I know that the two devices selected in your screenshot are client models registered to your Vendor account.

Do you have Domain Dashboards created for these devices?

My understanding is that your devices have pretty wide applications, are are often configured/programmed on a per customer basis(meaning that you may not have a standard Domain Dashboard to use).

Another widget option entirely may be to create a custom widget that does it’s own mapping/pinning and understands your specific device’s relations to their own standard or custom dashboards.

Below is an example table widget that is using an earlier instantiated collection to define the mapping of devices to dashboards, but this code snippet is handling the on-click event. The strategy used here could be used to map your devices to given domain or custom dashboards available in the context of your account/portal.

Let me know if you have questions about this – Happy to help,
-Martin


#3

Hey Martin, How you doing?

First of all thank you, cause you understand exactly what I did.

I wanna know if its possible to have a map in a widget , like in device map widget, but when a click on a different pin, they will redirect for a specific dashboard. The devices in the widget have a default dashboard, but I need that redirect for a custom dashboard in the same account.

Could you lend the source code of device map widget for I make some tests?

Thanks,

Arthur.