From 71a3b1d0db170cfc1786be88c3e7b286c50dece9 Mon Sep 17 00:00:00 2001 From: Young Hahn Date: Wed, 6 Jul 2016 17:29:34 -0400 Subject: [core] geometry@0.8.0 / geojsonvt@6.0.0 (#5514) * [core] geometry.hpp 0.8.0 * geojsonvt @ 6.0.0 * Update platform deps, build scripts * Perf optimizations/cleanup * Rebase in geometry@080 * D.R.Y. etc * Ensure fill annotation geometries have closed rings. * Optimizations * Update to geojsonvt @ 6.1.0 for clean handoff between geojson parsing and geojsonvt * Apply close multi/poly geoms for line annotations as well --- platform/node/src/node_feature.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'platform/node/src/node_feature.cpp') diff --git a/platform/node/src/node_feature.cpp b/platform/node/src/node_feature.cpp index 1a5e31fe97..6620cf1852 100644 --- a/platform/node/src/node_feature.cpp +++ b/platform/node/src/node_feature.cpp @@ -6,9 +6,10 @@ using namespace mapbox::geometry; using Value = mbgl::Value; using Feature = mbgl::Feature; +using FeatureIdentifier = mbgl::FeatureIdentifier; using Geometry = mbgl::Feature::geometry_type; using GeometryCollection = mapbox::geometry::geometry_collection; -using Properties = mbgl::Feature::property_map; +using Properties = mbgl::PropertyMap; template struct ToType { @@ -76,7 +77,7 @@ public: }; struct ToValue { - v8::Local operator()(std::nullptr_t) { + v8::Local operator()(mbgl::NullValue) { Nan::EscapableHandleScope scope; return scope.Escape(Nan::Null()); } @@ -159,7 +160,7 @@ v8::Local toJS(const Feature& feature) { Nan::Set(result, Nan::New("properties").ToLocalChecked(), toJS(feature.properties)); if (feature.id) { - Nan::Set(result, Nan::New("id").ToLocalChecked(), Nan::New(double(*feature.id))); + Nan::Set(result, Nan::New("id").ToLocalChecked(), FeatureIdentifier::visit(*feature.id, ToValue())); } return scope.Escape(result); -- cgit v1.2.1