You can clone with
Current implementation requires every member function to do something like :
This makes implementing/maintaing datasources a cumbersome process - you have to remember to check state, call init function .
One solution would be to move bound / unbound logic to mapnik::Layer and to ensure one-step initialisation in datasource objects.
Okay, starting to move on this cleanup at https://github.com/mapnik/mapnik/tree/move_bind_logic_to_layer. This will mean removing the bind argument.
It will mean that lazy/late initialization of datasources will be default - they will only be created when needed - at render time.
The previous functionality of bind=false (whereby datasources could be validated by not actually being bound) could potentially be maintained by adding a static ds.is_valid() function that checks for valid params being present before initialization.
"bind-less" implementation : https://github.com/mapnik/mapnik/tree/move_bind_logic_to_layer
We can add 'bind' parameter to the layer object if needed.
This is waiting on me to merge into master after reviewing, adding backwards compatibility, and updating any tests that need it. thanks for your patience!
@springmeyer ? :)
okay, just not getting to this, so pushing off milestone - will take a fresh look after 2.1 release. Still on my plate to do this.
bind arg is going away in mapnik soon (mapnik/mapnik#962) so remove i…
…t - also closes #124
remove bind option for datasources - refs #962
closing, handled by #1654, #1655, and #1656.
Merge pull request #1654 from mapnik/no-bind
Remove bind option for datasources closes #962, reverts #622, refs #1655 and #1656