Quote:
Originally Posted by thewarlock
Hey everyone,
I am making an application that launches blackberry maps from a location document on a server. I would multiply the latitude and longitude by 100,000 as per the documentation but I've run into a problem. The blackberry throws an error when the lat or long is XXX.XXXXXX (e.g. -118.392848). Can anyone tell me how to fix this?
|
Hard to give specific help without a code snippet, or the Exception thrown, but some times the order of casting is important to prevent overflows. This snippet works as expected:
Code:
double lon = -118.392848;
int l = (int)(lon * 100000.0);