2010-10-24 08:04:16 +00:00
|
|
|
#ifndef HELLO_FEATURESET_HPP
|
|
|
|
#define HELLO_FEATURESET_HPP
|
|
|
|
|
|
|
|
// mapnik
|
|
|
|
#include <mapnik/datasource.hpp>
|
2013-01-04 17:23:06 +00:00
|
|
|
#include <mapnik/feature.hpp>
|
|
|
|
#include <mapnik/unicode.hpp>
|
2010-10-24 08:04:16 +00:00
|
|
|
|
|
|
|
// boost
|
|
|
|
#include <boost/scoped_ptr.hpp> // needed for wrapping the transcoder
|
|
|
|
|
|
|
|
class hello_featureset : public mapnik::Featureset
|
|
|
|
{
|
2011-11-14 03:37:50 +00:00
|
|
|
public:
|
|
|
|
// this constructor can have any arguments you need
|
|
|
|
hello_featureset(mapnik::box2d<double> const& box, std::string const& encoding);
|
|
|
|
|
|
|
|
// desctructor
|
|
|
|
virtual ~hello_featureset();
|
|
|
|
|
|
|
|
// mandatory: you must expose a next() method, called when rendering
|
|
|
|
mapnik::feature_ptr next();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// members are up to you, but these are recommended
|
2012-12-22 04:02:03 +00:00
|
|
|
mapnik::box2d<double> box_;
|
2012-12-20 03:24:52 +00:00
|
|
|
mapnik::value_integer feature_id_;
|
2011-11-14 03:37:50 +00:00
|
|
|
boost::scoped_ptr<mapnik::transcoder> tr_;
|
2012-01-17 22:47:27 +00:00
|
|
|
mapnik::context_ptr ctx_;
|
2010-10-24 08:04:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HELLO_FEATURESET_HPP
|