Accessing maps from other applications?

Started by Khaytsus, September 05, 2011, 15:27:36

0 Members and 2 Guests are viewing this topic.

Khaytsus

I have been using BackCountry Navigator for about a year for both its in-app capabilities but also the ability to use its tiles outside of the app, namely in my main geocaching app, GeOrg.  Unfortunately satellite tiles don't work, but the OSM tiles I have work fine so I use those while I'm mobile geocaching so I don't use any data and less battery while I'm out caching.

The more I use Locus the more I'm thinking I'm no longer going to use Backcountry Navigator, but I don't want to give up the offline maps in GeOrg.  I could of course just keep the tiles I have downloaded, but I'd prefer to use the more up to date tiles that I have in Locus.

Is it possible to access these externally and if so, is there documentation I can pass onto a developer in order to utilize them?

Thanks!
  •  

Menion

#1
Hello Khaytsus,
  I don't know BCN and even GeOrg so I don't know which map format they use. Anyway locus use SQlite dababase as main map storage or little bit modified version of TrekBuddy format. So if these programs use same format, then there is no problem. Otherwise I cannot help.

  I tested few days before, free version BCN. I was curious why is this app so popular. And after testing, I'm curious more then before. May you say me? Because I cannot find on this app at least something, which is nice. Many free apps, like Orux, Locus Free and next, are by me better then BCN. I also discovered that OutDoor Active maps they use are stolen!! So why is this app so expensive?? Hmm ...

PS: and sorry, I forget to response on your email from AppBrain. Anyway, much better is to chat about it here ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#2
Quote from: "menion"Hello Khaytsus,
  I don't know BCN and even GeOrg so I don't know which map format they use. Anyway locus use SQlite dababase as main map storage or little bit modified version of TrekBuddy format. So if these programs use same format, then there is no problem. Otherwise I cannot help.

  I tested few days before, free version BCN. I was curious why is this app so popular. And after testing, I'm curious more then before. May you say me? Because I cannot find on this app at least something, which is nice. Many free apps, like Orux, Locus Free and next, are by me better then BCN. I also discovered that OutDoor Active maps they use are stolen!! So why is this app so expensive?? Hmm ...

PS: and sorry, I forget to response on your email from AppBrain. Anyway, much better is to chat about it here ...
BCN is popular because a year ago there wasn't any other decent app to do what Locus and a few other similar apps do..  If I had to pick between them today, I'd certainly pick Locus as it has more function.

As for maps being "stolen", that I wouldn't know.  I know the author works with various sources to secure map access and has added and removed maps over the last year, so I would have to say he has permission to use them.  Don't know.

Right now, GeOrg will use the tiles that BackCountry Navigator outputs, however that works, honestly don't know.  I just know there are 256x256 pixel images which are correlated based on the location.  To load a particular tile from one of your SQLite databases, what's going in and out?  Could you give me an example of how to load a Tile from XYZ Database for lat,lon ?  Or is it something I can provide the developer based on TrekBuddy?  I don't know if the GeOrg developer will do it, as he's been pretty quiet for a while, but hopefully I can talk him into it.  :)
  •  

wvb

#3
copy/paste from the changelog of GeOrg 1.1.9:
- Support for Locus-SQLite-Maps

thinks this is what you are looking for :)
haven't tested it myself as I use Vector maps in Locus
  •  

Khaytsus

#4
Quote from: "wvb"copy/paste from the changelog of GeOrg 1.1.9:
- Support for Locus-SQLite-Maps

thinks this is what you are looking for :)
haven't tested it myself as I use Vector maps in Locus
WHAT??  HA!  You're right!  thank you, I must have missed it since I wasn't using Locus until the last few days!  I just downloaded a few states worth of Vectors too, but looks like I'll be keeping the bitmap OSM's I already downloaded for GeOrg.

Works great BTW, it takes about 10s to parse it the first time, after that it's very fast.  And switching between offline and online maps is pretty fast, only a little slow to switch to a different type of offline map.
  •  

