[FOSS-GPS] Instance-IDs for osm-gps-map's `image' API (was: FoxtrotGPS Mapping Library)

Joshua Judson Rosen rozzin at geekspace.com
Thu May 20 01:14:38 EDT 2010


John Stowers <john.stowers.lists at gmail.com> writes:
>
> > > 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)

Indeed--not just the interface, but the implementation would also be
identical. Ideally, I'd suggest just adding the extra argument to
osm_gps_map_image_remove(), and changing the osm_gps_image_add() so
that it returns its image_t pointer as the opaque identifier
(cf. attached patch).

The only reasons that I suggested a new function with "poi"
in the name were that I wasn't sure you were ready to break
backward-compatibility, and I couldn't think of a better term for
a `specific instance of an image associated with a distinct point'
(or `specific image-bearing point in which client code is interested')
than "POI" :)

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Include-instance-identifiers-in-the-image-API.patch
Type: text/x-diff
Size: 5026 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/foss-gps/attachments/20100520/ceb45407/0001-Include-instance-identifiers-in-the-image-API.bin


More information about the FOSS-GPS mailing list