Basic4android Share Your CreationsShow 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.
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...
__________________
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.
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.
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
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(ArrayAsString("Marker 1","51.0","6.0","128","0","0")) MarkerListe.AddAll(ArrayAsString("Marker 2","51.1","6.0","0","128","0")) MarkerListe.AddAll(ArrayAsString("Marker 3","51.0","6.1","0","0","128")) MarkerListe.AddAll(ArrayAsString("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.....
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000, Motorola Razr, Dekstop: Asus Eee PC
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.
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'.