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



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


ETERFANT Dental LED Flash Photography Oral Cell Phone Camera Filling Light Tools picture

ETERFANT Dental LED Flash Photography Oral Cell Phone Camera Filling Light Tools

$63.89



LP Weather Logic Seam And Flashing Tape (boxes) picture

LP Weather Logic Seam And Flashing Tape (boxes)

$200.00



NEW Flash Technology White Xenon Tower Flashtube Lighting:  H18030CF  picture

NEW Flash Technology White Xenon Tower Flashtube Lighting: H18030CF

$120.00



Schneider Electric XBTZGM256 256MB Compact Flash Card picture

Schneider Electric XBTZGM256 256MB Compact Flash Card

$212.23



JOHNSON CONTROLS 031-02755-003 Flash Card For YORK YCAL YCUL Control Board. NEW picture

JOHNSON CONTROLS 031-02755-003 Flash Card For YORK YCAL YCUL Control Board. NEW

$248.99



REVELPROG-IS (ICSP FLASH SPI BIOS PROGRAMMER) + SOIC-8 200mil + SOIC-8 CLIP picture

REVELPROG-IS (ICSP FLASH SPI BIOS PROGRAMMER) + SOIC-8 200mil + SOIC-8 CLIP

$190.00







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