Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-ios-v3.6.0-android-v5.1.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.travis.yml
#	circle.yml
#	cmake/core-files.cmake
#	include/mbgl/style/function/composite_function.hpp
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/build.gradle
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyBearingTracking.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationSource.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/CameraChangeDispatcher.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/Light.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/Position.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/light/light.java.ejs
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/utils/BitmapUtils.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LightTest.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/light.junit.ejs
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java
#	platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/userlocation/MockLocationEngine.java
#	platform/android/dependencies.gradle
#	platform/android/src/native_map_view.cpp
#	platform/darwin/scripts/generate-style-code.js
#	platform/darwin/src/MGLGeometry_Private.h
#	platform/darwin/src/MGLLight.h
#	platform/darwin/src/MGLLight.mm
#	platform/darwin/src/MGLSource.h
#	platform/darwin/src/MGLStyle.h
#	platform/darwin/src/MGLStyle.mm
#	platform/darwin/test/MGLLightTest.mm
#	platform/default/default_file_source.cpp
#	platform/ios/CHANGELOG.md
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/ios/resources/Images.xcassets/default_marker.imageset/default_marker.pdf
#	platform/macos/CHANGELOG.md
#	scripts/generate-shaders.js
#	src/mbgl/layout/symbol_layout.cpp
#	src/mbgl/programs/program.hpp
#	src/mbgl/programs/symbol_program.hpp
#	src/mbgl/programs/uniforms.hpp
#	src/mbgl/renderer/frame_history.cpp
#	src/mbgl/renderer/paint_property_binder.hpp
#	src/mbgl/shaders/line.cpp
#	src/mbgl/shaders/line_pattern.cpp
#	src/mbgl/shaders/line_sdf.cpp
#	src/mbgl/sprite/sprite_atlas.hpp
#	src/mbgl/style/layers/line_layer_properties.hpp
#	src/mbgl/style/sources/geojson_source.cpp
#	src/mbgl/style/style.cpp
#	src/mbgl/text/glyph_atlas.hpp
#	src/mbgl/tile/geometry_tile.cpp
#	src/mbgl/tile/geometry_tile.hpp
#	test/style/style.test.cpp
  • Loading branch information
tobrun committed Jul 5, 2017
2 parents 60eae41 + d2d8a57 commit 14c221f
Show file tree
Hide file tree
Showing 150 changed files with 10,672 additions and 7,355 deletions.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,6 @@ iframework: $(IOS_PROJ_PATH)
FORMAT=dynamic BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) \
./platform/ios/scripts/package.sh

.PHONY: ifabric
ifabric: $(IOS_PROJ_PATH)
FORMAT=static BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=NO SELF_CONTAINED=YES \
./platform/ios/scripts/package.sh

.PHONY: ideploy
ideploy:
caffeinate -i ./platform/ios/scripts/deploy-packages.sh
Expand Down
38 changes: 36 additions & 2 deletions platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,46 @@

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.

## master
## 5.2.0 - TBA

