-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathmapnik_projection.hpp
More file actions
56 lines (47 loc) · 1.52 KB
/
mapnik_projection.hpp
File metadata and controls
56 lines (47 loc) · 1.52 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include <napi.h>
// stl
#include <string>
#include <memory>
namespace mapnik {
class proj_transform;
}
namespace mapnik {
class projection;
}
using proj_ptr = std::shared_ptr<mapnik::projection>;
class Projection : public Napi::ObjectWrap<Projection>
{
friend class ProjTransform;
public:
// initializer
static Napi::Object Initialize(Napi::Env env, Napi::Object exports, napi_property_attributes prop_attr);
// ctorx
explicit Projection(Napi::CallbackInfo const& info);
// methods
Napi::Value inverse(Napi::CallbackInfo const& info);
Napi::Value forward(Napi::CallbackInfo const& info);
Napi::Value definition(Napi::CallbackInfo const& info);
Napi::Value description(Napi::CallbackInfo const& info);
Napi::Value area_of_use(Napi::CallbackInfo const& info);
private:
static Napi::FunctionReference constructor;
proj_ptr projection_;
};
using proj_tr_ptr = std::shared_ptr<mapnik::proj_transform>;
class ProjTransform : public Napi::ObjectWrap<ProjTransform>
{
friend class Geometry;
public:
// initializer
static Napi::Object Initialize(Napi::Env env, Napi::Object exports, napi_property_attributes prop_attr);
// ctor
explicit ProjTransform(Napi::CallbackInfo const& info);
// methods
Napi::Value forward(Napi::CallbackInfo const& info);
Napi::Value backward(Napi::CallbackInfo const& info);
inline proj_tr_ptr impl() { return proj_transform_; }
private:
static Napi::FunctionReference constructor;
proj_tr_ptr proj_transform_;
};