Joshua Judson Rosen <[email protected]> writes: > > 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..., > something else?
Would a new `osm_gps_map_set_bbox' function for osm-gps-map (counterpart to osm_gps_map_get_bbox()) be the right solution? -- "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))." _______________________________________________ This message is sent to you from [email protected] mailing list. Visit http://lists.osgeo.org/mailman/listinfo/foss-gps to manage your subscription For more information, check http://wiki.osgeo.org/wiki/FOSS-GPS
