Skip to content

Commit

Permalink
Added shape type constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Boudreault committed Dec 16, 2013
1 parent e8063b9 commit 0bca059
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mapscript/v8/shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ void Shape::Initialize(Handle<Object> target)
NODE_SET_PROTOTYPE_METHOD(c, "add", addLine);
NODE_SET_PROTOTYPE_METHOD(c, "setGeometry", setGeometry);

NODE_DEFINE_CONSTANT(c->GetFunction(),
"Point",MS_SHAPE_POINT);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Line",MS_SHAPE_LINE);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Polygon",MS_SHAPE_POLYGON);
NODE_DEFINE_CONSTANT(c->GetFunction(),
"Null",MS_SHAPE_NULL);

target->Set(String::NewSymbol("shapeObj"), c->GetFunction());

constructor.Reset(Isolate::GetCurrent(), c);
Expand Down

0 comments on commit 0bca059

Please sign in to comment.