node-mapnik icon indicating copy to clipboard operation
node-mapnik copied to clipboard

Fully featured layer API

Open springmeyer opened this issue 12 years ago • 1 comments
trafficstars

The layer API dates to the first days of the node-mapnik bindings, and we should return to this API and harden it so that it is robust to create layers and datasources on the fly, cache them in flexible structures without the overhead of copies/re-creation of instances, and add them to a map for rendering - or pass directly into mapnik's feature_style_processor for more direct rendering access (without needing a map to be around).

  • [ ] - Need to ensure all mapnik::layer properties are exposed (group-by and buffer_size is missing)
  • [ ] - Need to ensure you can control how layers are added to a map - either a copy or a reference
  • [ ] - Need tests of object lifetimes - ensure ownership is passed and memory is valid
  • [ ] - provide a layer array structure to be able to pass to map / get off of a map?
  • [ ] - Fast clone of datasources for a fast copy of layer instance

springmeyer avatar Jul 23 '13 18:07 springmeyer

noting: likely easiest would be to just expose all layer functionality via a json config - this dodges all lifetime/copy/move issues and would be very simple. So basically just implement a little map json config that could be seen as a replacement, if you wanted, for Mapnik XML but just for layers.

springmeyer avatar Sep 23 '14 18:09 springmeyer