garrettrayj / php7-mapnik

PHP extension for geospatial rendering with Mapnik
https://garrettrayj.github.io/php7-mapnik/
MIT License
20 stars 9 forks source link

Render outside map #2

Closed flippmoke closed 8 years ago

flippmoke commented 8 years ago

I would highly suggest for the ease of users who might use your library that you make the agg render method a part of the map object. We do that in node-mapnik, so that you can do map.render(...). I wouldn't suggest that the C++ interface be directly ported basically, I would write it so that the code is more in a "PHP" style.

garrettrayj commented 8 years ago

Thanks for the feedback! I plan to support additional renderers in the future and I'm thinking the easiest way to accomplish it would be letting users decide which renderer to instantiate.

I do agree that some syntax sugar would be nice. In PHP it's common for extensions to maintain a high degree of parity with the underlying library then sweetening the deal in framework specific bundles/modules/add-ons. Watch out for a Symfony bundle soon!