Skip to content

Commit

Permalink
Merge pull request #117 from heremaps/esd/41020
Browse files Browse the repository at this point in the history
Update example apps for release 4.10.2.0
  • Loading branch information
datasun authored Feb 9, 2022
2 parents c89c12f + 112666b commit 286fb4e
Show file tree
Hide file tree
Showing 97 changed files with 77 additions and 135 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For an overview of the existing features, please check the _Developer's Guide_ f

> For now, the _Navigate Edition_ is only available upon request. Please contact your HERE representative to receive access including a set of evaluation credentials.
## List of Available Example Apps (Version 4.10.1.0)
## List of Available Example Apps (Version 4.10.2.0)
In this repository you can find the [latest example apps](examples/latest) that show key features of the HERE SDK in ready-to-use applications:

- **HelloMap**: Shows the classic 'Hello World'.
Expand Down
2 changes: 1 addition & 1 deletion examples/latest/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This folder contains the HERE SDK examples apps for version: 4.10.1.0
This folder contains the HERE SDK examples apps for version: 4.10.2.0

- HERE SDK for Android ([Lite Edition](lite/android/), [Explore Edition](explore/android/), [Navigate Edition](navigate/android/))
- HERE SDK for iOS ([Lite Edition](lite/ios/), [Explore Edition](explore/ios/), [Navigate Edition](navigate/ios/))
Expand Down
Empty file modified examples/latest/explore/android/Camera/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/CustomMapStylesExplore/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This example app shows how to load custom raster layers. You can find how this is done in [CustomRasterLayersExample.java](app/src/main/java/com/here/customrasterlayers/CustomRasterLayersExample.java).
This example app shows how to load custom raster layers. You can find how this is done in [CustomRasterLayersExample.java](app/src/main/java/com/here/sdk/customrasterlayers/CustomRasterLayersExample.java).

