Hi Alwynn, I'm moving your question across to the users list.
Take a look at the new JMapPane code on trunk. Specifically the JMapPaneMouseEvent class... http://svn.osgeo.org/geotools/trunk/modules/unsupported/mappane/src/main/java/org/geotools/gui/swing/event/JMapPaneMouseEvent.java ...which gets an AffineTransform from the JMapPane.getScreenToWorldTransform() method to do the coord conversion. http://svn.osgeo.org/geotools/trunk/modules/unsupported/mappane/src/main/java/org/geotools/gui/swing/JMapPane.java Hope this helps, Michael 2009/3/10 alwynn <alwyn.no...@epiuse.co.za>: > > Hi > > I'm building and displaying a map in a JMapPane from data retreived from > oracle spatial(country boundaries). > The map contains a feature collection (layer) of coordinates [points]. The > feature collection was created not from spatial data but a plain jdbc query > to oracle to retrieve the long/lats and then adding it to a Feature > Collection. This works and looks very cool. > > I've added a mouse listener on the jmappane that should do the following on > click: > determine which feature was clicked. Does anyone know how to convert the x,y > point clicked relative to frame (The result of MouseEvent e .... e.getPoint) > to a coordinate contained in my Feature collection? > Any ideas? > > Thank you > -- > View this message in context: > http://n2.nabble.com/pixel-to-coordinate-conversion-tp2454400p2454400.html > Sent from the geotools-devel mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Geotools-devel mailing list > geotools-de...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users