after several edits got mapbox routing to work from here:
https://docs.mapbox.com/help/tutorials/android-navigation-sdk/
these colors:
"colorPrimary"
"colorPrimaryDark"
"colorAccent"
are not explicity used, but are prob. in this theme:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
these colors:
"mapboxWhite"
"mapboxBlue"
"mapboxPink"
"mapboxYellow"
are used in:
<style name="NavigationMapRoute">
as:
<item name="routeColor">@color/mapboxBlue</item>
<item name="routeModerateCongestionColor">@color/mapboxYellow</item>
<item name="routeSevereCongestionColor">@color/mapboxPink</item>
<item name="routeShieldColor">@color/mapboxWhite</item>
these colors:
"mapboxGrayLight"
is used in:
android:background="@color/mapboxGrayLight"
./AngelaNav1/app/src/main/res/layout/activity_main.xml
seems to be color of Start Navigation button when disabled
these colors:
"mapboxRed"
apparently unused; could have been used in SevereCongestionColor but replaced with Pink
TODO:
change routeColor to be carrot
main menu bar: "colorPrimary"
color of Start Navigation button when enabled carrot
done (except for nav button):
colors.xml:
<!-- carrot colors -->
<color name="colorPrimary">#F90</color>
<color name="colorPrimaryDark">#Fc6</color>
<color name="colorAccent">#9f6</color>
<color name="carrotOrange">#F90</color>
<color name="carrotLightOrange">#Fc6</color>
<color name="carrotDarkGreen">#690</color>
<color name="carrotLightGreen">#9f6</color>
some notes on android app styles:
https://docs.mapbox.com/android/maps/overview/data-driven-styling/
section Data-Driven Styling says:
mapboxMap.getStyle(new Style.OnStyleLoaded() {
@Override
public void onStyleLoaded(@NonNull Style style) {
try {
URI geoJsonUrl = new URI("https://url-to-geojson-file.geojson");
GeoJsonSource geoJsonSource = new GeoJsonSource("geojson-source", geoJsonUrl);
style.addSource(geoJsonSource);
} catch (URISyntaxException exception) {
Log.d(TAG, exception);
}
}
});
https://docs.mapbox.com/android/maps/examples/add-an-image-source-with-time-lapse/
and in git:
geojson plugin: https://blog.mapbox.com/new-geojson-plugin-for-android-862124f9d24b
geojson docs: https://docs.mapbox.com/mapbox-gl-js/api/#geojsonsource
this one looks ok, but web (not android): "Add live realtime data": https://docs.mapbox.com/mapbox-gl-js/example/live-geojson/
direct fetch of JSON from MySQL: https://www.simplifiedcoding.net/json-parsing-in-android/
1) seems good place to start:
2) Tutorials: https://docs.mapbox.com/help/tutorials/
Use Mapbox with OpenLayers: https://docs.mapbox.com/help/tutorials/mapbox-with-openlayers/
Add OpenStreetMap data to your Mapbox project: https://docs.mapbox.com/help/tutorials/overpass-turbo/
Build a store locator using Mapbox GL JS: https://docs.mapbox.com/help/tutorials/building-a-store-locator/
Get started with Mapbox GL JS expressions: https://docs.mapbox.com/help/tutorials/mapbox-gl-js-expressions/
Add custom markers in Mapbox GL JS: https://docs.mapbox.com/help/tutorials/custom-markers-gl-js/
Local search with the Geocoding API: https://docs.mapbox.com/help/tutorials/local-search-geocoding-api/
3) examples & blog
animated_marker.java: https://docs.mapbox.com/android/maps/examples/animate-marker-position/
icon_updated_from_api_source.java: https://docs.mapbox.com/android/maps/examples/api-response-icon-update/
New GeoJSON plugin for Android: https://blog.mapbox.com/new-geojson-plugin-for-android-862124f9d24b
4) general android: