Skip to content

Commit

Permalink
disabled mapnik.Expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Feb 19, 2014
1 parent e7182f1 commit b44aca8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 254 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
- Added VectorTile.composite API
- Fixed exception handling for `VectorTile.isSolid`
- Datasource plugins must now be explicitly registered with `mapnik.register_default_input_plugins`, `mapnik.register_datasource`, or `register_datasources` as all default plugins are no longer automatically registered at startup.
- Disabled `mapnik.Expression` object since this is not used by any known applications
- Added `mapnik.register_datasource` to register a single datasource plugin.

## 1.2.3
Expand Down
4 changes: 4 additions & 0 deletions src/mapnik_expression.cpp
@@ -1,3 +1,5 @@
#ifdef NODE_MAPNIK_EXPRESSION

#include <node.h>
#include "utils.hpp"
#include "mapnik_expression.hpp"
Expand Down Expand Up @@ -119,3 +121,5 @@ Handle<Value> Expression::evaluate(const Arguments& args)
mapnik::value value_obj = boost::apply_visitor(mapnik::evaluate<mapnik::Feature,mapnik::value>(*(f->get())),*(e->get()));
return scope.Close(boost::apply_visitor(node_mapnik::value_converter(),value_obj.base()));
}

#endif
24 changes: 0 additions & 24 deletions src/mapnik_js_datasource.hpp

This file was deleted.

196 changes: 0 additions & 196 deletions src/mapnik_proj_transform.cpp

This file was deleted.

34 changes: 0 additions & 34 deletions src/mapnik_proj_transform.hpp

This file was deleted.

4 changes: 4 additions & 0 deletions src/node_mapnik.cpp
Expand Up @@ -24,7 +24,9 @@
#include "mapnik_grid.hpp"
#include "mapnik_cairo_surface.hpp"
#include "mapnik_grid_view.hpp"
#ifdef NODE_MAPNIK_EXPRESSION
#include "mapnik_expression.hpp"
#endif
#include "utils.hpp"

#ifdef MAPNIK_DEBUG
Expand Down Expand Up @@ -144,7 +146,9 @@ extern "C" {
// Not production safe, so disabling indefinitely
//JSDatasource::Initialize(target);
MemoryDatasource::Initialize(target);
#ifdef NODE_MAPNIK_EXPRESSION
Expression::Initialize(target);
#endif
CairoSurface::Initialize(target);

// versions of deps
Expand Down
5 changes: 5 additions & 0 deletions test/expression.test.js
@@ -1,6 +1,9 @@
var mapnik = require('../');
var assert = require('assert');

// enable with CXXFLAGS=-DNODE_MAPNIK_EXPRESSION
if (mapnik.Expression) {

describe('mapnik.Expression', function() {
it('should throw with invalid usage', function() {
// no 'new' keyword
Expand Down Expand Up @@ -31,3 +34,5 @@ describe('mapnik.Expression', function() {
assert.equal(expr.evaluate(feature).toString(), 'true');
});
});

}

0 comments on commit b44aca8

Please sign in to comment.