[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] DropAction Coordinate from DropEvent won't convert correctly
|
Hello all,
I have a noob kind of problem, pixelToWorld doesnt seem to be converting my
screen coordinates correctly to the specific layer I am dropping on. The
coordinates are "off" sometimes by a significant percentage. Here is an
example of the code I first attempted:
clickedLocation =
ApplicationGIS.createContext(ApplicationGIS.getActiveMap()).pixelToWorld(this.getEvent().x,
this.getEvent().y);
I've also used this:
clickedLocation =
currentMap.getViewportModel().pixelToWorld(this.getEvent().x,
this.getEvent().y);
I suspect its something to do with the CRS of the layer I am drawing on - is
there a snippet of code out there that will resolve this regardless of the
layer I am dropping onto? This code is embedded inside a DropAction object
added through the usual extension mechanism, thus the event I am using is a
DropEvent - if that makes any difference...
Kind Regards,
Pete Cornwell
--
View this message in context: http://www.nabble.com/DropAction-Coordinate-from-DropEvent-won%27t-convert-correctly-tf3021691.html#a8392444
Sent from the udig-devel mailing list archive at Nabble.com.