Author Topic: RMaps SQLite doesn't work...?  (Read 1132 times)

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
RMaps SQLite doesn't work...?
« on: March 10, 2012, 06:02:43 PM »
Hi Neongeo!

I am actually in the evaluation stage of Neongeo. As of my former experience with some other apps like Locus Pro I want to have offline maps - in Neongeo. So I tried from this thread to get the MOBAC 1.80 (as well as the actual 1.9.5) together with the sqlitejdbc-v056.jar. I tested the creation of maps with a tile from OpenStreetMap Mapnik with levels 14 to 18 and with "RMaps SQLite" as format. But I have no luck (neither with 1.80 nor 1.9.5) to get the maps recognized by Neongeo! All which I get is the message: "Failed to add map server!"  :-\

What did I do wrong? You mentioned above, that you tested it with MOBAC 1.8 and it works fine...?  :o

Any suggestions? Or is this a limitation of the "trial version"...?

Kind regards,
Burkhard

Sky King 36

  • Administrator
  • Hero Member
  • *****
  • Posts: 505
  • Airborne!
    • View Profile
    • Sky King 36's Geocaching Profile
Re: RMaps SQLite doesn't work...?
« Reply #1 on: March 11, 2012, 12:01:59 AM »
So, once you move the RMaps file over to your SD card, then what are you doing?  Do you go in and create a custom map server, and from that mapserver settings screen, navigate to your RMaps file?
"It is not the critic who counts; not the man who points out how the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, who does actually strive to do the deed" --Teddy Roosevelt, exerpted

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #2 on: March 11, 2012, 10:00:14 AM »
Hi!

From the main screen I select Settings => Map servers => Add mapserver and give it a name and select the button "None" in the section "Offline Map" and point it to the sqlitedb file which was created with MOBAC and moved it over to a folder called "Downloads" on the SDHC card.

Android 2.3.4 on HTC Sensation

Is there anything wrong? Any suggestions?

The Tares Clan

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 340
    • View Profile
    • My Geocaching Profile
Re: RMaps SQLite doesn't work...?
« Reply #3 on: March 11, 2012, 11:03:49 AM »
Neongeo normally looks for its offline maps in /sdcard/Android/data/com.neongeo.app/files/map. 

Put the file here rather than in Downloads and make sure the path for the offline maps is correct then retry and let us know what happens.
Using HTC Desire Running Custom ROM Oxygen  2.3.1 with Android 2.3.7 (Thalamus 2.6.35.14-stable kernel)

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #4 on: March 11, 2012, 11:29:22 AM »
Thanks for the tip. I moved the file from the "Downloads" folder to "/sdcard/Android/data/com.neongeo.app/files/map" folder, where several other files already exist (from the existing map servers).

But unfortunately, the behaviour is still the same: "Failed to add map server!".  :-\

The version of neongeo is 1.151. Any further ideas...?

€dit: As of what I can see with SQLitebrowser 2, there are 1916 entries in the tiles table. So the file is in principle readable and not corrupted at binary level.
The structure of the tiles table is "x  y  z  s  image". There are also 2 additional tables called "info" and "android_metadata". "info" has 1 entry with "minzoom" and "maxzoom" (-1 and 1) and "android_metadata" has 1 entry "locale" (de_DE).

Is this the correct format?
« Last Edit: March 11, 2012, 11:57:02 AM by BGrosse »

Neongeo

  • Administrator
  • Sr. Member
  • *****
  • Posts: 387
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #5 on: March 11, 2012, 01:12:11 PM »
But unfortunately, the behaviour is still the same: "Failed to add map server!".  :-\

Oh, should have read more carefully. Each map server must have a name of minimum of 2 characters. And a Server URL, which I believe is missing here.

Edit: Added more informative error messages for the next version
« Last Edit: March 11, 2012, 01:18:29 PM by Neongeo »

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #6 on: March 11, 2012, 01:18:21 PM »
Hi Neongeo!

Thanks for your reply!  :)

As for the name, I just wrote "Test" as a name is needed - otherwise I cannot do anything else to go on. But I didn't know that I have to specify a URL!  :o
What should I type in here for the server URL string if I use a offline database locally on my phone? Has this string to be set, but the contect is ignored, if local (offline) maps are used?

Burkhard

Neongeo

  • Administrator
  • Sr. Member
  • *****
  • Posts: 387
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #7 on: March 11, 2012, 01:23:44 PM »
Just type in the correct URL for that map (http://www.neongeo.com/wiki/doku.php?id=map_servers). If a map tile cannot be found from offline file, then it is fetched online.

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #8 on: March 11, 2012, 01:42:34 PM »
Ahh... thanks. That I didn't had in my mind.  :D

I tried this and now my configuration looks as follows:
Code: [Select]
Server Name: OfflineMap
Server URL: http://tile.openstreetmap.org/[z]/[x]/[y].png
Secondary URL:
Offline Map: /mnt/sdcard/Android/data/com.neongeo.app/files/map/Custom File.sqlitedb
Projection: Spherical
Max zoom level: 18
Use secondary server at zoom: None

With this neongeo is accepting my file! YEEEAAAAHH!!

BUT: I turned my phone to complete offline mode and - have no more map! Ok, except the cached ones which he already got online with the above settings before I turned my phone to offline mode. But as far as I scroll out of the screen, there is only grey. Independent of the zoom level (my generated map has the deepest 4 zoom levels). So, he didn't use my generated offline map!

Any thoughts?  :-\
« Last Edit: March 11, 2012, 01:44:40 PM by BGrosse »

Sky King 36

  • Administrator
  • Hero Member
  • *****
  • Posts: 505
  • Airborne!
    • View Profile
    • Sky King 36's Geocaching Profile
Re: RMaps SQLite doesn't work...?
« Reply #9 on: March 11, 2012, 03:34:39 PM »
I have some offline maps for which there is no corresponding map server.  Also, I sometimes want to load an offline map on my device and I want only the original map--that is, I don't want any tils to be loaded dynamically as I walk around or use the device.

In those cases I just create a completely fake server URL.  If I am in an area and at a zoom level where I have a tile in my RMaps file, everything works fine, and if I move out of map coverage or to a zoom level I don't have, I get an invalid mapserver URL error...  Which is what I want.

My point being, that the mapserver URL field has to have something in it, but it doesn't have to be a valid URL if you don't want it to be.
"It is not the critic who counts; not the man who points out how the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, who does actually strive to do the deed" --Teddy Roosevelt, exerpted

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #10 on: March 11, 2012, 03:44:28 PM »
Ok, thats what I thought, too. That is also my preferable way to go.

But as of my latest reply, at the moment, I am not able to use my created map file. I simply get no map displayed in neither zoom level as long as my phone is offline. And in online mode, maps are always being downloaded - my offline map file seems being completely ignored! HMPF!  :o

Neongeo

  • Administrator
  • Sr. Member
  • *****
  • Posts: 387
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #11 on: March 11, 2012, 03:48:28 PM »
But as of my latest reply, at the moment, I am not able to use my created map file. I simply get no map displayed in neither zoom level as long as my phone is offline. And in online mode, maps are always being downloaded - my offline map file seems being completely ignored! HMPF!  :o

I checked the map file you sent me, and it contains only two very close zoom levels from the area (in particular levels 16 and 17). I recommend you to include zoom levels 1-15 too into the map:) Other than that, it works fine.

BGrosse

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: RMaps SQLite doesn't work...?
« Reply #12 on: March 11, 2012, 04:03:03 PM »
I can't understand this, but ok... I will create a very new map file from scratch.

Can I see anywhere in Neongeo which zoom level I am actually using?