Hi All,
I created an application that contains the BufferedMapBean, a layer that extends EsriLayer, and a layer that extends OMGraphicHandlerLayer. The OMGraphicHandlerLayer adds several OMRaster objects to its graphic list and calls generate on each of them.
What I am trying to do is show an information dialog when the mouse is pressed within 10 pixels of an OMRaster on the OMGraphicHandlerLayer.
I have a mouse listener inside the class I created that extends OMGraphicHandlerLayer. When the mouse is pressed this listener is called successfully.
THE PROBLEM IS: when I press the mouse on/over the OMRaster the call to OMGraphicList.findClosest(x, y, 10) made in the mouse pressed listener RETURNS NULL. HOWEVER, IF I PRESS THE MOUSE OVER AREAS OF THE MAP WHERE NO OMRASTER EXISTS THE FIND CLOSEST FUNCTION SOMETIMES RETURNS AN OMGRAPHIC.
This leads me to believe there is a problem in getList().generate(getProjection()); which I am calling from the projection changed event handler.
All the OMRaster objects look like they are in the correct location on the map so could be a bug in the get distance function?
I am using RENDERTYPE_LATLON
Also the layer I created that extends EsriLayer works perfectly in that when I press the mouse i get back OMGraphic objects from the findClsest fxn when I have pressed the mouse over the shapes location.
In addition to my problems with findClosest I cannot get an OMGraphic to return from getGraphicThatContains(x,y) fxn. This is the fxn I would actually prefer to use but if findCLosest works I can live with that.
Thanks,
Jason
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Thu Aug 22 19:57:43 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT