Permalink
Browse files

disable the JSDatasource since its not a viable idea given the way th…

…at node works currently (and because it appears that node punted for now on using v8 isolates)
  • Loading branch information...
1 parent a977316 commit 7f6fe7d2238fb4e85705782492431fd864250963 Dane Springmeyer committed Jun 24, 2012
Showing with 9 additions and 13 deletions.
  1. +2 −0 src/mapnik_js_datasource.cpp
  2. +0 −7 src/mapnik_js_datasource.hpp
  3. +4 −4 src/mapnik_layer.cpp
  4. +3 −2 src/node_mapnik.cpp
@@ -1,3 +1,4 @@
+/*
#include <mapnik/datasource_cache.hpp>
#include "mapnik_js_datasource.hpp"
@@ -120,3 +121,4 @@ Handle<Value> JSDatasource::next(const Arguments& args)
js_datasource *js = dynamic_cast<js_datasource *>(d->ds_ptr_.get());
return scope.Close((*js->cb_)->Call(Context::GetCurrent()->Global(), 0, NULL));
}
+*/
@@ -15,14 +15,7 @@ class JSDatasource: public node::ObjectWrap {
static Handle<Value> New(const Arguments &args);
static Handle<Value> parameters(const Arguments &args);
static Handle<Value> next(const Arguments &args);
- //static Handle<Value> describe(const Arguments &args);
- //static Handle<Value> features(const Arguments &args);
-
- //static Handle<Value> featureset(const Arguments &args);
-
inline mapnik::datasource_ptr get() { return ds_ptr_; }
- //static Handle<Value> New(mapnik::datasource_ptr ds_ptr);
-
JSDatasource();
private:
View
@@ -2,7 +2,7 @@
#include "utils.hpp"
#include "mapnik_layer.hpp"
#include "mapnik_datasource.hpp"
-#include "mapnik_js_datasource.hpp"
+//#include "mapnik_js_datasource.hpp"
#include "mapnik_memory_datasource.hpp"
// boost
@@ -176,17 +176,17 @@ void Layer::set_prop(Local<String> property,
{
Local<Object> obj = value->ToObject();
if (value->IsNull() || value->IsUndefined()) {
- ThrowException(Exception::TypeError(String::New("mapnik.Datasource, mapnik.JSDatasource, or mapnik.MemoryDatasource instance expected")));
+ ThrowException(Exception::TypeError(String::New("mapnik.Datasource, or mapnik.MemoryDatasource instance expected")));
} else {
if (Datasource::constructor->HasInstance(obj)) {
Datasource *d = ObjectWrap::Unwrap<Datasource>(obj);
l->layer_->set_datasource(d->get());
}
- else if (JSDatasource::constructor->HasInstance(obj))
+ /*else if (JSDatasource::constructor->HasInstance(obj))
{
JSDatasource *d = ObjectWrap::Unwrap<JSDatasource>(obj);
l->layer_->set_datasource(d->get());
- }
+ }*/
else if (MemoryDatasource::constructor->HasInstance(obj))
{
MemoryDatasource *d = ObjectWrap::Unwrap<MemoryDatasource>(obj);
View
@@ -19,7 +19,7 @@
#include "mapnik_layer.hpp"
#include "mapnik_datasource.hpp"
#include "mapnik_featureset.hpp"
-#include "mapnik_js_datasource.hpp"
+//#include "mapnik_js_datasource.hpp"
#include "mapnik_memory_datasource.hpp"
#include "mapnik_image.hpp"
#include "mapnik_image_view.hpp"
@@ -104,7 +104,8 @@ extern "C" {
GridView::Initialize(target);
Datasource::Initialize(target);
Featureset::Initialize(target);
- JSDatasource::Initialize(target);
+ // Not production safe, so disabling indefinitely
+ //JSDatasource::Initialize(target);
MemoryDatasource::Initialize(target);
Expression::Initialize(target);

0 comments on commit 7f6fe7d

Please sign in to comment.