mapnik/mapnik — Issue #977: Ability to load/serialize arbitrary map parameters
Author: springmeyer
Created: 2011-12-03 01:43:28+00:00
State: open

`mapnik::Map` is a structure to hold styles and layers along with a limited set of top level attributes like: `width, height, srs, etc` that a necessary for rendering.

Long term Artem and I have discussed looking at removing all attributes off the map and moving them to some new object like `mapnik::Request` so that a `mapnik::Map` would be a cleaner object storing just styles and layers. When rendering a `mapnik::Request` would be constructed and thrown away, avoiding having to set properties on the map that may change between requests/renders.

However calling applications need more than is currently stored on the map to generate a renderable image (like image format), and the more info they can gather easily via the map (without picking apart layers and styles) the simpler life is.

Therefore, it would be useful to be able to attach arbitrary parameters to `mapnik::Map` objects. This would allow calling applications to store their custom, needed info in an easy place while setting us up nicely to experiment with mapnik core providing less formal properties on the map. There could be top level `Parameters` respected during `load_map` and `save_map`, making this easy to use across binding languages.