Hi Jukka, Here is the snippet,
should be wrapped in a CursorTool though : // ------------------------------------------------------- // Get Coordinate on click // to prototype GetFeatureInfo // ------------------------------------------------------- import java.awt.event.*; import java.awt.geom.Point2D; // Listen to mouse event on the layerView wc.layerViewPanel.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { // print coordinate in the layerView print("" + e.X + ", " + e.Y); // convert to model Coordinate print(wc.layerViewPanel.viewport.toModelCoordinate(new Point2D.Double(e.X, e.Y))); } }); // ------------------------------------------------------- Michaël > Hi, > > How could I get the pixel coordinates of the clicked point inside the map > window with BeanShell? My aim is to prototype a WMS GetFeatureInfo request > and for that I would need the image coordinates of the point as X and Y. The > top left corner of the map is X=0 and Y=0. Refernce: > http://webhelp.esri.com/arcims/9.2/general/mergedProjects/wms_connect/wms_connector/get_featureinfo.htm. > > -Jukka Rahkonen- > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel