-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
matrix, optimization, and turf modules added
- Loading branch information
Cameron Mace
committed
Sep 15, 2017
1 parent
ed4a1ff
commit 14065b7
Showing
95 changed files
with
33,785 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
build/ | ||
/captures | ||
.externalNativeBuild | ||
|
||
# Idea | ||
.idea | ||
*.iml | ||
classes | ||
|
||
obj | ||
|
||
#MacOS | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file removed
BIN
-443 Bytes
...d/classes/java/main/com/mapbox/directions/v5/DirectionsCriteria$DestinationCriteria.class
Binary file not shown.
Binary file removed
BIN
-433 Bytes
.../build/classes/java/main/com/mapbox/directions/v5/DirectionsCriteria$SourceCriteria.class
Binary file not shown.
Binary file modified
BIN
-347 Bytes
(81%)
...ices-directions/build/classes/java/main/com/mapbox/directions/v5/DirectionsCriteria.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apply plugin: 'java-library' | ||
|
||
sourceCompatibility = "1.7" | ||
targetCompatibility = "1.7" | ||
|
||
dependencies { | ||
|
||
compile project(":services-geojson") | ||
|
||
// Retrofit | ||
compile dependenciesList.retrofit | ||
compile dependenciesList.retrofit2Gson | ||
|
||
// OkHttp | ||
compile dependenciesList.okhttp3Logging | ||
|
||
// Annotations | ||
compileOnly dependenciesList.supportAnnotation | ||
|
||
// AutoValue | ||
compileOnly dependenciesList.autoValue | ||
compileOnly dependenciesList.autoValueGson | ||
|
||
// Test Dependencies | ||
testCompile dependenciesList.junit | ||
testCompile dependenciesList.hamcrestJunit | ||
testCompile dependenciesList.okhttp3Mockwebserver | ||
} | ||
|
132 changes: 132 additions & 0 deletions
132
services-geocoding/src/main/java/com/mapbox/geocoding/v5/GeocodingCriteria.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
package com.mapbox.geocoding.v5; | ||
|
||
import android.support.annotation.StringDef; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
/** | ||
* Constants that should be used when requesting geocoding. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public final class GeocodingCriteria { | ||
|
||
/** | ||
* Default geocoding mode. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String MODE_PLACES = "mapbox.places"; | ||
|
||
/** | ||
* Geocoding mode for enterprise/batch geocoding. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String MODE_PLACES_PERMANENT = "mapbox.places-permanent"; | ||
|
||
/** | ||
* Retention policy for the various geocoding modes. | ||
* | ||
* @since 3.0.0 | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@StringDef( { | ||
MODE_PLACES, | ||
MODE_PLACES_PERMANENT | ||
}) | ||
public @interface GeocodingModeCriteria { | ||
} | ||
|
||
/** | ||
* Filter results by country. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_COUNTRY = "country"; | ||
|
||
/** | ||
* Filter results by region. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_REGION = "region"; | ||
|
||
/** | ||
* Filter results by postcode. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_POSTCODE = "postcode"; | ||
|
||
/** | ||
* Filter results by district. | ||
* | ||
* @since 2.2.0 | ||
*/ | ||
public static final String TYPE_DISTRICT = "district"; | ||
|
||
/** | ||
* Filter results by place. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_PLACE = "place"; | ||
|
||
/** | ||
* Filter results by locality. | ||
* | ||
* @since 2.2.0 | ||
*/ | ||
public static final String TYPE_LOCALITY = "locality"; | ||
|
||
/** | ||
* Filter results by neighborhood. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_NEIGHBORHOOD = "neighborhood"; | ||
|
||
/** | ||
* Filter results by address. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_ADDRESS = "address"; | ||
|
||
/** | ||
* Filter results by POI. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public static final String TYPE_POI = "poi"; | ||
|
||
/** | ||
* Filter results by POI landmark subtype. | ||
* | ||
* @since 1.3.2 | ||
*/ | ||
public static final String TYPE_POI_LANDMARK = "poi.landmark"; | ||
|
||
/** | ||
* Retention policy for the various filter result types. | ||
* | ||
* @since 3.0.0 | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@StringDef( { | ||
TYPE_COUNTRY, | ||
TYPE_REGION, | ||
TYPE_POSTCODE, | ||
TYPE_DISTRICT, | ||
TYPE_PLACE, | ||
TYPE_LOCALITY, | ||
TYPE_NEIGHBORHOOD, | ||
TYPE_ADDRESS, | ||
TYPE_POI, | ||
TYPE_POI_LANDMARK | ||
}) | ||
public @interface GeocodingTypeCriteria { | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
services-geocoding/src/main/java/com/mapbox/geocoding/v5/GeocodingService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package com.mapbox.geocoding.v5; | ||
|
||
import com.mapbox.geocoding.v5.MapboxGeocoding.Builder; | ||
import com.mapbox.geocoding.v5.models.GeocodingResponse; | ||
|
||
import java.util.List; | ||
|
||
import retrofit2.Call; | ||
import retrofit2.http.GET; | ||
import retrofit2.http.Header; | ||
import retrofit2.http.Path; | ||
import retrofit2.http.Query; | ||
|
||
/** | ||
* Interface that defines the geocoding service. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public interface GeocodingService { | ||
|
||
/** | ||
* Constructs the html call using the information passed in through the {@link Builder}. | ||
* | ||
* @param userAgent The user | ||
* @param mode mapbox.places or mapbox.places-permanent for enterprise geocoding. | ||
* @param query a location; a place name for forward geocoding or a coordinate pair | ||
* (longitude, latitude location) for reverse geocoding | ||
* @param accessToken Mapbox access token. | ||
* @param country ISO 3166 alpha 2 country codes, separated by commas. | ||
* @param proximity Location around which to bias results. | ||
* @param types Filter results by one or more type. | ||
* @param autocomplete True if you want auto complete. | ||
* @param bbox Optionally pass in a bounding box to limit results in. | ||
* @param limit Optionally pass in a limit the amount of returning results. | ||
* @param language The locale in which results should be returned. | ||
* @return A retrofit Call object | ||
* @since 1.0.0 | ||
*/ | ||
@GET("/geocoding/v5/{mode}/{query}.json") | ||
Call<GeocodingResponse> getCall( | ||
@Header("User-Agent") String userAgent, | ||
@Path("mode") String mode, | ||
@Path("query") String query, | ||
@Query("access_token") String accessToken, | ||
@Query("country") String country, | ||
@Query("proximity") String proximity, | ||
@Query("types") String types, | ||
@Query("autocomplete") Boolean autocomplete, | ||
@Query("bbox") String bbox, | ||
@Query("limit") String limit, | ||
@Query("language") String language); | ||
|
||
/** | ||
* Constructs the html call using the information passed in through the {@link Builder}. | ||
* | ||
* @param userAgent The user | ||
* @param mode mapbox.places-permanent for batch geocoding. | ||
* @param query a location; a place name for forward geocoding or a coordinate pair | ||
* (longitude, latitude location) for reverse geocoding | ||
* @param accessToken Mapbox access token. | ||
* @param country ISO 3166 alpha 2 country codes, separated by commas. | ||
* @param proximity Location around which to bias results. | ||
* @param types Filter results by one or more type. | ||
* @param autocomplete True if you want auto complete. | ||
* @param bbox Optionally pass in a bounding box to limit results in. | ||
* @param limit Optionally pass in a limit the amount of returning results. | ||
* @param language The locale in which results should be returned. | ||
* @return A retrofit Call object | ||
* @since 1.0.0 | ||
*/ | ||
@GET("/geocoding/v5/{mode}/{query}.json") | ||
Call<List<GeocodingResponse>> getBatchCall( | ||
@Header("User-Agent") String userAgent, | ||
@Path("mode") String mode, | ||
@Path("query") String query, | ||
@Query("access_token") String accessToken, | ||
@Query("country") String country, | ||
@Query("proximity") String proximity, | ||
@Query("types") String types, | ||
@Query("autocomplete") Boolean autocomplete, | ||
@Query("bbox") String bbox, | ||
@Query("limit") String limit, | ||
@Query("language") String language); | ||
} |
Oops, something went wrong.