Build instructions:
-------------------
Expand Down
Empty file modified examples/latest/explore/android/CustomRasterLayers/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,7 @@ private void logRouteViolations(Route route) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand All @@ -270,7 +263,7 @@ private void searchAlongARoute(Route route) {
// We specify here that we only want to include results
// within a max distance of xx meters from any point of the route.
int halfWidthInMeters = 200;
GeoCorridor routeCorridor = new GeoCorridor(route.getPolyline(), halfWidthInMeters);
GeoCorridor routeCorridor = new GeoCorridor(route.getGeometry().vertices, halfWidthInMeters);
TextQuery textQuery = new TextQuery("charging station", routeCorridor,
mapView.getCamera().getState().targetCoordinates);

Expand Down
Empty file modified examples/latest/explore/android/EVRouting/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/Gestures/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/HelloMap/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/MapItems/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
package com.here.routing;

import android.content.Context;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import android.util.Log;

import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
Expand Down Expand Up @@ -140,14 +141,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Empty file modified examples/latest/explore/android/PublicTransit/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
package com.here.routing;

import android.content.Context;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import android.util.Log;

import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
Expand Down Expand Up @@ -143,14 +144,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Empty file modified examples/latest/explore/android/Routing/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/Search/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/StandAloneEngine/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/Traffic/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/explore/android/UnitTesting/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class EVRoutingExample {
// We specify here that we only want to include results
// within a max distance of xx meters from any point of the route.
int halfWidthInMeters = 200;
GeoCorridor routeCorridor = GeoCorridor(route.polyline, halfWidthInMeters);
GeoCorridor routeCorridor = GeoCorridor(route.geometry.vertices, halfWidthInMeters);
TextQuery textQuery = TextQuery.withCorridorAreaAndAreaCenter(
"charging station", routeCorridor, _hereMapController.camera.state.targetCoordinates);

Expand Down Expand Up @@ -329,11 +329,9 @@ class EVRoutingExample {

_showRouteOnMap(here.Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline = GeoPolyline(route.polyline);

GeoPolyline routeGeoPolyline = route.geometry;
double widthInPixels = 20;
MapPolyline routeMapPolyline = MapPolyline(routeGeoPolyline, widthInPixels, Color.fromARGB(160, 0, 144, 138));

_hereMapController.mapScene.addMapPolyline(routeMapPolyline);
_mapPolylines.add(routeMapPolyline);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ class PublicTransportRoutingExample {

_showRouteOnMap(here.Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline = GeoPolyline(route.polyline);

GeoPolyline routeGeoPolyline = route.geometry;
double widthInPixels = 20;
MapPolyline routeMapPolyline = MapPolyline(routeGeoPolyline, widthInPixels, Color.fromARGB(160, 0, 144, 138));

_hereMapController.mapScene.addMapPolyline(routeMapPolyline);
_mapPolylines.add(routeMapPolyline);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ class RoutingExample {

_showRouteOnMap(here.Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline = GeoPolyline(route.polyline);

GeoPolyline routeGeoPolyline = route.geometry;
double widthInPixels = 20;
MapPolyline routeMapPolyline = MapPolyline(routeGeoPolyline, widthInPixels, Color.fromARGB(160, 0, 144, 138));

_hereMapController.mapScene.addMapPolyline(routeMapPolyline);
_mapPolylines.add(routeMapPolyline);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class RoutingExample {

private func showRouteOnMap(route: Route) {
// Show route as polyline.
let routeGeoPolyline = try! GeoPolyline(vertices: route.polyline)
let routeGeoPolyline = route.geometry
let routeMapPolyline = MapPolyline(geometry: routeGeoPolyline,
widthInPixels: 20,
color: UIColor(red: 0,
Expand All @@ -200,7 +200,7 @@ class RoutingExample {
private func searchAlongARoute(route: Route) {
// We specify here that we only want to include results
// within a max distance of xx meters from any point of the route.
let routeCorridor = GeoCorridor(polyline: route.polyline,
let routeCorridor = GeoCorridor(polyline: route.geometry.vertices,
halfWidthInMeters: Int32(200))
let textQuery = TextQuery("charging station",
in: routeCorridor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PublicTranportRoutingExample {

private func showRouteOnMap(route: Route) {
// Show route as polyline.
let routeGeoPolyline = try! GeoPolyline(vertices: route.polyline)
let routeGeoPolyline = route.geometry
let routeMapPolyline = MapPolyline(geometry: routeGeoPolyline,
widthInPixels: 20,
color: UIColor(red: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class RoutingExample {

private func showRouteOnMap(route: Route) {
// Show route as polyline.
let routeGeoPolyline = try! GeoPolyline(vertices: route.polyline)
let routeGeoPolyline = route.geometry
let routeMapPolyline = MapPolyline(geometry: routeGeoPolyline,
widthInPixels: 20,
color: UIColor(red: 0,
Expand Down
Empty file modified examples/latest/lite/android/CameraLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/GesturesLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/HelloMapLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/MapItemsLite/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that the route polyline contains less than two vertices.
return;
}
GeoPolyline routeGeoPolyline = route.getGeometry();
MapPolylineStyle mapPolylineStyle = new MapPolylineStyle();
mapPolylineStyle.setColor(0x00908AA0, PixelFormat.RGBA_8888);
mapPolylineStyle.setWidthInPixels(10);
Expand Down
Empty file modified examples/latest/lite/android/RoutingLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/SearchLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/StandAloneEngineLite/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/lite/android/TrafficLite/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class RoutingExample {

private func showRouteOnMap(route: Route) {
// Show route as polyline.
let routeGeoPolyline = try! GeoPolyline(vertices: route.polyline)
let routeGeoPolyline = route.geometry
let mapPolylineStyle = MapPolylineStyleLite()
mapPolylineStyle.setColor(0x00908AA0, encoding: .rgba8888)
mapPolylineStyle.setWidthInPixels(inPixels: 10)
Expand Down
Empty file modified examples/latest/navigate/android/Camera/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/CartoPOIPicking/gradlew
100755 → 100644
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This example app shows how to load custom raster layers. You can find how this is done in [CustomRasterLayersExample.java](app/src/main/java/com/here/customrasterlayers/CustomRasterLayersExample.java).
This example app shows how to load custom raster layers. You can find how this is done in [CustomRasterLayersExample.java](app/src/main/java/com/here/sdk/customrasterlayers/CustomRasterLayersExample.java).

Build instructions:
-------------------
Expand Down
Empty file modified examples/latest/navigate/android/CustomRasterLayers/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,7 @@ private void logRouteViolations(Route route) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand All @@ -270,7 +263,7 @@ private void searchAlongARoute(Route route) {
// We specify here that we only want to include results
// within a max distance of xx meters from any point of the route.
int halfWidthInMeters = 200;
GeoCorridor routeCorridor = new GeoCorridor(route.getPolyline(), halfWidthInMeters);
GeoCorridor routeCorridor = new GeoCorridor(route.getGeometry().vertices, halfWidthInMeters);
TextQuery textQuery = new TextQuery("charging station", routeCorridor,
mapView.getCamera().getState().targetCoordinates);

Expand Down
Empty file modified examples/latest/navigate/android/EVRouting/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/Gestures/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/HelloMap/gradlew
100755 → 100644
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified examples/latest/navigate/android/IndoorMap/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/MapItems/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@

import android.content.Context;

import androidx.appcompat.app.AlertDialog;

import com.google.android.material.snackbar.Snackbar;
import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
import com.here.sdk.core.GeoPolyline;
import com.here.sdk.core.Location;
import com.here.sdk.core.errors.InstantiationErrorException;
import com.here.sdk.gestures.GestureState;
import com.here.sdk.mapview.MapImage;
import com.here.sdk.mapview.MapImageFactory;
Expand All @@ -40,8 +41,6 @@
import java.util.List;
import java.util.Locale;

import androidx.appcompat.app.AlertDialog;

// An app that allows to calculate a route and start navigation, using either platform positioning or
// simulated locations.
public class App {
Expand Down Expand Up @@ -174,14 +173,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that the route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void onSpeedLimitUpdated(@NonNull SpeedLimit speedLimit) {
Double currentSpeedLimit = getCurrentSpeedLimit(speedLimit);

if (currentSpeedLimit == null) {
Log.d(TAG, "Warning: Speed limits unkown, data could not be retrieved.");
Log.d(TAG, "Warning: Speed limits unknown, data could not be retrieved.");
} else if (currentSpeedLimit == 0) {
Log.d(TAG, "No speed limits on this road! Drive as fast as you feel safe ...");
} else {
Expand Down
Empty file modified examples/latest/navigate/android/Navigation/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private void animateToRouteStart(Route route) {
double tiltInDegrees = 70;
mapView.getCamera().flyTo(
// The first coordinate marks the start location of the route.
route.getPolyline().get(0),
route.getGeometry().vertices.get(0),
new GeoOrientationUpdate(bearingInDegrees, tiltInDegrees),
50,
new FlyToOptions(),
Expand Down
Empty file modified examples/latest/navigate/android/NavigationCustom/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/NavigationQuickStart/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/OfflineMaps/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/Positioning/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
package com.here.routing;

import android.content.Context;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import android.util.Log;

import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
Expand Down Expand Up @@ -140,14 +141,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Empty file modified examples/latest/navigate/android/PublicTransit/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
package com.here.routing;

import android.content.Context;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import android.util.Log;

import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
Expand Down Expand Up @@ -143,14 +144,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Empty file modified examples/latest/navigate/android/Routing/gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
package com.here.routinghybrid;

import android.content.Context;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;

import com.here.sdk.core.Color;
import com.here.sdk.core.GeoCoordinates;
import com.here.sdk.core.GeoPolyline;
Expand Down Expand Up @@ -163,14 +164,7 @@ private String formatLength(int meters) {

private void showRouteOnMap(Route route) {
// Show route as polyline.
GeoPolyline routeGeoPolyline;
try {
routeGeoPolyline = new GeoPolyline(route.getPolyline());
} catch (InstantiationErrorException e) {
// It should never happen that a route polyline contains less than two vertices.
return;
}

GeoPolyline routeGeoPolyline = route.getGeometry();
float widthInPixels = 20;
MapPolyline routeMapPolyline = new MapPolyline(routeGeoPolyline,
widthInPixels,
Expand Down
Empty file modified examples/latest/navigate/android/RoutingHybrid/gradlew
100755 → 100644
Empty file.
Empty file modified examples/latest/navigate/android/Search/gradlew
100755 → 100644
Empty file.
Loading

0 comments on commit 286fb4e

Please sign in to comment.