-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathmapnik_feature.hpp
More file actions
31 lines (28 loc) · 940 Bytes
/
mapnik_feature.hpp
File metadata and controls
31 lines (28 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
// stl
#include <memory>
// mapnik
#include <mapnik/version.hpp>
#include <mapnik/feature.hpp>
//
#include <napi.h>
class Feature : public Napi::ObjectWrap<Feature>
{
public:
// initialiser
static Napi::Object Initialize(Napi::Env env, Napi::Object exports, napi_property_attributes prop_attr);
// ctor
explicit Feature(Napi::CallbackInfo const& info);
// methods
static Napi::Value fromJSON(Napi::CallbackInfo const& info);
Napi::Value id(Napi::CallbackInfo const& info);
Napi::Value extent(Napi::CallbackInfo const& info);
Napi::Value attributes(Napi::CallbackInfo const& info);
Napi::Value geometry(Napi::CallbackInfo const& info);
Napi::Value toJSON(Napi::CallbackInfo const& info);
inline mapnik::feature_ptr impl() const { return feature_; }
static Napi::FunctionReference constructor;
private:
mapnik::feature_ptr feature_;
mapnik::context_ptr ctx_;
};