Hi
I want to display very large area in single view and to viewing different part user had to zoom/pan the view. (power distribution grid of a city)
And if I manage some how the current web browser zoom level, I can simply hide and hide object depend on current zoom level and making cluttering/de-cluttering effect.
Is there any trick to do that?
Hi Nader,
This is something weāve looked at and would like to be able to do, but unfortunately there is no simple way to reliably get the zoom level across the different browsers we support. Chrome has an api for it, and firefox implements it as well now, but Edge and Safari do not, nor do the mobile browsers.
Weād prefer not to implement functionality that is only supported on some browsers we are targeting, so weāve been waiting/hoping that the big browser distributors would all implement the same/similar API. Iām hoping that Edge will start supporting it once itās fully running on the Chromium/V8 engine for their production versions. Mobile and Safari are a different story.
Weāve looked at implementing something on our own, but there are a lot of challenges due to the differences across devices in how they report screen size/pixels/dpi/viewport/etc. For instance, a calculation that works well in many cases will break or report incorrect values when in an iFrame.
Of course, that doesnāt mean we canāt get it done, itās just something that is challenging enough to require more time/testing than weāve been able to give it this far.
Iām going to create a ticket to reinvestigate the current options in detecting the state of zoom in the browser and see what we can do.
Hi Perry
Thanks for your explanation.
Why donāt you support the same technique you use in map component? Like a new container that have zoom option. The container has a zoom property and support zooming gestures. Every component we put in this component can access it and bind that to itās visibility.
Please take a look that following video as example:
I really need this feature so if it only work for chrome there is no problem for me.
A āzoomableā container type is already something weāre planning to implement (actually, itās been on the list pretty much the whole time), as a separate feature to exposing the browser zoom level.
Can you give a rough estimation for releasing it?
Iām really need that for my next projects.
Still in the planning/design stages, so unfortunately canāt offer any estimation.
Thatās certainly a usage pattern we hope to achieve, but unfortunately for a number of technical and user-experience related purposes, itās not as simple as ājust add views/components to the mapā.
If you only need it for chrome, you could consider building a module (using our example as a start) that has a single invisible ācomponentā that reports the zoom level as a property.
Otherwise, no timeline, but itās something thatās on our roadmap.
Do we still don't have this option ?
It looks like there is now broader support for getting and setting the zoom through JS apis. I've opened a ticket to review compatibility and see if this is something we can look to add now that there's broader support across browsers (looks like mobile firefox is an exception, but seems an uncommon use case).
So for now, still no zoom support, but looks like it may be feasible so we'll review it and see what we can do. Ticket created as IGN-7955.
Me! (Well, I use the app usually. Ok.)
Hah - ya, I actually removed Chrome from my android phone and run FF as well (can't live without my adblock/privacy extensions). But definitely swimming against the current there!
We simply implement zooming and panning with CSS transform and mouse events. Even BJIC creates a new container for that as a module. So at this point having this feature is useless. Instead having the scroll position and changing its position is a very good tool for us.