On Thu, Jul 8, 2010 at 12:10 PM, Pedro Teixeira
<[email protected]>wrote:
> Basiclly is a sort off hit test comparison.
>
Why do you need to do this round-a-bout validation, especially if ...
> The overlays are created from the lat/long of the server in the first place
> so I should be dealing with same values,
>
If you're dealing with the same values, why are you validating them?
> but I'm dealing with latitude/longitude values that are being automaticlly
> converted for example:
>
> The longitude that creates one of the Geopoint retrieved from the server is
> : -16.9073252
> The longitude from the actual GeoPoint that was created is : -16.907326
>
How are you doing your conversions? I would always go one way, from the
server double values to GeoPoint's long values by simply scaling the values
by 1E6. You should theoretically always get the same values.
Or put in some delta value that is low enough to be considered negligible,
like 0.000001.
So if (localValue - serverValue < 0.000001) { consider_them_equal(); }
That being said, it still sounds like your server side check is redundant
and unnecessary.
-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en