Menion

#5
hmm fine. Thanks for answer about BCN. Anyway, please tell me one more thing (because I'm sometimes really curious) ... why are you still using GeOrg?

Also about BCN, I'm in contact with owners of OutDoor active maps, and they confirm me, that BCN use their maps illegal and they're trying to stop all applications from accessing their data. Hope they'll succeed
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#6
Quote from: "menion"hmm fine. Thanks for answer about BCN. Anyway, please tell me one more thing (because I'm sometimes really curious) ... why are you still using GeOrg?
It's a dedicated Geocaching app..  Its workflow is optimized for that task, not "just" points.  I'm certainly glad you've put geocaching tools into Locus, especially some of the radius, centerpoint, etc type tools, but I think the two apps complement each other.  And your presentation of geocaches is quite nice, details, etc.

Only thing I really wish GeOrg had at this point was moving a cache from one database to another.  I like to keep my Find's, including any notes, waypoints, etc, and currently he doesn't have that functionality in there.  Using the Geocaching API would be nice too, but I primarily work from GPX anyway.  And there are two options for On The Fly caching as well, so no biggie.  Otherwise, it's pretty much perfect for me.  It's fast, no fiddling, etc.

If you want my honest opinion on how to make Locus a replacement for GeOrg, I could ponder that one and write it up.
  •  

Menion

#7
i don't think that there is some needed info how to ... because Locus IS already replacement and I think much more (I was just playing with georg few minutes, so my though aren't precious). Did you tried import PQ GPX file into Locus? If not, try ...

EDIT: just about Geocaching tools in locus - these are only a small bonus for my dear geocachers :)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#8
Quote from: "menion"i don't think that there is some needed info how to ... because Locus IS already replacement and I think much more (I was just playing with georg few minutes, so my though aren't precious). Did you tried import PQ GPX file into Locus? If not, try ...

EDIT: just about Geocaching tools in locus - these are only a small bonus for my dear geocachers :)
Oh, sure, I've imported some GPX.  Works very well, quite fast, nice that it'll load multiple GPX directly from a zip, etc.  That all works quite well.

I'll sit down and compare and give you my feedback on my opinion  what could change in Locus to make it a primary geocaching app for me.  That's not to say it's not capable of being the primary app for others.  :)  Maybe do it later today, or in the next few days.
  •  

Menion

#9
fine, if you'll have some time, it will be welcome :) ... thank you!
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#10
Quote from: "menion"fine, if you'll have some time, it will be welcome :) ... thank you!

Quiet day at work, don't tell my boss ;)

Here's the list..  It's not a full function list of either app, but rather the functions I use often in caching.  GeOrg has more function than this, Locus has more function etc, but just specific to geocaching here.

Hopefully it make sense, let me know if any items are not clear.  I have them color coded, the coding is on the right side.  Items in Blue are items I need to answer (ie: try in real life etc) or I'm looking for feedback from you.  Short list:  You're right, 98% there.  Needs waypoint averaging for new caches, a way to remove stale caches (ie: those who have not been imported in N days).  Also, I'm seeing no way to search for a particular waypoint, I need that.  Some other like-to-have's in there.

https://docs.google.com/spreadsheet/ccc ... E&hl=en_US

One thing I want to immediately bring up though..  I've discovered that all of my databases on my phone are READ ONLY and this really pisses off Locus and makes it impossible to update anything.  If I create a new database, no problem.  I think I know the reason, hopefully you can help out here.  I download all of my data on my tablet (2.2.2, stock Dell Streak 7 Wifi), and also import most of my GPX type data into the tablet.  It's obviously easier to do, more screen space, faster, larger battery etc..  So then I exit Locus, run an rsync script which pushes my entire Locus directory up to my Linux workstation.  Then I have an rsync script which pulls it down into my phone (2.2.1, Enom custom ROM, Nexus One).  I've done this with BCN for a long time, although on BCN since everything was tiles etc, the process was faster when I was updating a smallish area.  With Locus, it has to download the entire database.  Not too big a deal.  But it seems to be doing something wonky when I do this and can't write to the databases anymore.  I can't import, I can't add more map cache data, I can't toggle visibility, etc etc..

