[FOSS-GPS] FoxtrotGPS paint-optimize branch
John Stowers
john.stowers.lists at gmail.com
Mon May 17 17:08:51 EDT 2010
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
>
> > > - I assume I can register event handlers on click events? Will it associate click
> events
> > > with (groups of) images added to the widget?
> >
> > There are two approaches here. If you want to manage clicks totally
> > yourself then just use the normal gtk+ click event API.
>
> 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.
>
> > 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.
Thanks,
John
More information about the FOSS-GPS
mailing list