update to templated mapnik-geometry
This commit is contained in:
parent
90b6fee2ac
commit
61f42b229d
2 changed files with 7 additions and 6 deletions
|
@ -63,7 +63,7 @@ feature_ptr osm_featureset<filterT>::next()
|
|||
feature = feature_factory::create(ctx_, cur_item->id);
|
||||
double lat = static_cast<osm_node*>(cur_item)->lat;
|
||||
double lon = static_cast<osm_node*>(cur_item)->lon;
|
||||
feature->set_geometry(mapnik::geometry::point(lon,lat));
|
||||
feature->set_geometry(mapnik::geometry::point<double>(lon,lat));
|
||||
}
|
||||
else if (dataset_->current_item_is_way())
|
||||
{
|
||||
|
|
|
@ -10,10 +10,11 @@ hello_featureset::hello_featureset(mapnik::box2d<double> const& box, std::string
|
|||
: box_(box),
|
||||
feature_id_(1),
|
||||
tr_(new mapnik::transcoder(encoding)),
|
||||
ctx_(std::make_shared<mapnik::context_type>()) {
|
||||
// add known field names to attributes schema
|
||||
ctx_->push("key");
|
||||
}
|
||||
ctx_(std::make_shared<mapnik::context_type>())
|
||||
{
|
||||
// add known field names to attributes schema
|
||||
ctx_->push("key");
|
||||
}
|
||||
|
||||
hello_featureset::~hello_featureset() { }
|
||||
|
||||
|
@ -35,7 +36,7 @@ mapnik::feature_ptr hello_featureset::next()
|
|||
mapnik::coord2d center = box_.center();
|
||||
|
||||
// create a new point geometry
|
||||
feature->set_geometry(mapnik::geometry::point(center.x,center.y));
|
||||
feature->set_geometry(mapnik::geometry::point<double>(center.x,center.y));
|
||||
|
||||
// return the feature!
|
||||
return feature;
|
||||
|
|
Loading…
Add table
Reference in a new issue