Thanks Frank, and Thanks Raymond,

Really great help and support.

greatly appreciate it..

Cheers
Hasn




On Sat, Jun 19, 2010 at 2:15 AM, Frank Weiss <fewe...@gmail.com> wrote:

> Here's what I came up with (untested). It also solves the problem of
> having to setup the calculation for each point to be tested.
>
> class BoundsFilter {
>    int centerLatE6;
>    int centerLngE6;
>    int latRadiusE6;
>    int lngRadiusE6;
>    public BoundsFilter(MapView map) {
>        centerLatE6 = map.getMapCenter().getLatitudeE6();
>        centerLngE6 = map.getMapCenter().getLongitudeE6();
>        latRadiusE6 = map.getLatitudeSpan() / 2;
>        lngRadiusE6 = map.getLongitudeSpan() / 2;
>    }
>    public boolean inside(GeoPoint point) {
>        int latDeltaE6 = point.getLatitudeE6() - centerLatE6;
>        int lngDeltaE6 = point.getLongitudeE6() - centerLngE6;
>        return Math.abs(latDeltaE6) <= latRadiusE6 &&
> Math.abs(lngDeltaE6) <= lngRadiusE6;
>    }
>  }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 

(Hasn) Hasnain AlTaiar
Web Developer
TayTech Smart Solutions
http://TayTechs.com
h...@taytechs.com
Mob.  +61 422 04 2629

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to