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

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

Basic4android Share Your Creations Show your creations. Please upload source code if possible. You can use File - Export As Zip to create the zip file.
The first attached image will be displayed as the thread preview image.

Openstreetmap Tilemapviewer

Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 02-18-2011, 01:33 PM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 345
Default New Version of OSM-TileMapViewer

Hello! Here is my new Version of the OSM-TilemapViewer. Because of the problems with the online-maps, it is only a offline-mapviewer, but with some interesting features. Thanks ZJP and Klaus for the code, which I have used in the current version:

I have tested it on my samsung galaxy tab and it runs very fine. Because of the high resolution of the tab with 600x1024, I have grown up the tile-field. The map is now 5x5 Tiles. Please call back for devices with lower resolutions...

The new features are:

- center the map to the given gps-position and scroll it around the center of the screen
- an arrow shows the driving-direction
- zoom in and zoom out by centering the gps-position
- scrolling the map by finger or navigation-buttons, and center the given gps-position by using the c-button
- Please use a network-connection for the reverse geocoding function: Every 3 seconds, the street and the village is updating in the panel at the bottom of the screen. By clicking the panel, a messagebox with some informations about the Position will be shown.

for the most comments in german....

I have download the maptiles to test it with the OSMandmapcreator (look above). Please adapt the path for the tiles (I have used Osmarender)

I think I will try some more features in future:

- online-maps
- show more markers in the map
- create a nightview, if it is possible
- calculate a position in the map to the lat/lon (the reverse of the sub CalculateTileXY)

Best regards...
Attached Files
File Type: zip MapViewer4.zip (48.8 KB, 158 views)
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000, Motorola Razr, Dekstop: Asus Eee PC

Last edited by schimanski : 02-18-2011 at 01:36 PM.
Reply With Quote
  #32 (permalink)  
Old 02-18-2011, 03:14 PM
Cor Cor is offline
Senior Member
 
Join Date: May 2007
Posts: 499
Default

Hello,

I want to help for the online maps,
don't know what the problem right now is, can you update me?

Do you have some startcode(online maps) for the latest version?

my wish list:

1. add reference layer ( acad dxf) or shape files (.shp)
2. add markers
3. change marker color
__________________
Best regards,
Cor de Visser, Netherlands, HTC Magic 2.2.1

Amazing Guitar Chords for Android
http://android.ready4music.com
Reply With Quote
  #33 (permalink)  
Old 02-18-2011, 04:36 PM
Cor Cor is offline
Senior Member
 
Join Date: May 2007
Posts: 499
Default

from android OSMAnd
when i download for offline maps (Netherlands)

i got directory \osmand\tiles\Mapnik\14\8840\5427.png.tile
\xx\xxxxx\xxxx.png.tile

how to handle this, or what must i do for the correct tiles download
__________________
Best regards,
Cor de Visser, Netherlands, HTC Magic 2.2.1

Amazing Guitar Chords for Android
http://android.ready4music.com
Reply With Quote
  #34 (permalink)  
Old 02-18-2011, 09:45 PM
Junior Member
 
Join Date: Nov 2010
Posts: 13
Default Thank you

Schimanski, thanks for the new code. I am looking through it now.
Reply With Quote
  #35 (permalink)  
Old 02-20-2011, 08:46 AM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 345
Default

Hello Cor. The path and the filesnames of osmandmapcreator can be used in the mapviewer without problems. The tiles with the ending png.tiles are normal .png files. You only have to rename the folder osmarender, when you don't get osmarender tiles. If you get mapnik, adapt the path in the mapviewer to mapnik, like your last post.

Thanks for your help. I will post the last onlineversion later. The online version downloads the right tiles and put it to the right directory, thats fine. But by scrolling with the fingers, some tiles are set to a wrong position. I think, that the reason for that is, that the map scrolls to fast. Until some tiles are loaded, they ae no longer needed. By scrolling with the navigation buttons, the map loads correct.

I call back with the last online version...
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000, Motorola Razr, Dekstop: Asus Eee PC

Last edited by schimanski : 02-20-2011 at 08:50 AM.
Reply With Quote
  #36 (permalink)  
Old 02-21-2011, 10:36 AM
Cor Cor is offline
Senior Member
 
Join Date: May 2007
Posts: 499
Default

When i try to download with osmand on my device for the Netherlands

i get input/output error/ at the end of the download

Is there a way to extract the obf file ( to png files) which I can download from a site?
__________________
Best regards,
Cor de Visser, Netherlands, HTC Magic 2.2.1

Amazing Guitar Chords for Android
http://android.ready4music.com
Reply With Quote
  #37 (permalink)  