Any idea what's going on there?  They should be exact copies between the Tablet and Phone on the sd card.  I'm not syncing anything in /data or such.  So the ids, keys etc whatever you have in the databases should match exactly.  This shouldn't be a case of a database getting corrupted because the app is closed and all databases are behaving this way.  I did a sqlite pragma integrity_check on the database on my computer and it checks out okay, so don't think the database itself has an issue.  And this is on a FAT32 SD card, so no file permissions at question here..  Logcat snippet..

I/Database(14126): sqlite returned: error code = 8, msg = prepared statement aborts at 1: [BEGIN EXCLUSIVE;]
E/Database(14126): Failure 8 (attempt to write a readonly database) on 0x34e8e0 when executing 'BEGIN EXCLUSIVE;'

FYI on the computer I also tried the begin exclusive; command on the same DB's, no problem.  I've also tried an SQLite Editor on my phone, and I can open the DB and view data.  Even edited the name of a cache, everything looks okay in this editor.  Even after editing it successfully in this SQLite Editor, I can't modify it in Locus.  The only way I can update in Locus is to delete the SQLite file on the SD card entirely, then re-import.

I can provide you a database, or do anything else you want me to do to diagnose this.
  •  

Menion

#11
firstly - interesting issue. Don't know what can cause this. If you can, upload here one database category that not work on N1, and I'll try to look at it ...

about comparision: amazing list!! :). Have to take some time and read it carefully. It looks you had a loooong day :)

EDIT:
  Ok, so just take first part ... "Waypoint list"
- filtering and sorting, I was working on this yesterday and today so will be improved a little in next version
- Searching waypoints - what you mean by this? You mean searching for cache by cache ID or name, or searching for cache additional waypoints? Because this first is there, second not

 and the second ... "Waypoint maintenance"
- importing updates - yes
- maintain user data - yes
- waypoint averaging - for this exist additional application called GPS Averaging, that cooperate directly with locus
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#12
Quote from: "menion"firstly - interesting issue. Don't know what can cause this. If you can, upload here one database category that not work on N1, and I'll try to look at it ...

about comparision: amazing list!! :). Have to take some time and read it carefully. It looks you had a loooong day :)

EDIT:
  Ok, so just take first part ... "Waypoint list"
- filtering and sorting, I was working on this yesterday and today so will be improved a little in next version
- Searching waypoints - what you mean by this? You mean searching for cache by cache ID or name, or searching for cache additional waypoints? Because this first is there, second not

 and the second ... "Waypoint maintenance"
- importing updates - yes
- maintain user data - yes
- waypoint averaging - for this exist additional application called GPS Averaging, that cooperate directly with locus
Okay, I give, how do you search for waypoints?  I've tried menu, search button, etc..  while in the Points for a catalog.  That's where I'd expect it to work?  EDIT:  Okay, I see, (the physical phone hard button) search button works on Map screen.  Can you add that to the Points screen?  :)  Or maybe everywhere?  Also, my tablet does NOT have a (physical hard button) Search button at all, but I was at least able to add the Locus soft Search button to the map.

For importing, a really important item is expiring stale items..  For geocaches you never know (in terms of PQ) when a cache has been archived except by its absence in the PQs.  Needs to be some way to identify and remove these stale caches from the list.  Show all not updated for N days maybe?  geOrg does this on import, optionally..  if a cache has not been updated in N days in the database you're importing data into (ie:  it's not in the PQ), it'll remove it.  At least I think that's what it's doing, regardless, if a cache is "older than N days" it can remove them, thus keep the list clean of archived caches.

