Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release-ios-v3.6.0-android-v5.1.0' into merge_mapbox_v5_1
Browse files Browse the repository at this point in the history
* release-ios-v3.6.0-android-v5.1.0: (89 commits)
  [tests] Cherry-pick OfflineDatabase::databaseTableColumns
  [tests] Enforce the schema downgrade behavior
  [core] Remove database on schema downgrade
  [ios] Set location to nil until the user's location is determined
  [ios] Support iOS 11 location usage descriptions
  [ios] Print Xcode and SDK version during packaging
  [build] Don't fail hard for unknown warning groups
  [build] Don't use maybe-uninitialized and misleading-indentation in Clang, since they're not implemented there
  [ios] Fix heading update loop
  [ios] Document annotations-as-features limitations w/feature querying
  [android] - update config for next reelease
  [android] - update changelog for v5.1.3
  bumped MAS version number
  [android] - avoid IndexOutOfBounds when destroying map object
  [android] - enable location change animation of MyLocationView by default
  [android] - re-add projectedMeters
  [android] - create smallest possible LatLngBounds when visible region crosses the dateline
  [android] - provide compability with Samsung devices forcing 3-4 array matrix length
  [android] - keep state of initial overlain views margins (mapbox#9391)
  [ios] Update pods spec for iOS v3.6.2 (mapbox#9806)
  ...

# Conflicts:
#	platform/android/MapboxGLAndroidSDK/proguard-rules.pro
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
#	platform/android/dependencies.gradle
#	src/mbgl/renderer/painter_line.cpp
  • Loading branch information
Tran Thuong Tien committed Aug 30, 2017
2 parents c710886 + eedd909 commit ef32d62
Show file tree
Hide file tree
Showing 149 changed files with 2,313 additions and 1,277 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ if(APPLE)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG")

if(CMAKE_COMPILER_IS_GNUCXX)

if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unknown-warning-option")
elseif(CMAKE_COMPILER_IS_GNUCXX)
# https://svn.boost.org/trac/boost/ticket/9240
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
endif()
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ darwin-update-examples:

.PHONY: check-public-symbols
check-public-symbols:
node platform/darwin/scripts/check-public-symbols.js macOS
node platform/darwin/scripts/check-public-symbols.js macOS iOS
endif

#### Linux targets #####################################################
Expand Down
6 changes: 4 additions & 2 deletions cmake/core-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ set(MBGL_CORE_FILES
src/mbgl/gl/program.hpp
src/mbgl/gl/program_binary_extension.hpp
src/mbgl/gl/renderbuffer.hpp
src/mbgl/gl/segment.cpp
src/mbgl/gl/segment.hpp
src/mbgl/gl/state.hpp
src/mbgl/gl/stencil_mode.cpp
src/mbgl/gl/stencil_mode.hpp
Expand All @@ -87,6 +85,8 @@ set(MBGL_CORE_FILES
src/mbgl/gl/uniform.hpp
src/mbgl/gl/value.cpp
src/mbgl/gl/value.hpp
src/mbgl/gl/vertex_array.cpp
src/mbgl/gl/vertex_array.hpp
src/mbgl/gl/vertex_array_extension.hpp
src/mbgl/gl/vertex_buffer.hpp

Expand Down Expand Up @@ -155,6 +155,8 @@ set(MBGL_CORE_FILES
src/mbgl/programs/programs.hpp
src/mbgl/programs/raster_program.cpp
src/mbgl/programs/raster_program.hpp
src/mbgl/programs/segment.cpp
src/mbgl/programs/segment.hpp
src/mbgl/programs/symbol_program.cpp
src/mbgl/programs/symbol_program.hpp
src/mbgl/programs/uniforms.hpp
Expand Down
1 change: 0 additions & 1 deletion cmake/glfw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ target_sources(mbgl-glfw
PRIVATE platform/glfw/settings_json.hpp
PRIVATE platform/glfw/settings_json.cpp
PRIVATE platform/default/mbgl/util/default_styles.hpp
PRIVATE platform/default/mbgl/util/default_styles.cpp
)

# Our GL implementation is internal to mbgl-core, which causes the GL header to
Expand Down
1 change: 0 additions & 1 deletion cmake/offline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ add_executable(mbgl-offline

target_sources(mbgl-offline
PRIVATE platform/default/mbgl/util/default_styles.hpp
PRIVATE platform/default/mbgl/util/default_styles.cpp
)

target_compile_options(mbgl-offline
Expand Down
1 change: 1 addition & 0 deletions cmake/test-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ set(MBGL_TEST_FILES
test/programs/binary_program.test.cpp

# renderer
test/renderer/backend_scope.test.cpp
test/renderer/group_by_layout.test.cpp

# sprite
Expand Down
5 changes: 5 additions & 0 deletions include/mbgl/map/backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <mbgl/map/map_observer.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/size.hpp>
#include <mbgl/util/util.hpp>

#include <memory>
#include <mutex>
Expand Down Expand Up @@ -80,4 +81,8 @@ class Backend : public MapObserver {
friend class BackendScope;
};

constexpr bool operator==(const Backend& a, const Backend& b) {
return &a == &b;
}

} // namespace mbgl
4 changes: 4 additions & 0 deletions include/mbgl/map/backend_scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ class BackendScope {
static bool exists();

private:
void activate();
void deactivate();

BackendScope* priorScope;
BackendScope* nextScope;
Backend& backend;
const ScopeType scopeType;
bool activated = false;
};

} // namespace mbgl
3 changes: 2 additions & 1 deletion include/mbgl/util/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ constexpr float tileSize = 512;
*
* Positions are stored as signed 16bit integers.
* One bit is lost for signedness to support features extending past the left edge of the tile.
* One bit is lost because the line vertex buffer packs 1 bit of other data into the int.
* One bit is lost because the line vertex buffer used to pack 1 bit of other data into the int.
* This is no longer the case but we're reserving this bit anyway.
* One bit is lost to support features extending past the extent on the right edge of the tile.
* This leaves us with 2^13 = 8192
*/
Expand Down
43 changes: 43 additions & 0 deletions platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@

Mapbox welcomes participation and contributions from everyone. If you'd like to do so please see the [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) first to get started.

## 5.1.3 - August 18, 2017

* Use separate attribute component for line normals [#9753](https://github.com/mapbox/mapbox-gl-native/pull/9753)
* Track state of initial overlain views margins [#9391](https://github.com/mapbox/mapbox-gl-native/pull/9391)
* Compability for Samsung devices forcing 3-4 array vector length [#9746](https://github.com/mapbox/mapbox-gl-native/pull/9746)
* Smallest LatLngBounds when visible region crosses dateline [#9747](https://github.com/mapbox/mapbox-gl-native/pull/9747)
* Readd ProjectMeters [#9766](https://github.com/mapbox/mapbox-gl-native/pull/9766)
* Enable location change animation of MyLocationView by default [#9779](https://github.com/mapbox/mapbox-gl-native/pull/9779)
* Avoid IndexOutOfBoundsException when destroying map object [#9789](https://github.com/mapbox/mapbox-gl-native/pull/9789)
* MAS 2.2.1 [#9796](https://github.com/mapbox/mapbox-gl-native/pull/9796)

## 5.1.2 - August 2, 2017

* Disable program caching on Ardreno GPU 3xx, 4xx and 5xx [#9625](https://github.com/mapbox/mapbox-gl-native/pull/9625)
* GeoJSON proguard issue [#9577](https://github.com/mapbox/mapbox-gl-native/pull/9577)
* Harden click events of shape annotations [#9585](https://github.com/mapbox/mapbox-gl-native/pull/9585)
* Validate Marker before opening InfoWindow [#9586](https://github.com/mapbox/mapbox-gl-native/pull/9586)
* Fix added to map check [#9602](https://github.com/mapbox/mapbox-gl-native/pull/9602)
* Don't query shape annotations if none were added [#9606](https://github.com/mapbox/mapbox-gl-native/pull/9606)
* Fix compass direction [#9632](https://github.com/mapbox/mapbox-gl-native/pull/9632)
* Remove preview image integration [#9657](https://github.com/mapbox/mapbox-gl-native/pull/9657)
* Try/catch initialization of telemetry [#9658](https://github.com/mapbox/mapbox-gl-native/pull/9658)
* Fix typo OnCameraMoveStartedListener [#9664](https://github.com/mapbox/mapbox-gl-native/pull/9664)
* Bump MAS dependency to 5.2.0 [#9671](https://github.com/mapbox/mapbox-gl-native/pull/9671)

## 5.1.1 - July 21, 2017

* Rework attribution binding [#9433](https://github.com/mapbox/mapbox-gl-native/pull/9433)
* BackendScope changes [#9538](https://github.com/mapbox/mapbox-gl-native/pull/9538)
* Invisible MarkerView performance fix [#9420](https://github.com/mapbox/mapbox-gl-native/pull/9420)
* Polyline/Polygon click listeners [#9443](https://github.com/mapbox/mapbox-gl-native/pull/9443)
* Hit test Marker/MarkerViews [#9424](https://github.com/mapbox/mapbox-gl-native/pull/9424)
* Fine tune fling gesture [#9532](https://github.com/mapbox/mapbox-gl-native/pull/9532)
* Bump OkHttp 3.8.0, Android 7.x crashes [#9522](https://github.com/mapbox/mapbox-gl-native/pull/9522)
* MyLocationView tint fix [#9410](https://github.com/mapbox/mapbox-gl-native/pull/9410)
* VisibleRegion logic [#9428](https://github.com/mapbox/mapbox-gl-native/pull/9428)
* Validate motion event [#9434](https://github.com/mapbox/mapbox-gl-native/pull/9434)
* Add French localization [#9545](https://github.com/mapbox/mapbox-gl-native/pull/9545)
* Fix public.xml [#9525](https://github.com/mapbox/mapbox-gl-native/pull/9525/files)
* Manage InfoWindow selection in AnnotationManager [#9567](https://github.com/mapbox/mapbox-gl-native/pull/9567)
* Increase touch target size [#9565](https://github.com/mapbox/mapbox-gl-native/pull/9565)
* Work around Adreno 2xx GPU bugs [#9573](https://github.com/mapbox/mapbox-gl-native/pull/9573)

## 5.1.0 - June 30, 2017

* Update to MAS 2.1.3 [#9402](https://github.com/mapbox/mapbox-gl-native/pull/9402)
Expand Down
2 changes: 1 addition & 1 deletion platform/android/MapboxGLAndroidSDK/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.mapbox.mapboxsdk
VERSION_NAME=5.2.0-SNAPSHOT
VERSION_NAME=5.1.4-SNAPSHOT

POM_DESCRIPTION=Mapbox GL Android SDK
POM_URL=https://github.com/mapbox/mapbox-gl-native
Expand Down
1 change: 1 addition & 0 deletions platform/android/MapboxGLAndroidSDK/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
-keep class com.mapbox.services.commons.** { *;}
-keep class com.google.** { *; }
-dontwarn com.google.**
-keep class com.google.gson.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import com.mapbox.services.android.telemetry.location.LocationEngine;
import com.mapbox.services.android.telemetry.location.LocationEnginePriority;

import timber.log.Timber;

/**
* The entry point to initialize the Mapbox Android SDK.
* <p>
Expand Down Expand Up @@ -47,11 +49,16 @@ public static synchronized Mapbox getInstance(@NonNull Context context, @NonNull
if (INSTANCE == null) {
Context appContext = context.getApplicationContext();
INSTANCE = new Mapbox(appContext, accessToken, new LocationSource(appContext));

if(ENABLE_METRICS_ON_MAPPY) {
LocationEngine locationEngine = new LocationSource(appContext);
locationEngine.setPriority(LocationEnginePriority.NO_POWER);
MapboxTelemetry.getInstance().initialize(
appContext, accessToken, BuildConfig.MAPBOX_EVENTS_USER_AGENT, locationEngine);
try {
MapboxTelemetry.getInstance().initialize(
appContext, accessToken, BuildConfig.MAPBOX_EVENTS_USER_AGENT, locationEngine);
} catch (Exception exception) {
Timber.e(exception, "Unable to instantiate Mapbox telemetry");
}
}
ConnectivityReceiver.instance(appContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,6 @@ public boolean onClickMarkerView(MarkerView markerView) {
clickHandled = onMarkerViewClickListener.onMarkerClick(markerView, view, adapter);
}

if (!clickHandled) {
ensureInfoWindowOffset(markerView);
select(markerView, view, adapter);
}

return clickHandled;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ public LatLng[] toLatLngs() {
return new LatLng[] {getNorthEast(), getSouthWest()};
}

/**
* Constructs a LatLngBounds from doubles representing a LatLng pair.
* <p>
* This method doesn't recalculate most east or most west boundaries.
* </p>
*/
public static LatLngBounds from(double latNorth, double lonEast, double latSouth, double lonWest) {
return new LatLngBounds(latNorth, lonEast, latSouth, lonWest);
}

/**
* Constructs a LatLngBounds from current bounds with an additional latitude-longitude pair.
*
Expand Down
Loading

0 comments on commit ef32d62

Please sign in to comment.