Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Open Street Maps (OSM) Tile Viewer

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 11-03-2010, 08:38 PM
DieterR's Avatar
Junior Member
 
Join Date: Jun 2007
Location: Germany, 30 km south of Munich
Posts: 21
Default Added improved program sample

Hi,

I just uploaded an improved version of my OSM Tile Viewer sample app. The major problem of the previous version was, that the GPS position was only correct shown in case of higher zoom levels (>10). The reason was the very simple algorithm I used. Now I spend a few hours in mathematics to find a better solution.

I think, the new version is more than sufficient precise for mobile applications. It shows the GPS position correct within a few pixels for all zoom levels: 0 - the whole earth, up into the range of the GPS precision.
A further major improvement regards to different screen size resolutions. The map will not longer be stretched when other screens than 320x240 are used.

It should be easy for you to add further map tiles side by side to fill larger screens ...

DieterR
__________________
What would we do if computers don't waste our time ...
Reply With Quote
  #12 (permalink)  
Old 11-09-2010, 09:43 AM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi DieterR

thank you for your OSM Tile Viewer sample app. The App works great on my HTC HD, with the internal GPS.

Questions please.
Would it be to much trouble to center the GPS Position on the Map?
I would like to use the external Bluetooth Device. The Com Port on the HTC would be Com8. Would I need to change the OSM Tiles Config Settings, in order to use my external Bluetooth Device.
Please Advice.

Edit: I tested your App in the Field on my HTC Unit. Your right, it's off a few Pixels. When Zoom to 14 or 15 GPS Position is a few Pixel's past the real time Position.
As with the external Com8 matter, I have not got this to work yet. Please Advice how this can be done.

Edit: OK. Made a Change in the OSM Tiles Config. Sys.
GPSAuto=false
#COM8 and Baud if Auto=no
COM8
Baud4800
now work's with external Bluetooth Device on HTC.

Another Question please. I would like to use a Label to show Lat / Lon.

Code:
form1.FDrawString("GPS: "& Format(GpsData.lat,"n4") & " : " & Format(GpsData.lon,"n4"),10,2,38,200,56,cBlack)
Label9.Text.FDrawString("GPS: "& Format(GpsData.lat,"n4") & " : " & Format(GpsData.lon,"n4"),10,2,38,200,56,cBlack)
this does not work for me, what would be the correct code for using a label?

Thank you for your Time and Help.

Best regards.

PS> Keep up the great Work on this APP, it's just Great. :-)

William

Last edited by wm.chatman : 11-09-2010 at 01:21 PM.
Reply With Quote
  #13 (permalink)  
Old 11-10-2010, 08:53 PM
DieterR's Avatar
Junior Member
 
Join Date: Jun 2007
Location: Germany, 30 km south of Munich
Posts: 21
Default

Hi William,

Quote:
Questions please.
Would it be to much trouble to center the GPS Position on the Map?
Quote:
PS> Keep up the great Work on this APP, it's just Great. :-)
I have already much trouble with this issue. Please, google to "KDR GPS MAP". You can download my "ready to use App" with many features from Heise or my HP. I spend a few hundred hours in it. It works fine for higher zoom levels. But it is a very hard work to improve the precision for lower zoon levels. It requires a very complex computation because of seamless zoom and map moving in combination with the mercator projection of the map tiles.

Quote:
Another Question please. I would like to use a Label to show Lat / Lon.
The text made by FDrawString might be immediately erased by the function "form1.FErase(....)" when the GPS cursor is refreshed. Either limit the FErase area or create a smal panel and add a label on it.
__________________
What would we do if computers don't waste our time ...
Reply With Quote
  #14 (permalink)  
Old 11-11-2010, 01:18 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi DieterR

I have downloaded your KDR GPS Map, and tested this on my HTC in the Field.
I noticed that you solved your Zoom and Pixel Problem, and it’s much better now.
Would you maybe be willing to correct the Zoom and Pixel Matter, in your OSM Tile Viewer sample App.?
Reply With Quote
  #15 (permalink)  
Old 11-11-2010, 09:48 PM
DieterR's Avatar
Junior Member
 
Join Date: Jun 2007
Location: Germany, 30 km south of Munich
Posts: 21
Default

Hi William,

Quote:
I noticed that you solved your Zoom and Pixel Problem, and it’s much better now.
No, these are two very different apps.
In my "KDR GPS Map" the GPS position will not be shown at zoom levels < 8 because it would have a big deviation. The deviation is caused by the linear algorithm used. It does not care the non linear distances within a mercator map. That algorithm works fast and is sufficient precise for zoom levels as used for hiking and biking (12 - 16). In case of proper GPS signals (no buildings, no trees) you can see wheater you are at the left or right side of a street.

I optimized the OSM Tile Viewer to show the GPS position at all zoom levels. I checked it with several significant points in the whole earth view (zoom level 0) and others. (For such verifications I am using a GPS simulator, not the real outdoor site.).

Quote:
Would you maybe be willing to correct the Zoom and Pixel Matter, in your OSM Tile Viewer sample App.?
Not yet, because the problem is not solved.
Let me try to explain it:
In my map app there are 2 x 9 map tiles in an intermediate layer to assemble the moveable map picture (map background, map foreground, routes and waypoints ...). An area of this intermediate layer is "zoomed" to the screen by using the ImageLib.dll. The GPS cursor is drawn directly at the screen foreground layer because it works very fast. For a correct positioning the map coordinates of the intermediate layer have to be transfered via the "zoom mechanism" to the screen. This computation is relatively complex and slow.
  1. An easy solution would be to forget the GPS cursor (and direction arrow) and draw only a GPS track in the intermediate layer. The ImageLib is fast enaugh to refresh the screen every second.
  2. For my map app I am thinking about a solution where the new map viewer algorithm is only applied at lower zoom levels.

--------------------------
Others: In my opinion OSM maps are the best for mobile devices. Why should we not start a new open source project? Later it may be continued with android

Best regards
DieterR
__________________
What would we do if computers don't waste our time ...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scaled Maps klaus Share Your Creations 46 05-27-2011 12:25 PM
Iwant To Open A Image With Windows Picture And Fax Viewer jothis Questions (Windows Mobile) 1 04-26-2010 02:19 PM
Iwant To Open A Image With Windows Picture And Fax Viewer jothis Questions (Windows Mobile) 1 04-26-2010 02:12 PM
Map/Viewer for open street map schimanski Questions (Windows Mobile) 3 10-21-2009 11:43 AM
Display maps klaus Share Your Creations 4 11-11-2008 05:05 PM


All times are GMT. The time now is 12:34 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0