[OpenLayers-Users] map randomly jumps when zooming/panning.
enableKinetic issue?
Daniel Behr
daniel.behr at hzg.de
Tue May 15 00:44:22 PDT 2012
Hello,
I recently switched to OL2.12rc3 and also enabled kinetic dragging.
Since then, I sometimes see the map jumping to somewhere when
panning/zooming.
I dont know how to reproduce the issue, it happens only once each few
hundred movements. It could be related to the kinetic dragging. It seems
to me the view jumps to a random place far away when the mouse is
released after pulling the map. I think it even jumps to another zoom
level and the map also moves in one direction at a constant speed (like
google earth) until the next mouse action or until it reaches the
restrictedExtent. It always stays inside the restrictedExtent, though.
My map [1] and baselayer [2] definitions included below.
Has anyone seen this before?
Daniel
[1]
var map = new OpenLayers.Map('map', {
projection: projMerc,
displayProjection: proj4326,
allOverlays: false,
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
20037508.34, 20037508.34),
controls: [ // more Controls added later
new OpenLayers.Control.Navigation({
mouseWheelOptions: {interval: 20, cumulative: false},
dragPanOptions: {enableKinetic: true}
}),
new OpenLayers.Control.ScaleLine({
topOutUnits : 'nmi',
bottomOutUnits: 'km',
topInUnits: 'nmi',
bottomInUnits: 'km'
}),
new OpenLayers.Control.LoadingPanel(),
new OpenLayers.Control.Attribution()
],
numZoomLevels: 20,
maxResolution: 156543.0339,
restrictedExtent: new OpenLayers.Bounds(-3530000, 3760000, 5020000,
11540000),
units: "m"
});
[2]
var osm = new OpenLayers.Layer.TMS("OpenStreetMap",
"../tilecache/", {
layername: 'osm',
isBaseLayer: true,
type: 'png',
transitionEffect: "resize",
units: "m"
});
Helmholtz-Zentrum Geesthacht
Zentrum für Material- und Küstenforschung GmbH
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany
Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Ganß
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig Wilfried Kraus
Amtsgericht Lübeck HRB 285 GE (Register Court)
Internet: http://www.hzg.de
More information about the Users
mailing list