Old 02-22-2011, 08:14 AM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 345
Default

Hello Cor!

I don't know the reason for the input/output - error and I don't know, which format the .obf-file is. Normaly, the osmandmapcreator downloads the tiles as .png.tile.

If this doesn't run, you can use the link to the PDATileManager from corwin42 (see above).
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000, Motorola Razr, Dekstop: Asus Eee PC
Reply With Quote
  #38 (permalink)  
Old 03-01-2011, 03:03 PM
schimanski's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Germany
Posts: 345
Default New Version of OSM-TileMapViewer

I have mad a new OSM-TileMapViewer with the following features:

Old featuers:
- center the map to the given gps-position (= C_Ziel) and scroll it around the center of the screen
- an arrow shows the driving-direction
- zoom in and zoom out by centering the gps-position
- scrolling the map by finger and center the given gps-position by using the c-button
- Please use a network-connection for the reverse geocoding function: Every 3 seconds, the street and the village is updating in the panel at the bottom of the screen. By clicking the panel, a messagebox with some informations about the Position will be shown.

New features:

- You can now show two dynamic icons in the map. C_Ziel is the gps-position, which is shown in the middle of the map and scrolls the map, if it is needed. M_Ziel is a secondary icon, which 'drives through the map', when the zoomlevel is little enough. So it is possible for example, to show gps-data, which you get from a server and your own gps-position.
- Now you can draw markers with sperate names and colors in the map. Under

Code:
'Marker initialisieren'
Sub Init_Marker  
    
'MarkerListe.AddAll(Array As String(Bezeichnung, Latitude, Longitude, Farbe(Rot,Gr�n,Blau))
    MarkerListe.AddAll(Array As String("Marker 1","51.0","6.0","128","0","0"))
    MarkerListe.AddAll(
Array As String("Marker 2","51.1","6.0","0","128","0"))
    MarkerListe.AddAll(
Array As String("Marker 3","51.0","6.1","0","0","128"))
    MarkerListe.AddAll(
Array As String("Marker 4","51.1","6.1","128","0","0"))
End Sub
you can init your markers. I have tested it with up to 40 markers and on my galaxy tab, there is no different to the speed. While the positions of the markers are calculated new every second, it is also possible to change the positions of the markers, so that all markers could be used as dynamic icons (For example "Flottenmanagemet").
I think, when you use more than 100 markers, it is better not to calculate the positions of the markers every second. You can than calculte it once at the beginning and saves the positions in variables.

- With the button T/N, you can change from day to night vision and with RGC on/off, the Reverse Geocoding could set on and off.


Under Google Online Mapviewer, i have made a short online mapviewer for google maps. You can show your gps-position in the middle of the map and it is possible to change between four different maptypes. It is only a try with a small and simple code, perhaps there is someone, who can use it.

The only problem is, that google blocks your IP, after more than 1000 downloads in 24 hours. I have reached this by my tests and it is very .

Perhaps, someone has another link to satellite and hybrid maps, which are not from google.....
Attached Files
File Type: zip Mapviewer5.zip (52.9 KB, 196 views)
File Type: zip Google Online Mapviewer.zip (5.6 KB, 212 views)
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000, Motorola Razr, Dekstop: Asus Eee PC
Reply With Quote
  #39 (permalink)  
Old 03-01-2011, 08:40 PM
Knows the basics
 
Join Date: Jan 2011
Location: Waterloo, ON, Canada
Posts: 160
Default

Quote:
Originally Posted by schimanski View Post
Under Google Online Mapviewer, i have made a short online mapviewer for google maps. You can show your gps-position in the middle of the map and it is possible to change between four different maptypes. It is only a try with a small and simple code, perhaps there is someone, who can use it.

The only problem is, that google blocks your IP, after more than 1000 downloads in 24 hours. I have reached this by my tests and it is very .

Perhaps, someone has another link to satellite and hybrid maps, which are not from google.....
I took a quick look at the code in the Google MapViewer and am wondering why you use a timer instead of setting GPS filters. With Filters for instance you can avoid hitting the Google site unless your GPS moves a significant distance.

BTW, that is an excellent upgrade to just receiving a static map.
Reply With Quote
  #40 (permalink)  
Old 03-05-2011, 06:23 PM
klaus's Avatar
Basic4android Veteran
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 6,531
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi schimanski,

Attached you find Version 5.1 with the two routines we spoke about in PM's and some other small changes.
Please test the program to make shure that I didn't add some 'mess'.

Best regards.
Attached Files
File Type: zip MapViewer51.zip (16.7 KB, 262 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
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


All times are GMT. The time now is 03:25 PM.


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