diff options
author | Young Hahn <young@mapbox.com> | 2016-07-06 17:29:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-06 17:29:34 -0400 |
commit | 71a3b1d0db170cfc1786be88c3e7b286c50dece9 (patch) | |
tree | 1d51cc28946dc990f8f613795417cb76ea8c00df /platform | |
parent | 903d609b40b6d0f4873f7bb46d96f4a06d7b17d6 (diff) | |
download | qtlocation-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')
-rw-r--r-- | platform/android/scripts/configure.sh | 5 | ||||
-rw-r--r-- | platform/darwin/src/MGLFeature.mm | 4 | ||||
-rw-r--r-- | platform/darwin/test/MGLFeatureTests.mm | 2 | ||||
-rw-r--r-- | platform/ios/ios.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | platform/ios/scripts/configure.sh | 5 | ||||
-rwxr-xr-x | platform/ios/scripts/package.sh | 4 | ||||
-rw-r--r-- | platform/linux/scripts/configure.sh | 5 | ||||
-rw-r--r-- | platform/macos/macos.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | platform/macos/scripts/configure.sh | 5 | ||||
-rw-r--r-- | platform/node/src/node_feature.cpp | 7 | ||||
-rw-r--r-- | platform/node/src/node_feature.hpp | 2 | ||||
-rw-r--r-- | platform/qt/scripts/configure.sh | 5 |
12 files changed, 31 insertions, 25 deletions
diff --git a/platform/android/scripts/configure.sh b/platform/android/scripts/configure.sh index b2bdce556d..a9a5b25ff7 100644 --- a/platform/android/scripts/configure.sh +++ b/platform/android/scripts/configure.sh @@ -9,8 +9,9 @@ SQLITE_VERSION=3.9.1 ZLIB_VERSION=system NUNICODE_VERSION=1.6 LIBZIP_VERSION=0.11.2 -GEOMETRY_VERSION=0.5.0 -GEOJSONVT_VERSION=4.1.2-cxx11abi +GEOMETRY_VERSION=0.8.0 +GEOJSON_VERSION=0.1.4 +GEOJSONVT_VERSION=6.1.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 JNI_HPP_VERSION=2.0.0 diff --git a/platform/darwin/src/MGLFeature.mm b/platform/darwin/src/MGLFeature.mm index 777b296303..3bf1e61153 100644 --- a/platform/darwin/src/MGLFeature.mm +++ b/platform/darwin/src/MGLFeature.mm @@ -118,7 +118,7 @@ */ class PropertyValueEvaluator { public: - id operator()(const std::nullptr_t &) const { + id operator()(const mbgl::NullValue &) const { return [NSNull null]; } @@ -260,7 +260,7 @@ NS_ARRAY_OF(MGLShape <MGLFeature> *) *MGLFeaturesFromMBGLFeatures(const std::vec GeometryEvaluator<double> evaluator; MGLShape <MGLFeaturePrivate> *shape = mapbox::geometry::geometry<double>::visit(feature.geometry, evaluator); if (feature.id) { - shape.identifier = @(*feature.id); + shape.identifier = mbgl::FeatureIdentifier::visit(*feature.id, PropertyValueEvaluator()); } shape.attributes = attributes; [shapes addObject:shape]; diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm index 6cf038d4fb..13ad8759b0 100644 --- a/platform/darwin/test/MGLFeatureTests.mm +++ b/platform/darwin/test/MGLFeatureTests.mm @@ -89,7 +89,7 @@ mapbox::geometry::point<double> point = { -90.066667, 29.95 }; mbgl::Feature pointFeature(point); - pointFeature.id = UINT64_MAX; + pointFeature.id = { UINT64_MAX }; pointFeature.properties["null"] = nullptr; pointFeature.properties["bool"] = true; pointFeature.properties["unsigned int"] = UINT64_MAX; diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index ec0957a4f5..590a119600 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -1739,7 +1739,7 @@ "$(sqlite_ldflags)", "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios; PRODUCT_NAME = Mapbox; @@ -1779,7 +1779,7 @@ "$(sqlite_ldflags)", "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.sdk.ios; PRODUCT_NAME = Mapbox; @@ -1833,7 +1833,7 @@ "$(sqlite_ldflags)", "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_NAME = Mapbox; PUBLIC_HEADERS_FOLDER_PATH = Headers; @@ -1863,7 +1863,7 @@ "$(sqlite_ldflags)", "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_NAME = Mapbox; PUBLIC_HEADERS_FOLDER_PATH = Headers; diff --git a/platform/ios/scripts/configure.sh b/platform/ios/scripts/configure.sh index 408180881c..a0791e3108 100644 --- a/platform/ios/scripts/configure.sh +++ b/platform/ios/scripts/configure.sh @@ -5,8 +5,9 @@ PROTOZERO_VERSION=1.3.0 BOOST_VERSION=1.60.0 SQLITE_VERSION=system ZLIB_VERSION=system -GEOMETRY_VERSION=0.5.0 -GEOJSONVT_VERSION=4.1.2 +GEOMETRY_VERSION=0.8.0 +GEOJSON_VERSION=0.1.4 +GEOJSONVT_VERSION=6.1.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index f0ca683389..8bc2a3fd63 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -119,7 +119,7 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then -o ${OUTPUT}/static/${NAME}.framework/${NAME} \ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/lib} \ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \ - `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojson.a` cp -rv ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.bundle ${STATIC_BUNDLE_DIR} fi @@ -149,7 +149,7 @@ else libtool -static -no_warning_for_no_symbols \ -o ${OUTPUT}/static/${NAME}.framework/${NAME} \ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \ - `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojson.a` cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.bundle ${STATIC_BUNDLE_DIR} fi diff --git a/platform/linux/scripts/configure.sh b/platform/linux/scripts/configure.sh index 6521fc8ccd..c4f6dc606d 100644 --- a/platform/linux/scripts/configure.sh +++ b/platform/linux/scripts/configure.sh @@ -14,8 +14,9 @@ SQLITE_VERSION=3.9.1 LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 -GEOMETRY_VERSION=0.5.0 -GEOJSONVT_VERSION=4.1.2${CXX11ABI:-} +GEOMETRY_VERSION=0.8.0 +GEOJSON_VERSION=0.1.4${CXX11ABI:-} +GEOJSONVT_VERSION=6.1.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0${CXX11ABI:-} diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj index 7271356f2a..10f57a369a 100644 --- a/platform/macos/macos.xcodeproj/project.pbxproj +++ b/platform/macos/macos.xcodeproj/project.pbxproj @@ -1039,7 +1039,7 @@ OTHER_LDFLAGS = ( "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL; PRODUCT_NAME = Mapbox; @@ -1078,7 +1078,7 @@ OTHER_LDFLAGS = ( "$(zlib_ldflags)", "$(opengl_ldflags)", - "$(geojsonvt_static_libs)", + "$(geojson_static_libs)", ); PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.MapboxGL; PRODUCT_NAME = Mapbox; diff --git a/platform/macos/scripts/configure.sh b/platform/macos/scripts/configure.sh index 2952ec2535..47d9b381ba 100644 --- a/platform/macos/scripts/configure.sh +++ b/platform/macos/scripts/configure.sh @@ -8,8 +8,9 @@ GLFW_VERSION=3.1.2 SQLITE_VERSION=3.9.1 ZLIB_VERSION=system NUNICODE_VERSION=1.6 -GEOMETRY_VERSION=0.5.0 -GEOJSONVT_VERSION=4.1.2 +GEOMETRY_VERSION=0.8.0 +GEOJSON_VERSION=0.1.4 +GEOJSONVT_VERSION=6.1.0 VARIANT_VERSION=1.1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 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&); } diff --git a/platform/qt/scripts/configure.sh b/platform/qt/scripts/configure.sh index 461c1cc1b3..6b501d271c 100644 --- a/platform/qt/scripts/configure.sh +++ b/platform/qt/scripts/configure.sh @@ -5,8 +5,9 @@ CXX11ABI=${CXX11ABI:-$(scripts/check-cxx11abi.sh)} UNIQUE_RESOURCE_VERSION=dev PROTOZERO_VERSION=1.3.0 BOOST_VERSION=1.60.0 -GEOMETRY_VERSION=0.5.0 -GEOJSONVT_VERSION=4.1.2${CXX11ABI:-} +GEOMETRY_VERSION=0.8.0 +GEOJSON_VERSION=0.1.4${CXX11ABI:-} +GEOJSONVT_VERSION=6.1.0 GTEST_VERSION=1.7.0${CXX11ABI:-} LIBJPEG_TURBO_VERSION=1.4.2 NUNICODE_VERSION=1.6 |