Don,
I think that algorithm breaks on the dateline, or when the map extents
cross both the dateline and the prime meridian.
Martin
-----Original Message-----
From: Don Dietrick [mailto:dietrick@bbn.com]
Sent: Tuesday, March 02, 2004 12:57 PM
To: Sperlongano Brian M NPRI
Cc: openmap-users@bbn.com
Subject: Re: [OpenMap Users] Lat/Lon Visibility ?
Hi Brian,
You can do something like
boolean isVisible(Projection proj, float lat, float lon) {
Point p = proj.forward(lat, lon);
return
p.getX() >=0 &&
p.getX() < proj.getWidth() &&
p.getY() >= 0 &&
p.getY() < proj.getHeight();
}
- Don
On Mar 2, 2004, at 2:33 PM, Sperlongano Brian M NPRI wrote:
>
> This is probably a really simple question, but is there a way to
> determine if a particular Lat/Lon is visible on a MapBean or
> Projection?
>
> Thanks,
> Brian
> --
> [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"]
>
-- [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"] -- [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 Tue Mar 2 15:22:19 2004
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT