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

Commit

Permalink
[android] update MAS to pre 3.0.0-beta.4 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen committed Mar 14, 2018
1 parent f8353cb commit 86f25df
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void setGeoJson(Feature feature) {
*
* @param geometry the GeoJSON {@link Geometry} to set
*/
public void setGeoJson(Geometry<?> geometry) {
public void setGeoJson(Geometry geometry) {
nativeSetGeometry(geometry);
}

Expand Down Expand Up @@ -259,7 +259,7 @@ public List<Feature> querySourceFeatures(@Nullable Filter.Statement filter) {

private native void nativeSetFeature(Feature feature);

private native void nativeSetGeometry(Geometry<?> geometry);
private native void nativeSetGeometry(Geometry geometry);

private native Feature[] querySourceFeatures(Object[] filter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.mapbox.geojson.Point;
import com.mapbox.mapboxsdk.camera.CameraPosition;
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
import com.mapbox.mapboxsdk.geometry.LatLng;
Expand All @@ -14,6 +15,9 @@
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.geojson.Polygon;

import java.util.Arrays;
import java.util.Collections;

import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionColor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionHeight;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionOpacity;
Expand All @@ -35,30 +39,31 @@ public void onCreate(Bundle savedInstanceState) {
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(map -> {
mapboxMap = map;
Polygon domTower = Polygon.fromLngLats(new double[][][] {
new double[][] {
new double[] {
5.12112557888031,
52.09071040847704
},
new double[] {
5.121227502822875,
52.09053901776669
},
new double[] {
5.121484994888306,
52.090601641371805
},
new double[] {
5.1213884353637695,
52.090766439912635
},
new double[] {
5.12112557888031,
52.09071040847704
}
}
});
Polygon domTower = Polygon.fromLngLats(
Collections.singletonList(
Arrays.asList(
Point.fromLngLat(
5.12112557888031,
52.09071040847704
),
Point.fromLngLat(
5.121227502822875,
52.09053901776669
),
Point.fromLngLat(
5.121484994888306,
52.090601641371805
),
Point.fromLngLat(
5.1213884353637695,
52.090766439912635
),
Point.fromLngLat(
5.12112557888031,
52.09071040847704
)
)
));

GeoJsonSource source = new GeoJsonSource("extrusion-source", domTower);
map.addSource(source);
Expand Down
2 changes: 1 addition & 1 deletion platform/android/gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
]

versions = [
mapboxServices: '3.0.0-beta.2',
mapboxServices: '3.0.0-SNAPSHOT',
mapboxTelemetry: '3.0.0-beta.1',
supportLib : '25.4.0',
espresso : '3.0.1',
Expand Down

0 comments on commit 86f25df

Please sign in to comment.