Closed awprice closed 11 years ago
I am having the same problem. Its like the screen hops when it zooms in. Its very annoying.
Map zoom is towards the location of the mouse on the map - this is as-designed.
Is there a way to disable it? Due to loading times of the tiles, it is often disorientating.
Not at present, but let me give it a look
Thank you for that. Much appreciated. Any updates would be great.
Update: Seems as if it only occurs in Google Chrome. Tried it on Mozilla Firefox and Internet Explorer and it zoomed in normally, no weird loop zoom thing.
Yes I can confirm this only occurs in Google Chrome. (Version 23.0.1271.64 m).
Any updates? Would there be an option to disable it in an upcoming version?
Mike, the issue isn't with zooming toward the mouse. That is what we want. It however shifts to the side before zooming in. Firefox zooms smoothly. It is just a weird issue with Chrome, hurts the eyes.
Exactly what Jasin said... the final location of the map after zooming is fine. It's the transition that's not working correctly in Chrome.
Try zooming in or out on this map using Google Chrome: http://mc.g4m.es:8123/
i have tested the map http://mc.g4m.es:8123/ and it dont work with chrome i cant zoom unless i us the zoom button and i cant move the map. Also i have tested this with internet explorer and after 1 mouse click of zoom it locks up
Sounds like stevewall might be having a separate issue. The problem we're having is purely with the zoom transition effect. The mousewheel zooming works fine for me anyway, and it has never locked up on me.
Guys - I'm working on a major version update for the mapping library we use, which is the code responsible for all of this. Unfortunately, the code changed a lot since my last update, so its driving a lot of rewrite.
Awesome... thanks for the update!
All good - it will NOT be in the 1.3 GA, which I'm planning on pushing today. But, I expect it to be the first major action for 1.4, so watch for the development builds and alphas.
Thank you Sir, Look forward to it.
I just installed 1.4 Dev and same zoom issue (and same nether issue even after multiple fullrenders) Is there something I need to change in the config?
I can confirm that this issue still affects Google Chrome with dynmap verison 1.5-593.
The problem is in the leaflet.js library. Dynmap is using leaflet 0.3 version. I changed two functions to nearly match the current leaflet 0.5.1 versions and it appears to be working fine for me in Chrome.
[edit]see mikeprimm's comment below which makes these code changes irrelevant[/edit]
getScaleString: function (scale, origin) {
var preTranslateStr = L.DomUtil.getTranslateString(origin.add(origin.multiplyBy(-1*scale))),
scaleStr = ' scale(' + scale + ') ';
return preTranslateStr + scaleStr;
},
and
_runAnimation: function (center, zoom, scale, origin) {
this._animateToCenter = center;
this._animateToZoom = zoom;
this._animatingZoom = true;
var transform = L.DomUtil.TRANSFORM;
clearTimeout(this._clearTileBgTimer);
L.Util.falseFn(this._tileBg.offsetWidth); //hack to make sure transform is updated before running animation
var scaleStr = L.DomUtil.getScaleString(scale, origin);
var options = {};
options[transform] = this._tileBg.style[transform] + ' ' + scaleStr;
this._tileBg.transition.run(options);
},
Note that leaflet.js is a packed library and the previous functions are the unpacked leaflet_src.js versions. I put a copy of my modified leaflet-src.js online. You'll need to rename it to leaflet.js and replace the file in the dynmap/web/js directory.
You guys should give the 1.6-alpha-2 a try - we updated Leaflet in 1.6-alpha-1, and alpha-2 includes some additional fixes for problems that popped up due to the move to the new Leaflet.
Excellent! I installed 1.6-alpha-2 and it appears to be working correctly in Chrome.
Fix released in 1.6
When zooming in using Dynmap it does a weird loop thing. I have noticed it is more obvious as the mouse is further away from the centre of the screen. It seems semi like a style thing (as in for show) but is there a way of disabling it?