summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorYoung Hahn <young@mapbox.com>2016-07-06 17:29:34 -0400
committerGitHub <noreply@github.com>2016-07-06 17:29:34 -0400
commit71a3b1d0db170cfc1786be88c3e7b286c50dece9 (patch)
tree1d51cc28946dc990f8f613795417cb76ea8c00df /platform/node
parent903d609b40b6d0f4873f7bb46d96f4a06d7b17d6 (diff)
downloadqtlocation-mapboxgl-71a3b1d0db170cfc1786be88c3e7b286c50dece9.tar.gz
[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
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/src/node_feature.cpp7
-rw-r--r--platform/node/src/node_feature.hpp2
2 files changed, 5 insertions, 4 deletions
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<double>;
-using Properties = mbgl::Feature::property_map;
+using Properties = mbgl::PropertyMap;
template <class T>
struct ToType {
@@ -76,7 +77,7 @@ public:
};
struct ToValue {
- v8::Local<v8::Value> operator()(std::nullptr_t) {
+ v8::Local<v8::Value> operator()(mbgl::NullValue) {
Nan::EscapableHandleScope scope;
return scope.Escape(Nan::Null());
}
@@ -159,7 +160,7 @@ v8::Local<v8::Object> 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);
diff --git a/platform/node/src/node_feature.hpp b/platform/node/src/node_feature.hpp
index 7973ee19d4..8d1eceba38 100644
--- a/platform/node/src/node_feature.hpp
+++ b/platform/node/src/node_feature.hpp
@@ -13,6 +13,6 @@ namespace node_mbgl {
v8::Local<v8::Value> toJS(const mbgl::Value&);
v8::Local<v8::Object> toJS(const mbgl::Feature&);
v8::Local<v8::Object> toJS(const mbgl::Feature::geometry_type&);
-v8::Local<v8::Object> toJS(const mbgl::Feature::property_map&);
+v8::Local<v8::Object> toJS(const mbgl::PropertyMap&);
}