BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-16-2008, 04:02 PM   #1
thewarlock
Knows Where the Search Button Is
 
Join Date: Aug 2005
Location: SF bay
Model: 8120
PIN: 246B95C5
Carrier: T-Mobile
Posts: 21
Default need help with blackberry maps

Please Login to Remove!

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?
Offline  
Old 06-16-2008, 07:42 PM   #2
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

Quote:
Originally Posted by thewarlock View Post
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);
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Beautiful Leather Journal - Vintage Brown picture

Beautiful Leather Journal - Vintage Brown

$10.20



10 Rolls - ASSORTED COLORS - Vintage DYMO Labeling Tape 3/8

10 Rolls - ASSORTED COLORS - Vintage DYMO Labeling Tape 3/8" x 144”

$19.95



Vintage Journal 220 Antique Paper 7 X 5 inches Leather Bound Handmade Diary picture

Vintage Journal 220 Antique Paper 7 X 5 inches Leather Bound Handmade Diary

$19.79



Vintage Craftsman air compressor pump picture

Vintage Craftsman air compressor pump

$75.00



Flat File Vintage Large Brown Wooden Drafting Cabinet picture

Flat File Vintage Large Brown Wooden Drafting Cabinet

$250.00



FIBRE METAL SUPERLITE (USA) Vintage Blue Anodized Aluminum Hard Hat picture

FIBRE METAL SUPERLITE (USA) Vintage Blue Anodized Aluminum Hard Hat

$70.00







Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.