[FOSS-GPS] FoxtrotGPS Mapping Library

John Stowers john.stowers.lists at gmail.com
Wed May 19 18:44:33 EDT 2010


>> Yes, I guess there are a few ways this could be done without too much pain.
>>  * add an autocenter-mode property and switch-case on that inside the lib
>>  * do the existing autozoom calculation in an internal signal handler
>> that derived classes could intercept/connect before (and hence add
>> their own autozoom behaviour)
>>  * expose the autozoom as a vfunc that derived types could override
>>  * mystery option 4
>
> See my previous mail. A sane default implementation is enough, other modes can be
> implemented in the app quite easily by using set_mapcenter.

Fair enough. Is the current autocenter mode sane enough for foxtrotgps?

>
>> > The map-repository properties are usable, but seem awkward: several
>> > properties that would seem to be more appropriate on an `OsmGpsMapSource'
>> > class ("repo-uri", "tile-cache", "image-format") are instead on the
>> > OsmGpsMap class, which means managing all of these properties individually
>> > in order to support custom map-repositories like we currently do in
>> > FoxtrotGPS. I may just be allocating rope to hang myself here, but would
>> > you be open to expanding the API to include a GObject type for map-sources?
>>
>> Perhaps, although the GObject per map source seems a little complex
>> considering almost all the code in the different sources will be
>> identical. Is there an intermediate option perhaps?
>>
>>  * add OsmGpsMapSource and OsmGpsMapSourceSlippy
>>  * add map-source-object property
>>  * by default map-source-object gets assigned a OsmGpsMapSourceSlippy
>> object with the values pulled from the current MapSource_t machinery
>
> Slippy? Isn't that a view mode? IMO has nothing to do with map sources.

I was using Slippy as the term to describe the format of all these map
sources, i.e. mercator projection and derivation of tile_x and tile_y
from lat/lon/zoom
(http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames). What would
be an adequate term for this?

>
> Anyway, I think I can set both foxtrotgps and internal map sources with the current osm-
> gps-map without too much hassle, so if you really want to change this, please wait until
> osm-gps-map integration is done.

This is not planned to be done anytime soon, the track clean up, the
image/poi stuff is more important IMIO.

>
>> Yes, a patch for this would be great. It would also be worthwhile to
>> rename the functions to osm_gps_map_poi_{add,remove} to match the work
>> going on in the tracks-rework / gtk-3.0 branch.
>
> Please no, keep it generic! I think the _image interface is more then enough (once it uses
> opaque pointers) to handle POIs and anything else that might be rendered this way. So
> don't make it POI specific please!

Good point. I had overlooked this. The image/poi stuff should be the
same API (excepting for the opaque pointer change)

>
> John, I also found another bug in osm-gps-map:
>
> - map scale indicator is incorrect. It is location/center-map specific and changes with
> the latitude.

The current implementation osm_gps_map_get_scale takes the scale at
the center. Do you want me to expose
osm_gps_map_get_scale_at_point (which is currently private)?

>
> And on the wishlist:
> - I would like to have a zoom-changed signal, so I can update the zoom slider when zooming
> in and out with the keybindings or mouse-scrollwheel.

You should be able to connect to "changed" which is called anytime the
bounding box is changed, i.e. zoom or scroll. I should probably also
emit notify::zoom signal here (i.e. patch welcome)

> - tangogps zoomed in and out on the mouse cursor when using the scrollwheel. I'd love to
> see that also working with osm-gps-map.

Umm this is already supported and works in the test app AFAIR (I am
not at my development PC)

>
> Updates in my branch:
> - osm-gps-map mapsources now integrated.
> - track loading and display works, if loaded from file.
> - all keybindings restored (and slightly changed, removed need for modifier keys)
> - friends now shown on map
>
> Still to do:
> - show POIs and Photos, once the _image functions are usable (and refactor friends then
> too)
> - support foxtrotgps map sources, boilerplate already there, need only to set the correct
> properties
> - draw line when in distance mode (using _track functions probably)
> - cleanup code, remove all unused paint code
> - merge to trunk ;-)

Excellent to hear.

I am filing all the bugs you mention as issues on github
(http://github.com/nzjrs/osm-gps-map/issues). It would be great if you
can take a quick look there to see if I have forgotten any of the
things mentioned in your mail.

Regards,

John


More information about the FOSS-GPS mailing list