I would like to create a very large coordinate view with machine images on it, and have the ability to pinch zoom and pan exactly like this:
https://onlinedemo.inductiveautomation.com/data/perspective/client/OnlineDemo/feature/realtime/maps
What is the best way to accomplish this now (scripting mouse events, module, or if there are plans to create this in the future let me know, thanks.
We have plans to add something like this first party (no timeline). @nader.chinichian or @kgamble may have some advice on what can be done in the short term, but the developer UX is pretty far from ideal right now, as I understand things.
1 Like
This would be one of the most useful components that can be added to Perspective, imo. I can't wait until it gets released!!!
1 Like
You might be able to hack it by using the map component with a raster layer showing your image, and set map bounds to stop the user from panning outside the bounds of the image. I'll have to test it out when I have a bit of time.
From what I can see on the manual page, it seems like the image would have to be hosted on a web server or with WebDev.
Edit: some brief research into the underlying Leaflet library implies that you might even be able to force a custom blank tilelayer by leaving the url as an empty string so that your machine drawings aren't overlaid on a map of Europe or something.
I dont want to use an image, but rather a coordinate view where i can put images, labels, buttons etc. And having alarm, navigation events trigger zoom level and auto panning a viewport to a specific look or area in that coordinate view. Having a scalable, easily configurable view would be the number 1 benefit of using perspective in a variety of industries. I feel like this is something i have been able to mimic with a few mouse handlers but it would be nice to know if something more substantial is on its way before i bury hundreds of hours in development time.
There is an option to add a view as a UI layer to the map, so you might still be able to hack it.
It's definitely not as good as a native solution would be, but hopefully better than trying to write half a dozen mouse handlers.
When you mentioned the developer UX, are you referring to the stage IA is with this component or feature and does that mean that work is being done already?
I managed to manipulate the position and size of a view in a view canvas and can tell this would be a good approach but needs a lot of work if I keep going down that road...
What I mean is we're aware (bluntly) it sucks to try to do this right now, with what's currently in the software. That's the whole reason we want to offer a first party component. However, we have not (to my knowledge) actually started any implementation effort on it.
OK, I'll stick my neck out.
Here at BIJC we have an module for our use that does this. Its just like a XY container but you can zoom in and out like a map. It can handle multiple views and will not render any views that are not visible. The zoom value is available as a property (amongst many others) and is useful for binding to.
If there is sufficient interest I could make it a third party module. like this post so I can get an idea. Then I'll post a video of it.
19 Likes
Oy! Understatement, much? This is precisely the kind of generically useful functionality that deserves public exposure as a module.
{ Full disclosure: I've seen this demonstrated. It is freaking awesome. }
10 Likes
@Chris_Taylor:
If there is sufficient interest I could make it a third party module. like this post so I can get an idea. Then I'll post a video of it.
Following this as it just came up in our last meeting over converting to ignition.
I've been wanting this type of tool to use in Ignition as well.