[OpenMap Users] OMGraphicList.findClosest(), OMGraphicHandlerLayer.getList()

From: Tri Tran <tri.tran@sonacom.com.au>
Date: Wed Jan 22 2003 - 00:32:47 EST

Hi all,

Have anyone solve this problem in OMGraphicList.findClosest(x,y,limit), I
have layer extend from OMGraphicHandlerLayer

// get the graphic list
OMGraphicList l = getList();
// compare and look for closest the cursor's cordination with graphics'
coordination.
OMGraphic omgr = l.findClosest(e.getX(), e.getY(), 2.0f); //2 pixels limit

It work fine at the first instant, but when you move the map (like zoom
in/out, navigate left/right), the graphics on map is no longer at the old
coordination but the graphic list is not updated, there for when move the
mouse to the graphic at the new position, the .findClosest() can't find any.

I may get away with lat/long, but it won't work well with different zoom
mode.

Thanks

--
[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 Wed Jan 22 00:32:18 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:34 EDT