* Add support for ImageSource [#9110](https://github.com/mapbox/mapbox-gl-native/pull/9110)

## 5.1.0 - TBA
## 5.1.0 - June 30, 2017

* Update to MAS 2.1.3 [#9402](https://github.com/mapbox/mapbox-gl-native/pull/9402)
* Downgrade LOST to v1.1.1 [#9394](https://github.com/mapbox/mapbox-gl-native/pull/9394)
* OnCameraIdle hook into quickzoom gesture [#9339](https://github.com/mapbox/mapbox-gl-native/pull/9339)
* LatLngBounds conversion regression, add test [#9324](https://github.com/mapbox/mapbox-gl-native/pull/9324)

## 5.1.0-beta.5 - June 21, 2017

* Update MAS dependency to 2.1.2 [#9311](https://github.com/mapbox/mapbox-gl-native/pull/9311)
* Update LOST dependency to 3.0.1 [#9302](https://github.com/mapbox/mapbox-gl-native/pull/9302)
* Fix Pulse example Parcelable creator [#9283](https://github.com/mapbox/mapbox-gl-native/pull/9283)
* Custom marker view anchoring [#9282](https://github.com/mapbox/mapbox-gl-native/pull/9282)
* Update Activity test generation [#9276](https://github.com/mapbox/mapbox-gl-native/pull/9276)
* Validate camera position before transforming [#9275](https://github.com/mapbox/mapbox-gl-native/pull/9275)
* Revisit javadoc [#9266](https://github.com/mapbox/mapbox-gl-native/pull/9266)
* Build with NDK 15 [#9263](https://github.com/mapbox/mapbox-gl-native/pull/9263)
* Snapshot with view content [#9263](https://github.com/mapbox/mapbox-gl-native/pull/9263)
* Update source changed javadoc [#9243](https://github.com/mapbox/mapbox-gl-native/pull/9243)
* Run tests on UI-thread [#9198](https://github.com/mapbox/mapbox-gl-native/pull/9198)
* Fix trackball on worker thread [#9305](https://github.com/mapbox/mapbox-gl-native/pull/9305)

## 5.1.0-beta.4 - June 9, 2017

* Option to disable location change animation [#9210](https://github.com/mapbox/mapbox-gl-native/pull/9210)
* Invalidating MyLocationView bearing when not following [#9212](https://github.com/mapbox/mapbox-gl-native/pull/9212)
* Remove upgrade runtime exceptions [#9191](https://github.com/mapbox/mapbox-gl-native/pull/9191)
* Check source usage before removal [#9129](https://github.com/mapbox/mapbox-gl-native/pull/9129)
* Fix tracking mode + camera race condition [#9133](https://github.com/mapbox/mapbox-gl-native/pull/9133)
* Harden orientation changes [#9128](https://github.com/mapbox/mapbox-gl-native/pull/9128)
* Infinite location animation updates [#9194](https://github.com/mapbox/mapbox-gl-native/pull/9194)
* Invoke callback with valid fling gestures [#9192](https://github.com/mapbox/mapbox-gl-native/pull/9192)
* Keep location tracking after screen rotation [#9187](https://github.com/mapbox/mapbox-gl-native/pull/9187)
* Update components with camera values when animating [#9174](https://github.com/mapbox/mapbox-gl-native/pull/9174)
* Validate if gestures should execute [#9173](https://github.com/mapbox/mapbox-gl-native/pull/9173)
* Custom location source and LOST integration [#9142](https://github.com/mapbox/mapbox-gl-native/pull/9142)

## 5.1.0-beta.3 - May 26, 2017

Expand Down
4 changes: 3 additions & 1 deletion platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ dependencies {
compile rootProject.ext.dep.supportDesign
compile rootProject.ext.dep.timber
compile rootProject.ext.dep.okhttp3
compile rootProject.ext.dep.lost
compile(rootProject.ext.dep.lost) {
exclude group: 'com.google.guava'
}
testCompile rootProject.ext.dep.junit
testCompile rootProject.ext.dep.mockito

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.1.0-SNAPSHOT
VERSION_NAME=5.2.0-SNAPSHOT

POM_DESCRIPTION=Mapbox GL Android SDK
POM_URL=https://github.com/mapbox/mapbox-gl-native
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk;

import android.app.Application;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
Expand All @@ -17,10 +16,10 @@
import com.mapbox.services.android.telemetry.location.LocationEnginePriority;

/**
* The entry point of the Mapbox Android SDK.
* The entry point to initialize the Mapbox Android SDK.
* <p>
* Obtain a reference by calling {@link #getInstance(Context, String)}. Usually this class is configured in
* {@link Application#onCreate()} and is responsible for the active access token, application context, and
* Application#onCreate() and is responsible for the active access token, application context, and
* connectivity state.
* </p>
*/
Expand All @@ -31,6 +30,7 @@ public final class Mapbox {
private Context context;
private String accessToken;
private Boolean connected;
private LocationSource locationSource;

/**
* Get an instance of Mapbox.
Expand All @@ -46,8 +46,8 @@ public final class Mapbox {
public static synchronized Mapbox getInstance(@NonNull Context context, @NonNull String accessToken) {
if (INSTANCE == null) {
Context appContext = context.getApplicationContext();
INSTANCE = new Mapbox(appContext, accessToken);
LocationEngine locationEngine = LocationSource.getLocationEngine(appContext);
INSTANCE = new Mapbox(appContext, accessToken, new LocationSource(appContext));
LocationEngine locationEngine = new LocationSource(appContext);
locationEngine.setPriority(LocationEnginePriority.NO_POWER);
MapboxTelemetry.getInstance().initialize(
appContext, accessToken, BuildConfig.MAPBOX_EVENTS_USER_AGENT, locationEngine);
Expand All @@ -56,9 +56,10 @@ public static synchronized Mapbox getInstance(@NonNull Context context, @NonNull
return INSTANCE;
}

Mapbox(@NonNull Context context, @NonNull String accessToken) {
Mapbox(@NonNull Context context, @NonNull String accessToken, LocationSource locationSource) {
this.context = context;
this.accessToken = accessToken;
this.locationSource = locationSource;
}

/**
Expand Down Expand Up @@ -96,6 +97,8 @@ private static void validateAccessToken() throws MapboxConfigurationException {

/**
* Application context
*
* @return the application context
*/
public static Context getApplicationContext() {
return INSTANCE.context;
Expand Down Expand Up @@ -129,4 +132,8 @@ public static synchronized Boolean isConnected() {
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
return (activeNetwork != null && activeNetwork.isConnected());
}

public static LocationSource getLocationSource() {
return INSTANCE.locationSource;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,32 @@ public class BubbleLayout extends LinearLayout {
private float strokeWidth;
private int strokeColor;

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
*/
public BubbleLayout(Context context) {
this(context, null, 0);
}

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
* @param attrs The attribute set to initialise this bubble layout from
*/
public BubbleLayout(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}

/**
* Creates an instance of bubble layout.
*
* @param context The context used to inflate this bubble layout
* @param attrs The attribute set to initialise this bubble layout from
* @param defStyleAttr The default style to apply this bubble layout with
*/
public BubbleLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);

Expand Down Expand Up @@ -78,85 +96,173 @@ static float convertDpToPixel(float dp, Context context) {
return dp * (metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT);
}

/**
* Get the arrow direction.
*
* @return the arrow direction
*/
public ArrowDirection getArrowDirection() {
return arrowDirection;
}

/**
* Set the arrow direction.
*
* @param arrowDirection The direction of the arrow
* @return this
*/
public BubbleLayout setArrowDirection(ArrowDirection arrowDirection) {
resetPadding();
this.arrowDirection = arrowDirection;
initPadding();
return this;
}

/**
* Get the arrow width.
*
* @return the width of the arrow
*/
public float getArrowWidth() {
return arrowWidth;
}

/**
* Set the arrow width.
*
* @param arrowWidth The width of the arrow
* @return this
*/
public BubbleLayout setArrowWidth(float arrowWidth) {
resetPadding();
this.arrowWidth = arrowWidth;
initPadding();
return this;
}

/**
* Get the arrow height
*
* @return the height of the arrow
*/
public float getArrowHeight() {
return arrowHeight;
}

/**
* Set the arrow height.
*
* @param arrowHeight The height of the arrow
* @return this
*/
public BubbleLayout setArrowHeight(float arrowHeight) {
resetPadding();
this.arrowHeight = arrowHeight;
initPadding();
return this;
}

/**
* Get the arrow position.
*
* @return the arrow position
*/
public float getArrowPosition() {
return arrowPosition;
}

/**
* Get the arrow position.
*
* @param arrowPosition The arrow position
* @return this
*/
public BubbleLayout setArrowPosition(float arrowPosition) {
resetPadding();
this.arrowPosition = arrowPosition;
initPadding();
return this;
}

/**
* Get the corner radius
*
* @return the corner radius
*/
public float getCornersRadius() {
return cornersRadius;
}

/**
* Set the corner radius
*
* @param cornersRadius The corner radius
* @return this
*/
public BubbleLayout setCornersRadius(float cornersRadius) {
this.cornersRadius = cornersRadius;
requestLayout();
return this;
}

/**
* Get the bubble color.
*
* @return the bubble color
*/
public int getBubbleColor() {
return bubbleColor;
}

/**
* Set the bubble color.
*
* @param bubbleColor The buble color
* @return this
*/
public BubbleLayout setBubbleColor(int bubbleColor) {
this.bubbleColor = bubbleColor;
requestLayout();
return this;
}

/**
* Get stroke width.
*
* @return the stroke width
*/
public float getStrokeWidth() {
return strokeWidth;
}

/**
* Set the stroke width.
*
* @param strokeWidth The stroke width
* @return this
*/
public BubbleLayout setStrokeWidth(float strokeWidth) {
resetPadding();
this.strokeWidth = strokeWidth;
initPadding();
return this;
}

/**
* Get the stroke color.
*
* @return the stroke color
*/
public int getStrokeColor() {
return strokeColor;
}

/**
* Set the stroke color.
*
* @param strokeColor The stroke color
* @return this
*/
public BubbleLayout setStrokeColor(int strokeColor) {
this.strokeColor = strokeColor;
requestLayout();
Expand Down
Loading

0 comments on commit 14c221f

Please sign in to comment.