[FOSS-GPS] Auto-zoom with osm-gps-map?
Joshua Judson Rosen
rozzin at geekspace.com
Sun Feb 5 01:49:57 EST 2012
In FoxtrotGPS, we have a function, get_zoom_covering(), which determines
the zoom at which a given area (defined in terms of lat/lon ranges)
will fit onscreen; this is used for autzooming when a track is loaded,
for example. The calculations for this involve lat->pixel and lon->pixel
logic, which exist in libosmgpsmap... but only as private/internal functions
(they're declared in any public header, just in converter.h).
Is there a recommended way of auto-zooming to a fit a particular region
onto the display, in osm-gps-map? Should I just assume projection-type,
tile-size, etc., and implement my own lat2pixel()/lon2pixel() routines
(breaking that abstraction)? Or write my own declarations and use
osm-gps-map's private API (breaking *that* abstraction)? Or...,
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
More information about the FOSS-GPS