Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Fixes to various small issues found during QA #1099

Merged
merged 1 commit into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
import com.mapbox.mapboxandroiddemo.examples.styles.MissingIconActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.RotatingTextAnchorPositionActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.ShowHideLayersActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.StyleFadeSwitchActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.SatelliteOpacityOnZoomActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TextFieldFormattingActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TextFieldMultipleFormatsActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TransparentBackgroundActivity;
Expand Down Expand Up @@ -638,11 +638,11 @@ private void initializeModels() {

exampleItemModels.add(new ExampleItemModel(
R.id.nav_styles,
R.string.activity_styles_fade_switch_title,
R.string.activity_styles_fade_switch_description,
new Intent(MainActivity.this, StyleFadeSwitchActivity.class),
R.string.activity_styles_satellite_opacity_on_zoom_title,
R.string.activity_style_satellite_opacity_on_zoom_description,
new Intent(MainActivity.this, SatelliteOpacityOnZoomActivity.class),
null,
R.string.activity_styles_fade_switch_url, false, BuildConfig.MIN_SDK_VERSION));
R.string.activity_style_satellite_opacity_on_zoom_url, false, BuildConfig.MIN_SDK_VERSION));

exampleItemModels.add(new ExampleItemModel(
R.id.nav_styles,
Expand Down
4 changes: 2 additions & 2 deletions MapboxAndroidDemo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
</activity>
<activity
android:name=".examples.styles.StyleFadeSwitchActivity"
android:label="@string/activity_styles_fade_switch_title">
android:name=".examples.styles.SatelliteOpacityOnZoomActivity"
android:label="@string/activity_styles_satellite_opacity_on_zoom_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public void onMapReady(@NonNull final MapboxMap mapboxMap) {
@Override
public void onStyleLoaded(@NonNull Style style) {
style.addSource(new GeoJsonSource("source-id", Polygon.fromLngLats(POINTS)));
style.addLayer(new FillLayer("layer-id", "source-id").withProperties(
fillColor(Color.parseColor("#3bb2d0")))
style.addLayerBelow(new FillLayer("layer-id", "source-id").withProperties(
fillColor(Color.parseColor("#3bb2d0"))), "settlement-label"
);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Mapbox.getInstance(this, getString(R.string.access_token));

// This contains the MapView in XML and needs to be called after the access token is configured.
setContentView(R.layout.activity_dds_temperature_change);
setContentView(R.layout.activity_dds_multiple_expression_integration);

unitsFab = findViewById(R.id.change_units_fab);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ protected void onCreate(Bundle savedInstanceState) {
Mapbox.getInstance(this, getString(R.string.access_token));

// Configure initial map state
MapboxMapOptions options = new MapboxMapOptions()
MapboxMapOptions mapboxMapOptions = MapboxMapOptions.createFromAttributes(this, null);
mapboxMapOptions
.camera(new CameraPosition.Builder().zoom(13).target(new LatLng(25.255377, 55.3089185))
.build())
.attributionTintColor(RED_COLOR)
.compassFadesWhenFacingNorth(false)
.camera(new CameraPosition.Builder()
.target(new LatLng(25.255377, 55.3089185))
.zoom(11.86)
.tilt(10)
.build());

mapView = new MapView(this, options);
.compassFadesWhenFacingNorth(true);

mapView = new MapView(this, mapboxMapOptions);
mapView.setId(R.id.mapView);
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(this);
Expand All @@ -80,9 +78,9 @@ public void onStyleLoaded(@NonNull Style style) {
style.addSource(new GeoJsonSource("source-id",
Feature.fromGeometry(Polygon.fromOuterInner(outerLineString, innerList))));

style.addLayer(new FillLayer("layer-id", "source-id").withProperties(
style.addLayerBelow(new FillLayer("layer-id", "source-id").withProperties(
PropertyFactory.fillColor(BLUE_COLOR)
));
), "road-number-shield");
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private void drawBeforeMapMatching(Feature feature) {
map.getStyle(style -> {
style.addSource(new GeoJsonSource("pre-matched-source-id", feature));
style.addLayer(new LineLayer("pre-matched-layer-id", "pre-matched-source-id").withProperties(
lineColor(ColorUtils.colorToRgbaString(Color.parseColor("#3bb2d0"))),
lineColor(ColorUtils.colorToRgbaString(Color.parseColor("#c14a00"))),
lineWidth(6f),
lineOpacity(1f)
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void onStyleLoaded(@NonNull Style style) {
setUpLineLayer(style);
mapboxMap.addOnCameraIdleListener(BuildingOutlineActivity.this);
showCrosshair();
Toast.makeText(BuildingOutlineActivity.this, R.string.move_map_around_instruction,
Toast.makeText(BuildingOutlineActivity.this, R.string.move_map_around_building_out_instruction,
Toast.LENGTH_SHORT).show();
updateOutline(style);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Go from the Mapbox Streets style to a satellite photo raster layer as the map camera zooms in.
* This is similar to how Snap uses Mapbox for Snap Maps.
*/
public class StyleFadeSwitchActivity extends AppCompatActivity implements
public class SatelliteOpacityOnZoomActivity extends AppCompatActivity implements
OnMapReadyCallback {

private MapView mapView;
Expand All @@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
Mapbox.getInstance(this, getString(R.string.access_token));

// This contains the MapView in XML and needs to be called after the access token is configured.
setContentView(R.layout.activity_style_fade_switch);
setContentView(R.layout.activity_satellite_opacity_on_zoom);

mapView = findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
Expand Down Expand Up @@ -71,7 +71,6 @@ public void onStyleLoaded(@NonNull Style style) {
CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder()
.zoom(19)
.build()), 9000);

}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:layout_height="match_parent"
mapbox:mapbox_cameraTargetLat="41.89306"
mapbox:mapbox_cameraTargetLng="12.48278"
mapbox:mapbox_cameraZoom="11" />
mapbox:mapbox_cameraZoom="8" />


<android.support.design.widget.FloatingActionButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="8dp" />
android:layout_marginBottom="32dp" />

</FrameLayout>
1 change: 1 addition & 0 deletions MapboxAndroidDemo/src/main/res/values/activity_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@

<!-- Building outline-->
<string name="building_layer_not_present">This map style doesn\'t have a building layer</string>
<string name="move_map_around_building_out_instruction">Move map to place red dot on a building</string>
<string name="move_map_around_instruction">Move map around</string>

<!--Calendar integration toast-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<string name="activity_style_image_source_time_lapse_description">Use an image source and a runnable to show data changes over time.</string>
<string name="activity_style_image_source_description">Use an image source to easily display images on the map.</string>
<string name="activity_style_hillshade_description">Use elevation data to show and customize hills and mountains.</string>
<string name="activity_styles_fade_switch_description">Fade map styles in and out based on zoom level.</string>
<string name="activity_style_satellite_opacity_on_zoom_description">Adjust the opacity of a satellite raster layer based on zoom level.</string>
<string name="activity_styles_text_field_multiple_formats_description">Use a format expression to style labels with multiple languages, fonts, sizes, and colors.</string>
<string name="activity_styles_transparent_background_description">Create a transparent background and fill it with something such as moving water.</string>
<string name="activity_styles_click_to_add_image_description">Select a photo on the device and add it on the map tap location.</string>
Expand All @@ -53,7 +53,7 @@
<string name="activity_dds_multiple_geometries_description">Filter and draw multiple geometries from a single GeoJSON file.</string>
<string name="activity_dds_bathymetry_description">Use data-driven styling to show bathymetry (water depth) data</string>
<string name="activity_dds_info_window_symbol_layer_description">Use SymbolLayer and icons to show data in a BubbleLayout "info window".</string>
<string name="activity_dds_expression_integration_description">Use multiple expressions to visualize unit change in data.</string>
<string name="activity_dds_expression_integration_description">Use multiple expressions to convert and visualize data.</string>
<string name="activity_dds_satellite_land_select_description">View satellite photos and click to outline an area of land.</string>
<string name="activity_dds_symbol_zoom_switch_description">Change SymbolLayer icons based on the camera\'s zoom level.</string>
<string name="activity_annotation_marker_description">Create a default marker with an InfoWindow.</string>
Expand Down
4 changes: 2 additions & 2 deletions MapboxAndroidDemo/src/main/res/values/titles_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<string name="activity_style_image_source_time_lapse_title">Show time lapse</string>
<string name="activity_style_image_source_title">Use an image source</string>
<string name="activity_styles_hillshade_title">Hillshading</string>
<string name="activity_styles_fade_switch_title">Switch map styles with fade</string>
<string name="activity_styles_satellite_opacity_on_zoom_title">Opacity fade</string>
<string name="activity_styles_text_field_multiple_formats_title">Multiple text formats</string>
<string name="activity_styles_transparent_background_title">Transparent render surface</string>
<string name="activity_styles_click_to_add_image_title">Click to add photo</string>
Expand All @@ -52,7 +52,7 @@
<string name="activity_dds_bathymetry_title">Display water depth</string>
<string name="activity_dds_info_window_symbol_layer_title">Symbol layer info window</string>
<string name="activity_dds_image_clustering_title">SymbolLayer clustering</string>
<string name="activity_dds_expression_integration_title">Temperature change</string>
<string name="activity_dds_expression_integration_title">Multiple expressions</string>
<string name="activity_dds_satellite_land_select_title">Satellite land select</string>
<string name="activity_dds_line_gradient_title">Line gradient</string>
<string name="activity_dds_symbol_zoom_switch_title">Zoom-based icon switch</string>
Expand Down
4 changes: 2 additions & 2 deletions MapboxAndroidDemo/src/main/res/values/urls_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<string name="activity_style_image_source_time_lapse_url" translatable="false">http://i.imgur.com/ijoGPrF.png</string>
<string name="activity_style_image_source_url" translatable="false">https://i.imgur.com/I6B6cCE.png</string>
<string name="activity_style_hillshade_url" translatable="false">https://i.imgur.com/U2OKixV.png</string>
<string name="activity_styles_fade_switch_url" translatable="false">https://i.imgur.com/1sPnDx5.png</string>
<string name="activity_style_satellite_opacity_on_zoom_url" translatable="false">https://i.imgur.com/1sPnDx5.png</string>
<string name="activity_styles_text_field_multiple_formats_url" translatable="false">https://i.imgur.com/dpiGiTg.png</string>
<string name="activity_styles_transparent_background_url" translatable="false">https://i.imgur.com/5bYnlp5.png</string>
<string name="activity_styles_click_to_add_image_url" translatable="false">https://i.imgur.com/uPIH5Ck.png</string>
Expand Down Expand Up @@ -98,7 +98,7 @@
<string name="activity_location_user_location_fragment_plugin_url" translatable="false">https://i.imgur.com/1jG8WQG.png</string>
<string name="activity_location_location_component_options_url" translatable="false">https://i.imgur.com/4HiEJC1.png</string>
<string name="activity_java_services_simplify_polyline_url" translatable="false">http://i.imgur.com/uATgul1.png</string>
<string name="activity_java_services_map_matching_url" translatable="false">http://i.imgur.com/bWvVbwC.png</string>
<string name="activity_java_services_map_matching_url" translatable="false">https://i.imgur.com/ig8gGnY.png</string>
<string name="activity_image_generator_snapshot_notification_url" translatable="false">https://i.imgur.com/OiveDFG.png</string>
<string name="activity_image_generator_snapshot_share_url" translatable="false">https://i.imgur.com/KgfsY3s.png</string>
<string name="activity_lab_animated_marker_url" translatable="false">http://i.imgur.com/XegvIKr.png</string>
Expand Down