OpenLayers OpenLayers

Ticket #216 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

Dragging in VE is screwy

Reported by: euzuro Assigned to: euzuro
Priority: minor Milestone: 2.2 Release
Component: Layer Version: 2.1
Keywords: Cc:
State:

Description

Seems like an OL calculation error. This has always been around (for at least as long as EventPane)... but was re-brought to our attention by Brian Levy. Thanks!

Attachments

ve.patch (469 bytes) - added by crschmidt on 10/07/06 21:48:48.
VE Patch to change from PanTo -> setCenter

Change History

08/30/06 05:08:42 changed by euzuro

from cr5's email to dev list:

I think the reason for this bug is this:

  • We call VE's 'setCenter' method
  • We loop quickly again and do a diff between our position and the last time we called setCenter
  • We find the current pixel location in geospace via getLatLonFromViewPortPx.
    • But the center didn't really update immediately, so it's calculated from our *old* Location, and therefore we have mouse drift.

I'm not sure what the solution to this is. I stared at it for about na hour before I gave up, and couldn't think of anything to fix it, because it requires more intimate knowledge of the internals of the mapping API than we have for VE or MultiMap. Essentially, I think that the setCenter call ends up being asynchronous in some way (Though I'm not sure how), and since this is a API-level difference -- you don't see the same bug in Google, but you do see it in MultiMap -- it's probably going to require some API level differences.

The thought I had was to store the previous offset -- which might not have actually been performed -- and if we find out we didn't actually move, then use that. However, I'm not sure about the feasability of that solution -- I didn't get far enough to actually write any code, so it may not work in practice even though it seems to work to me conceptually.

Feedback welcome.

09/14/06 11:24:47 changed by crschmidt

  • milestone changed from 2.1 Release to 2.2 Release.

10/02/06 11:38:27 changed by sderle

  • priority changed from major to minor.

10/05/06 13:09:00 changed by crschmidt

  • milestone changed from 2.2 Release to 2.3 Release.

10/07/06 21:47:41 changed by crschmidt

  • milestone changed from 2.3 Release to 2.2 Release.

When dragging, we currently use PanToLatLon. This means that the action is asynchronous: when we call the next getcenter, the pan operation hasn't completed yet. Instead, we should use SetCenter.

10/07/06 21:48:48 changed by crschmidt

  • attachment ve.patch added.

VE Patch to change from PanTo -> setCenter

10/07/06 21:49:44 changed by crschmidt

Erik or Schuyler, can you review the attached patch and give it a go/no go for inclusion into 2.2? This significantly affects projecting WMS over VE, since our PixelFromLonLat calculations all are affected by its behavior.

10/07/06 21:52:43 changed by crschmidt

  • keywords set to +review.

10/10/06 09:37:46 changed by sderle

this is a very straightforward patch. please apply it.

10/10/06 09:38:36 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.

07/05/07 17:04:14 changed by euzuro

  • keywords deleted.