I've attached a test database.  Simple test I'm doing is just going to the Categories and clicking the box to show all in there, and I get a FC out of Locus because the DB is read-only.
  •  

Menion

#13
hmm quite interesting. I tried you file and NO Problem! ... weird. So only what can help me is some log with your crash

about expiration time for geocaches. Ok, as first step, I created ability to display and sort caches by last update time. So now you can see which caches aren't updated for a long time. I know you require some automatical mechanism ... I have to think more about it

anyway from first two parts of your list, all is clear? Searching method is as you discovered. You can access it from menu->functions->search of from right panel. It's only on main map screen because as you can see, it do not contain only search for POI, but much more

so, let's look on third part "waypoint action"
- only problem seems to be some missing call to google maps. As you probably discovered, when you tap on waypoint, there is under last bottom button, call to external applications like google nav, navigon (if installed) and some more. Waze can also be called from external application? Have to check ...

next, "cache hunting"
- quick switch from compass to map? Top left Home button. And back? as you discovered, compass button on right panel for example

"maps"
- no in-app navigation? Tap on waypoint and in bottom menu is guiding and compute path function

"on-the-fly"
 - no, why? simple reason ... all that georg do, violate terms of use of groundspeak! You can anyway use addon G4L, which do some online stuff

"nice to have"
 - "Online shared every time"? Don't understand ...
 - "circles" ... I'll think about it
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Khaytsus

#14
Quote from: "menion"hmm quite interesting. I tried you file and NO Problem! ... weird. So only what can help me is some log with your crash

about expiration time for geocaches. Ok, as first step, I created ability to display and sort caches by last update time. So now you can see which caches aren't updated for a long time. I know you require some automatical mechanism ... I have to think more about it

anyway from first two parts of your list, all is clear? Searching method is as you discovered. You can access it from menu->functions->search of from right panel. It's only on main map screen because as you can see, it do not contain only search for POI, but much more

Searching...  would be nice if it also worked from the Points menu, as I'm most often searching from there.

Quote from: "menion"hso, let's look on third part "waypoint action"
- only problem seems to be some missing call to google maps. As you probably discovered, when you tap on waypoint, there is under last bottom button, call to external applications like google nav, navigon (if installed) and some more. Waze can also be called from external application? Have to check ...

Not sure if it's a generic navigation intent or what?  GeOrg doesn't call specific to Waze, just any app that offers Navigation will show up in the list and I pick.

Quote from: "menion"hnext, "cache hunting"
- quick switch from compass to map? Top left Home button. And back? as you discovered, compass button on right panel for example

"maps"
- no in-app navigation? Tap on waypoint and in bottom menu is guiding and compute path function

Doh!  Works great!
Quote from: "menion"h"on-the-fly"
 - no, why? simple reason ... all that georg do, violate terms of use of groundspeak! You can anyway use addon G4L, which do some online stuff

bcaching is perfectly legit.  But yes, there is a scraping plugin available as well.  What would obviously be ideal here is the Geocaching API.  Here's from one of GC.com's pages:

QuoteIf you are a third party developer interested in using the Geocaching-Live API, please send an email to mailto:bizdev@groundspeak.com">bizdev@groundspeak.com and we will look forward to working with you.

Quote from: "menion""nice to have"
 - "Online shared every time"? Don't understand ...
 - "circles" ... I'll think about it
Online Shared map type.  Right now it always defaults to downloading map tiles into "Separate Map (SQL Type)" and I think it'd be nice to be able to set this default, as I always want it to be "Online shared map (SQL Type)".

Attaching logcat from starting Locus, trying to enable waypoints in a "locked"database, force closing, and then it restarts.  I notice it also offers a Report option, I'll send that to you as well as it might have more info.

BTW, I've decided to narrow down what's rsync'ed to just /sdcard/Locus/maps* and avoid all other stuff..  So my waypoint databases don't get fiddled with, but I still can't add tiles to the databases as they are locked.  But it's a workaround for now.
  •