Merge branch '2486-back-to-the-future'

This commit is contained in:
Brad Leege
2015-10-01 15:22:35 -05:00
50 changed files with 103 additions and 113 deletions

View File

@@ -1,5 +1,5 @@
GROUP=com.mapbox.mapboxgl
VERSION_NAME=0.2.0-SNAPSHOT
GROUP=com.mapbox.mapboxsdk
VERSION_NAME=2.0.0-SNAPSHOT
POM_DESCRIPTION=Mapbox GL Android SDK
POM_URL=https://github.com/mapbox/mapbox-gl-native
@@ -18,5 +18,5 @@ ANDROID_BUILD_TOOLS_VERSION=23.0.1
ANDROID_BUILD_SDK_VERSION=23
POM_NAME=Mapbox GL Android SDK
POM_ARTIFACT_ID=mapbox-gl-android-sdk
POM_ARTIFACT_ID=mapbox-android-sdk
POM_PACKAGING=aar

View File

@@ -1,6 +1,6 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.views.MapView;
import com.mapbox.mapboxsdk.views.MapView;
public abstract class Annotation implements Comparable<Annotation> {

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
public abstract class AnnotationOptions {

View File

@@ -1,9 +1,9 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import android.graphics.Color;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* UNIMPLEMENTED: Needs implementation in Native.

View File

@@ -1,7 +1,7 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* UNIMPLEMENTED: Needs implementation in Native.

View File

@@ -1,10 +1,10 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import android.graphics.Point;
import android.view.View;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxgl.views.InfoWindow;
import com.mapbox.mapboxgl.views.R;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.InfoWindow;
public class Marker extends Annotation {

View File

@@ -1,6 +1,6 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
public class MarkerOptions extends AnnotationOptions {

View File

@@ -1,6 +1,6 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,6 +1,6 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import java.util.List;

View File

@@ -1,9 +1,9 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import android.graphics.Color;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,7 +1,7 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,11 +1,7 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import android.graphics.Color;
import com.mapbox.mapboxgl.geometry.LatLng;
import java.util.List;
public class Polyline extends MultiPoint {
int color = Color.BLACK; // default color is black

View File

@@ -1,8 +1,6 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxsdk.annotations;
import com.mapbox.mapboxgl.geometry.LatLng;
import java.util.List;
import com.mapbox.mapboxsdk.geometry.LatLng;
public class PolylineOptions extends MultiPointOptions {

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.constants;
package com.mapbox.mapboxsdk.constants;
public class GeoConstants {
// http://en.wikipedia.org/wiki/Earth_radius#Equatorial_radius

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.constants;
package com.mapbox.mapboxsdk.constants;
import java.util.Locale;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.constants;
package com.mapbox.mapboxsdk.constants;
public class MathConstants {
public static final double DEG2RAD = (Math.PI / 180.0);

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
import android.os.Parcel;
import android.os.Parcelable;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
/**
* Implementation of iOS MKCoordinateRegion

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
/**
* Implementation of iOS MKCoordinateSpan

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
/**
* A Latitude, Longitude point.

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
public interface IProjectedMeters {
double getNorthing();

View File

@@ -1,11 +1,11 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
import android.location.Location;
import android.os.Parcel;
import android.os.Parcelable;
import com.mapbox.mapboxgl.constants.GeoConstants;
import com.mapbox.mapboxgl.constants.MathConstants;
import com.mapbox.mapboxsdk.constants.GeoConstants;
import com.mapbox.mapboxsdk.constants.MathConstants;
import java.io.Serializable;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
import android.os.Parcel;
import android.os.Parcelable;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.geometry;
package com.mapbox.mapboxsdk.geometry;
import android.os.Parcel;
import android.os.Parcelable;

View File

@@ -1,6 +1,6 @@
package com.mapbox.mapboxgl.http;
package com.mapbox.mapboxsdk.http;
import com.mapbox.mapboxgl.constants.MapboxConstants;
import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.OkHttpClient;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.views;
package com.mapbox.mapboxsdk.views;
import android.content.Context;
import android.graphics.PointF;
@@ -8,8 +8,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mapbox.mapboxgl.annotations.Marker;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* A tooltip view

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.views;
package com.mapbox.mapboxsdk.views;
import android.content.Context;
import android.graphics.Canvas;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.views;
package com.mapbox.mapboxsdk.views;
import android.app.Activity;
import android.app.ActivityManager;
@@ -54,16 +54,17 @@ import android.widget.ZoomButtonsController;
import com.almeros.android.multitouch.gesturedetectors.RotateGestureDetector;
import com.almeros.android.multitouch.gesturedetectors.TwoFingerGestureDetector;
import com.mapbox.mapboxgl.annotations.Annotation;
import com.mapbox.mapboxgl.annotations.Marker;
import com.mapbox.mapboxgl.annotations.MarkerOptions;
import com.mapbox.mapboxgl.annotations.Polygon;
import com.mapbox.mapboxgl.annotations.PolygonOptions;
import com.mapbox.mapboxgl.annotations.Polyline;
import com.mapbox.mapboxgl.annotations.PolylineOptions;
import com.mapbox.mapboxgl.geometry.BoundingBox;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxgl.geometry.LatLngZoom;
import com.mapbox.mapboxgl.views.R;
import com.mapbox.mapboxsdk.annotations.Annotation;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.annotations.Polygon;
import com.mapbox.mapboxsdk.annotations.PolygonOptions;
import com.mapbox.mapboxsdk.annotations.Polyline;
import com.mapbox.mapboxsdk.annotations.PolylineOptions;
import com.mapbox.mapboxsdk.geometry.BoundingBox;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngZoom;
import com.mapzen.android.lost.api.LocationListener;
import com.mapzen.android.lost.api.LocationRequest;
import com.mapzen.android.lost.api.LocationServices;
@@ -73,7 +74,6 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@@ -233,7 +233,7 @@ public class MapView extends FrameLayout implements LocationListener {
/**
* Map change event types received by
* {@link com.mapbox.mapboxgl.views.MapView.OnMapChangedListener#onMapChanged(MapChange)}
* {@link com.mapbox.mapboxsdk.views.MapView.OnMapChangedListener#onMapChanged(MapChange)}
*/
public enum MapChange {
/**

View File

@@ -1,15 +1,15 @@
package com.mapbox.mapboxgl.views;
package com.mapbox.mapboxsdk.views;
import android.graphics.PointF;
import android.view.Surface;
import com.mapbox.mapboxgl.annotations.Marker;
import com.mapbox.mapboxgl.annotations.Polygon;
import com.mapbox.mapboxgl.annotations.Polyline;
import com.mapbox.mapboxgl.geometry.BoundingBox;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxgl.geometry.LatLngZoom;
import com.mapbox.mapboxgl.geometry.ProjectedMeters;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.Polygon;
import com.mapbox.mapboxsdk.annotations.Polyline;
import com.mapbox.mapboxsdk.geometry.BoundingBox;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngZoom;
import com.mapbox.mapboxsdk.geometry.ProjectedMeters;
import java.util.List;
// Class that wraps the native methods for convenience

View File

@@ -1,4 +1,4 @@
/**
* Classes that render a map and the map's UI.
*/
package com.mapbox.mapboxgl.views;
package com.mapbox.mapboxsdk.views;

View File

@@ -44,7 +44,7 @@
android:visibility="gone"/>
</LinearLayout>
<com.mapbox.mapboxgl.views.InfoWindowTipView
<com.mapbox.mapboxsdk.views.InfoWindowTipView
android:layout_width="fill_parent"
android:layout_height="10dp"/>

View File

@@ -1,12 +1,8 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.app.Activity;
import android.support.test.InstrumentationRegistry;
import android.test.ActivityInstrumentationTestCase2;
import com.mapbox.mapboxgl.testapp.utils.ScreenshotUtil;
import org.junit.Before;
import com.mapbox.mapboxsdk.testapp.utils.ScreenshotUtil;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp.utils;
package com.mapbox.mapboxsdk.testapp.utils;
import android.app.Activity;
import android.graphics.Bitmap;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="com.mapbox.mapboxgl.testapp">
package="com.mapbox.mapboxsdk.testapp">
<application
android:allowBackup="true"
@@ -10,14 +10,14 @@
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name="com.mapbox.mapboxgl.testapp.MainActivity"
android:name="com.mapbox.mapboxsdk.testapp.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SecondMapActivity" android:label="@string/activity_second"/>
<activity android:name="com.mapbox.mapboxsdk.testapp.SecondMapActivity" android:label="@string/activity_second"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="9724157045ff7d083492c6d9ae03e60e8609d461" />

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.Manifest;
import android.content.Intent;
@@ -25,12 +25,12 @@ import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.crashlytics.android.Crashlytics;
import com.mapbox.mapboxgl.annotations.Marker;
import com.mapbox.mapboxgl.annotations.MarkerOptions;
import com.mapbox.mapboxgl.annotations.PolygonOptions;
import com.mapbox.mapboxgl.annotations.PolylineOptions;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxgl.views.MapView;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.annotations.PolygonOptions;
import com.mapbox.mapboxsdk.annotations.PolylineOptions;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.MapView;
import io.fabric.sdk.android.Fabric;
import java.io.BufferedReader;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -7,7 +7,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mapbox.mapboxgl.views.MapView;
import com.mapbox.mapboxsdk.views.MapView;
public class MapFragment extends Fragment {

View File

@@ -1,11 +1,11 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import com.mapbox.mapboxgl.views.MapView;
import com.mapbox.mapboxsdk.views.MapView;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

View File

@@ -1,9 +1,9 @@
package com.mapbox.mapboxgl.testapp;
package com.mapbox.mapboxsdk.testapp;
import android.content.Context;
import android.text.TextUtils;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import org.json.JSONArray;
import org.json.JSONException;

View File

@@ -30,7 +30,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mapbox.mapboxgl.views.MapView
<com.mapbox.mapboxsdk.views.MapView
android:id="@+id/mainMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -12,7 +12,7 @@
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<com.mapbox.mapboxgl.views.MapView
<com.mapbox.mapboxsdk.views.MapView
android:id="@+id/secondMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mapbox.mapboxgl.views.MapView xmlns:android="http://schemas.android.com/apk/res/android"
<com.mapbox.mapboxsdk.views.MapView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -1,6 +1,6 @@
import com.mapbox.mapboxgl.geometry.BoundingBox;
import com.mapbox.mapboxgl.geometry.CoordinateSpan;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.BoundingBox;
import com.mapbox.mapboxsdk.geometry.CoordinateSpan;
import com.mapbox.mapboxsdk.geometry.LatLng;
import org.junit.Before;
import org.junit.Test;

View File

@@ -1,6 +1,6 @@
import com.mapbox.mapboxgl.geometry.CoordinateRegion;
import com.mapbox.mapboxgl.geometry.CoordinateSpan;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.CoordinateRegion;
import com.mapbox.mapboxsdk.geometry.CoordinateSpan;
import com.mapbox.mapboxsdk.geometry.LatLng;
import org.junit.Test;

View File

@@ -1,4 +1,4 @@
import com.mapbox.mapboxgl.geometry.CoordinateSpan;
import com.mapbox.mapboxsdk.geometry.CoordinateSpan;
import org.junit.Test;

View File

@@ -1,6 +1,6 @@
import android.location.Location;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLng;
import org.junit.Test;

View File

@@ -1,4 +1,4 @@
import com.mapbox.mapboxgl.geometry.LatLngZoom;
import com.mapbox.mapboxsdk.geometry.LatLngZoom;
import org.junit.Test;

View File

@@ -1,4 +1,4 @@
import com.mapbox.mapboxgl.geometry.ProjectedMeters;
import com.mapbox.mapboxsdk.geometry.ProjectedMeters;
import org.junit.Test;