Share My Creation GPS Example

legion48

Member
Licensed User
Longtime User
Thanks for that WarWound. Now I'm Getting this:

Compiling code. Error
Error parsing program.
Error description: Unknown type: byteconverter
Are you missing a library reference?
Occurred on line: 108
Dim bc As ByteConverter


Any idea what library this needs?
 

legion48

Member
Licensed User
Longtime User
Thank you Klaus, I have it working now.

What a wonderful example to provide us with, thanks very much.
 

priusfan

Member
Licensed User
Longtime User
thank you Klaus for this complete lesson.

I have a small question regarding the "autoscaling" of the "selector" top right on the map wiew.

I changed your project to accept both orientations and I tested on a phone (HTC HD 800 x 480 scale= 1.5) and a tablet (Asus Transformer TF101 1280 x 752 scale = 1 ).

My question:
I selected hybrid view, so I can switch between map and satellite.
on the phone and not on the tablet, when I zoom-in, the selector changes size, and I would like to understand the mecanism behind.
here are 2 pictures to illustrate:

 

klaus

Expert
Licensed User
Longtime User
There is an option parameter for the MapTypeControl I have not set.
The MapTypeControlStyle, this one is DEFAULT as it has not been changed.
The default style can change according to the screen size.
GoogleMaps documentation.
I change only the MapTypeControlID property. The size and style are automaticaly changed.
You could try to add the MapTypeControlStyle property to see what happens.

Best regards.
 

sheriffporter

Member
Licensed User
Longtime User
Meters per second to MPH

Anybody have a simple routine to convert the GPS speed output from Meters per second to MPH? Or is there a way to format the output with the library?
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Anybody have a simple routine to convert the GPS speed output from Meters per second to MPH? Or is there a way to format the output with the library?

Conversion is simple multiply the output of gps speed by 2.2369362920544, that will give speed in miles per hour
 
Last edited:

sheriffporter

Member
Licensed User
Longtime User
Got that. Any idea how I can format the return so I don't get like 8 numbers past the decimal point? It keeps jumping around...

Here is what I have now: ( tried 0,0,0 and a few other variations, no luck)

lblSpeed.Text = (NumberFormat2(Location1.Speed,1,1,2,False) *2.23)

I would like to have just one digit with no fractions for the output in MPH.
 

klaus

Expert
Licensed User
Longtime User
Anybody have a simple routine to convert the GPS speed output from Meters per second to MPH? Or is there a way to format the output with the library?
Just for your information, the speed conversion does already exist in the GPSExample program. When you touch the header of the speed column the speed unit does change from m/s to km/h to miles/h and so on.
It's done in the UpdateDispSpeed routine in the GPSPaths module.

Best regards.
 

kahonen

New Member
Licensed User
Longtime User
I'm trying to compile the GPS demo and I'm getting the following error:

Compiling code. Error
Error parsing program.
Error description: Unknown type: webviewextras
Are you missing a library reference?
Occurred on line: 138
Dim MapViewerExtra As WebViewExtras


I've seen the other posts about the additional libraries I need and have created an AddLibraries folder and have ByteConverter, Dialogs, WebViewExtras in there.

Anyone offer any further suggestions?

Edited to add: I just checked and I can compile and run the WebViewExtras demo program.
 
Last edited:

kahonen

New Member
Licensed User
Longtime User
Problem fixed. My apologies.

I hadn't used the check boxes to add the libraries.

Amazing the difference reading the manual makes :BangHead:
 

JoanRPM

Active Member
Licensed User
Longtime User
It's a very good example.
I'll have to look in depth. I'm a beginner and I'm still learning how everything works.
Thanks.
 

msains

Member
Licensed User
Longtime User
Number Format Exception

Morning all
When Running the GPS Example on my Galaxy Tab 10.1 or on my HD2 phone I get the following exception:

Error Occurred
An Error has occurred in sub: main_gps1_locationchanged (java line: 1415)
lava.lang.
NumberFormatException
Continue ?

--
The App sterts Ok and picks up several sattelites in the SATS Tab, but will go no further.

btw: I notice that the Altitude reading is '1,653.1' and it seems that the format of this should not have the ',' (comma) in it. Perhaps this is what is troubling the java NumberFormatException.

Is there perhaps a setting in my phone I can change (ie to make the format of the Altitude returned from my GPS 'correct') or is it an omission in the java library that stops it from properly handling an Altitude (or any other number) that is returned with a ',' in the string ?

I'd appreciate some advice on getting this App to work in the same way everyone else seems to have done.
 

msains

Member
Licensed User
Longtime User
Works well

Thanks Klaus
It works nicely on both devices now.

I'm really looking forward to learning from your code

I hope I can contribute something every now and again as a gesture of respect and thanks for your very generous code and postings.

Thanks again

Malcolm
 

alfcen

Well-Known Member
Licensed User
Longtime User
Splitting hairs

Gruetzi Klaus,

Sorry for splitting hairs once again (I think in French you'd say, "splitting hairs into 4 pieces"). Anyway, there are a couple of undefined variables...

Activity Main
MapYCursor: Line 32 (declares MapXCursor twice)

Activity GPSPaths
GPSFilenameOld: line 106
txt: lines 228/252
MapZoomCalculated: line 260
GPSPathModified: lines 280/785

Activity Satellites
txt5: Line 36
 

klaus

Expert
Licensed User
Longtime User
Hallo Robert,
Thank's for having "coupé les cheveux en 4", but I don't consider it like that.
I had'n looked at the code with the IDE version1.8, the new feature showing non declared variables is very useful.
In the first post I updated the program version 1.56

Best regards and thank you.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…