[FOSS-GPS] FoxtrotGPS paint-optimize branch

Sander van Grieken sander at 3v8.net
Mon May 17 17:42:24 EDT 2010


On Monday 17 May 2010 23:08:51 John Stowers wrote:
> On Mon, 2010-05-17 at 22:04 +0200, Sander van Grieken wrote:
> > On Friday 14 May 2010 14:04:34 John Stowers wrote:
> > > > - There seems to be no way to add/manage tile repositories programmatically.
> > > 
> > > Partially correct. There is no way to remove tile repositories
> > > programatically but you are free to pass any string you wish as the
> > > repo-uri property (see python demo for example)
> > 
> > Hmm does this do something smart for the location of the tile-cache directory? If not, 
> > then what cache-dir will it use if I feed it an arbitrary repo uri?
> 
> There are two properties to control this. tile-cache, and
> tile-cache-base. By default, tile-cache is initialised with
> OSM_GPS_MAP_CACHE_AUTO, which means the complete tile-cache directory
> will be 
> 
> /tile-cache-base/md5(repo-uri)/
> 
> where tile-cache-base = osm_gps_map_get_default_cache_directory() =
> XDG_CACHE/osmgpsmap
> 
> If you want complete control of the cache dir then pass your own string
> to tile-cache (not one of the OSM_GPS_MAP_CACHE_XXX constants)
> 
> > 
> > Right now it's quite tricky to integrate with foxtrotgps' repo management 
functionality, 
> > since I have no access to all attributes of the repos.
> 
> Repo URIs are hidden, this is by design so that I can update the
> libarary without changing ABI and thus requiring apps to rebuild. I used
> to have the repo uri strings exposed in the API and it was a bad idea.
> 
> However, you should be able to get the attributes of the map sources
> using
> 
> osm_gps_map_source_xxx functions

Aah excellent, I should have my eyes checked. I overlooked these properties and functions.

> > Yes that works. However I still receive button_press and button_release events when I 
> > click on OSD elements (and thus always get the fine popup window all the time ;-).
> 
> Hmm, I will have a think about whether osm-gps-map should stop the
> emission of these signals if the osd element registers a click.

Maybe the widget shouldn't (I cannot think of any event handler that would do something 
useful with it) but instead the osd layer could still emit these signals. That way you can 
intercept the event from the layer if really needed, and it will emit the events from the 
widget only when not intercepted by the layer.

> > > The next signifigant API break I make (which will probbably be when
> > > someone gives me enough reason) will be to clean up the track interface
> > > so that there is no distinction between the first track (i.e. the
> > > xxx_gps_xxx API) and a more general API for adding/removing/managing
> > > multiple tracks.
> > 
> > Yes that would be awesome. I could use it too for generic line drawing (for instance 
for 
> > the distance functionality in foxtrotgps). Would be even better if there's a way the 
> > specify color or drawing style, so multiple tracks can be better distinguished.
> 
> OK thanks. I will start to implement this.

Cool! Will keep an eye on git ;)

grtz,
Sander



More information about the FOSS-GPS mailing list