Leaflet.markercluster keyboard resize mobile - leaflet

I am using the super useful Leaflet.markercluster for leaflet which has been great for performance because of the nice getExpandedVisibleBounds feature.
One problem I am running into is on mobile devices with the keyboard changing the viewport/bounds. When I enter an input box and the keyboard pops up, it shrinks the map viewport. After the keyboard goes away the viewport/bounds don't seem to update for the markercluster. The map is fully visible again but markers that are on the lower half of the map (where the keyboard was) are now not visible. Panning the map and zooming in and out don't seem to fix it. After a minute or so of use it seems to correct itself and the markers and now visible on the whole viewport again.
Any suggestions on how to fix this issue? Thanks!

Related

Mapbox Reset Zoom when Marker deselected

Fairly new to Mapbox and getting there (slowly).
I have a map initially loaded at zoom level 1 for use in a web browser. When a user clicks on a marker, it'll center and zoom to level 10.
When that marker loses focus, I'd like to zoom back out to level 1.
This page discussing web applications does it (link below), but there doesn't seem to be (that I can find - sorry!) any documentation on how to achieve this.
https://docs.mapbox.com/help/getting-started/web-apps/
Any and all help appreciated!
For the first event, to zoom in when clicking a marker, you could adapt this example to zoom in addition to panning when calling flyTo
https://docs.mapbox.com/mapbox-gl-js/example/center-on-feature/
For the second part, you'd need to add a listener for another event depending on what you have in mind by "losing focus".
https://docs.mapbox.com/mapbox-gl-js/api/map/#map-events

Zooming doesn't work in Unity although FOV changes

I am working on a 2D project and I want to zoom in my map by scrollwheel. I am sure that my code is working (because during the play mode, field of view changes when scrollwheel is rotated) but no change on the screen is observed.
Besides, during play mode even if I change the field of view manually (from the editor), the screen view remains same. That is, although field of view is observed to be seen changing but the screen view is not.
What are the possible reasons for that?
Here is the screenshot of the editor attached:
Possibly because you're using screen space canvas. Put the canvas in the world space for field of view to have any effect.

Pixelwise scrolling for LO/OO Writer

In LO/OO Writer vertical scrolling can be done e.g. by moving the text cursor up/down, using the mouse wheel, clicking the up/down arrows on the vertical scrolling bar, etc.
Touch scrolling (on touch screens) is not supported, unfortunately. Therefore I wrote a tool (in Autohotkey) which enables touch scrolling. It is working fine, but the scrolling is not as smooth as in other programs supporting touch scrolling: the content of the window is moved in steps of approx. one line.
In my tool I am using the best 'control' for scrolling I could find: touch point movements are remapped to clicks on the up/down arrows on the vertical scrolling bar.
MY QUESTION: Is there (could there be) another 'control' in LO/OO Writer which would allow smoother (pixelwise) scrolling of the displayed content?
Thank you very much in advance for your answers! (Please only answers referring to LO/OO Writer.)
Clicking and dragging the scrollbar allows higher granularity than the up/down arrows. The scroll amount adjusts if the document is zoomed in.
On the downside, using the scrollbar is much more difficult than a simple click on the arrows. There is a discussion at https://autohotkey.com/board/topic/51041-click-drag-scrollbars/.
If it is a touch screen, perhaps you could require the user to touch the scrollbar, so the touch location would give the vertical position of the scrollbar. Then use MouseClickDrag starting from that position.

Keep touchZoom centered?

I am using Leaflet in a mobile app and want to get rid of the two zooming buttons in the top corner, but I need the exact same effect (zooming without the possibility of panning around with it) but using a pinching gesture. Alas, the default pinching gesture does not keep the view centred!
I don't know why, but keeping the zoom centred when using the mousewheel or doubleclick are available options for the map object:
If passed 'center', double-click zoom will zoom to the center of the view regardless of where the mouse was.
If passed 'center', it will zoom to the center of the view regardless of where the mouse was.
But not for touchZoom, I tried. maybe the nice people at Leaflet thought the effect doesn't "feel" nice, but I really wish I could try it nonetheless and judge it by myself.
Anyone knows how to get a similar effect? I don't really want to end up calling setView() at every "zoom" event call, if that even was an option...
Found out that I could use the maxBounds option. If you set both corners on a single point (the one you'd use for setView, for example), the map won't be able to pan away from it.

Autopan issue occuring in Bing Maps AJAX upon resizing a map?

Am working on a project where we have a Bing map being resized depending on whether or not a panel is shown/hidden on the left-hand side of the map. Because of this, and Microsoft's terms preventing overlaying anything over the logo/copyright, etc, I'm using the VEMap.resize method to resize the map, and then am moving the panel out of the way. The issue is that there's an awkward autopan that occurs as part of the resize - because we're declaring a center point to determine the resize, the map pans to include this point in the center without any control over it. Without declaring a center, the map doesn't pan, but it also doesn't pull the new data (map tiles) in our resize in either, resulting in an awkward grey bar on the right-hand side..
Is there a simple way to either resize the map and disable that autopan, moving the center prior to the panning, or to force the map tiles to be rendered upon the resize itself? Any help would be appreciated.
You may want to try the new version 7.0 as you could get rid of this annoyance by using "map.setView({center: map.getCenter(), animate:false})" after resizing; that should override the nice but annoying pan movement on resize.
However there are a few features (like infoboxes or client-side clustering) currently missing in 7.0 when migrating from 6.3 however and the classnames changed, so you may want to wait for now, however it would be the good moment to prepare yourself for 7.