Skip to content

Commit 0e8066f

Browse files
authored
Merge pull request #87 from heremaps/esd/1042
ESD-1042: Update example apps for release 4.7.6.0
2 parents 2418073 + f4a83f3 commit 0e8066f

File tree

107 files changed

+854
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+854
-228
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For an overview of the existing features, please check the _Developer's Guide_ f
2121

2222
> For now, the _Navigate Edition_ is only available upon request. Please contact your HERE representative to receive access including a set of evaluation credentials.
2323
24-
## List of Available Example Apps (Version 4.7.5.0)
24+
## List of Available Example Apps (Version 4.7.6.0)
2525
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:
2626

2727
- **HelloMap**: Shows the classic 'Hello World'.
@@ -30,7 +30,7 @@ In this repository you can find the [latest example apps](examples/latest) that
3030
- **CustomMapStyles**: Shows how to load custom map schemes made with the _HERE Style Editor_. Exclusively available for the _Explore Edition_ and the _Navigate Edition_).
3131
- **Gestures**: Shows how to handle gestures.
3232
- **OfflineMaps**: Shows how the HERE SDK can work fully offline and how offline map data can be downloaded for continents and countries. Exclusively available for the _Navigate Edition_.
33-
- **MapItems** / **MapMarkerLite**: Shows how to add 2D and 3D map markers to locate POIs (and more) on the map. 3D map markers are exclusively available for the _Explore and Navigate Editions_.
33+
- **MapItems**: Shows how to add 2D and 3D map markers to locate POIs (and more) on the map. 3D map markers are exclusively available for the _Explore and Navigate Editions_.
3434
- **MapObjects**: Shows how to add circles, polygons and polylines to the map.
3535
- **MapViewPins** / **MapOverlaysLite**: Shows how to add standard platform views to the map.
3636
- **Routing**: Shows how to calculate routes and add them to the map.

examples/latest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This folder contains the HERE SDK examples apps for version: 4.7.5.0
1+
This folder contains the HERE SDK examples apps for version: 4.7.6.0
22

33
- HERE SDK for Android ([Lite Edition](lite/android/), [Explore Edition](explore/android/), [Navigate Edition](navigate/android/))
44
- HERE SDK for iOS ([Lite Edition](lite/ios/), [Explore Edition](explore/ios/), [Navigate Edition](navigate/ios/))

examples/latest/explore/flutter/camera_app/lib/main.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
7575
Align button(String buttonLabel, Function callbackFunction) {
7676
return Align(
7777
alignment: Alignment.topCenter,
78-
child: RaisedButton(
79-
color: Colors.lightBlueAccent,
80-
textColor: Colors.white,
78+
child: ElevatedButton(
79+
style: ElevatedButton.styleFrom(
80+
primary: Colors.lightBlueAccent,
81+
onPrimary: Colors.white,
82+
),
8183
onPressed: () => callbackFunction(),
8284
child: Text(buttonLabel, style: TextStyle(fontSize: 20)),
8385
),

examples/latest/explore/flutter/ev_routing_app/lib/main.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ class _EVRoutingAppState extends State<EVRoutingApp> {
8585
Align button(String buttonLabel, Function callbackFunction) {
8686
return Align(
8787
alignment: Alignment.topCenter,
88-
child: RaisedButton(
89-
color: Colors.lightBlueAccent,
90-
textColor: Colors.white,
88+
child: ElevatedButton(
89+
style: ElevatedButton.styleFrom(
90+
primary: Colors.lightBlueAccent,
91+
onPrimary: Colors.white,
92+
),
9193
onPressed: () => callbackFunction(),
9294
child: Text(buttonLabel, style: TextStyle(fontSize: 20)),
9395
),
@@ -110,7 +112,7 @@ class _EVRoutingAppState extends State<EVRoutingApp> {
110112
),
111113
),
112114
actions: <Widget>[
113-
FlatButton(
115+
TextButton(
114116
child: Text('OK'),
115117
onPressed: () {
116118
Navigator.of(context).pop();

examples/latest/explore/flutter/ev_routing_app/test/widget_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:ev_routing_app/main.dart';
1313
void main() {
1414
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1515
// Build our app and trigger a frame.
16-
await tester.pumpWidget(MyApp());
16+
await tester.pumpWidget(EVRoutingApp());
1717

1818
// Verify that our counter starts at 0.
1919
expect(find.text('0'), findsOneWidget);

examples/latest/explore/flutter/gestures_app/lib/GesturesExample.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class GesturesExample {
103103
),
104104
),
105105
actions: <Widget>[
106-
FlatButton(
106+
TextButton(
107107
child: Text('OK'),
108108
onPressed: () {
109109
Navigator.of(context).pop();

examples/latest/explore/flutter/map_items_app/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.here.sdk.examples.mapmarker">
2+
package="com.here.sdk.examples.mapitems">
33
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
44
calls FlutterMain.startInitialization(this); in its onCreate method.
55
In most cases you can leave this as-is, but you if you want to provide
66
additional functionality it is fine to subclass or reimplement
77
FlutterApplication and put your custom class here. -->
88
<application
99
android:name="io.flutter.app.FlutterApplication"
10-
android:label="mapmarker"
10+
android:label="mapitems"
1111
android:icon="@mipmap/ic_launcher">
1212

1313
<!-- Set your HERE SDK credentials below. -->

examples/latest/explore/flutter/map_items_app/lib/main.dart

Lines changed: 119 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -43,42 +43,12 @@ class _MyAppState extends State<MyApp> {
4343
appBar: AppBar(
4444
title: Text('HERE SDK - Map Items Example'),
4545
),
46+
drawer: Drawer(
47+
child: ListView(children: _buildDrawerList(context)),
48+
),
4649
body: Stack(
4750
children: [
4851
HereMap(onMapCreated: _onMapCreated),
49-
Column(
50-
mainAxisAlignment: MainAxisAlignment.start,
51-
children: [
52-
Row(
53-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
54-
children: [
55-
button('Anchored (2D)', _anchoredMapMarkersButtonClicked),
56-
button('Centered (2D)', _centeredMapMarkersButtonClicked),
57-
],
58-
),
59-
Row(
60-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
61-
children: [
62-
button('Location (Ped)', _locationIndicatorPedestrianButtonClicked),
63-
button('Location (Nav)', _locationIndicatorNavigationButtonClicked),
64-
],
65-
),
66-
Row(
67-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
68-
children: [
69-
button('Location Active/Inactive', _locationIndicatorActiveInactiveButtonClicked),
70-
],
71-
),
72-
Row(
73-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
74-
children: [
75-
button('Flat', _flatMapMarkersButtonClicked),
76-
button('3D OBJ', _mapMarkers3DButtonClicked),
77-
button('Clear', _clearButtonClicked),
78-
],
79-
),
80-
],
81-
),
8252
],
8353
),
8454
);
@@ -130,9 +100,11 @@ class _MyAppState extends State<MyApp> {
130100
Align button(String buttonLabel, Function callbackFunction) {
131101
return Align(
132102
alignment: Alignment.topCenter,
133-
child: RaisedButton(
134-
color: Colors.lightBlueAccent,
135-
textColor: Colors.white,
103+
child: ElevatedButton(
104+
style: ElevatedButton.styleFrom(
105+
primary: Colors.lightBlueAccent,
106+
onPrimary: Colors.white,
107+
),
136108
onPressed: () => callbackFunction(),
137109
child: Text(buttonLabel, style: TextStyle(fontSize: 20)),
138110
),
@@ -155,7 +127,7 @@ class _MyAppState extends State<MyApp> {
155127
),
156128
),
157129
actions: <Widget>[
158-
FlatButton(
130+
TextButton(
159131
child: Text('OK'),
160132
onPressed: () {
161133
Navigator.of(context).pop();
@@ -166,4 +138,114 @@ class _MyAppState extends State<MyApp> {
166138
},
167139
);
168140
}
141+
142+
// A helper method to build drawer list.
143+
List<Widget> _buildDrawerList(BuildContext context) {
144+
List<Widget> children = [];
145+
146+
DrawerHeader header = DrawerHeader(
147+
child: Column(
148+
children: [
149+
Text(
150+
'HERE SDK - Map Items Example',
151+
style: TextStyle(
152+
fontSize: 24,
153+
color: Colors.white,
154+
),
155+
),
156+
],
157+
),
158+
decoration: BoxDecoration(
159+
color: Colors.blue,
160+
),
161+
);
162+
children.add(header);
163+
164+
// Add MapMarker section.
165+
var mapMarkerTile = _buildMapMarkerExpansionTile(context);
166+
children.add(mapMarkerTile);
167+
168+
// Add LocationIndicator section.
169+
var locationIndicatorTile = _buildLocationIndicatorExpansionTile(context);
170+
children.add(locationIndicatorTile);
171+
172+
// Add section to clear the map.
173+
var clearTile = _buildClearTile(context);
174+
children.add(clearTile);
175+
176+
return children;
177+
}
178+
179+
Widget _buildMapMarkerExpansionTile(BuildContext context) {
180+
return ExpansionTile(
181+
title: Text("MapMarker"),
182+
children: [
183+
ListTile(
184+
title: Text('Anchored (2D)'),
185+
onTap: () {
186+
Navigator.pop(context);
187+
_anchoredMapMarkersButtonClicked();
188+
},
189+
),
190+
ListTile(
191+
title: Text('Centered (2D)'),
192+
onTap: () {
193+
Navigator.pop(context);
194+
_centeredMapMarkersButtonClicked();
195+
},
196+
),
197+
ListTile(
198+
title: Text('Flat'),
199+
onTap: () {
200+
Navigator.pop(context);
201+
_flatMapMarkersButtonClicked();
202+
},
203+
),
204+
ListTile(
205+
title: Text('3D OBJ'),
206+
onTap: () {
207+
Navigator.pop(context);
208+
_mapMarkers3DButtonClicked();
209+
},
210+
)
211+
],
212+
initiallyExpanded: true,
213+
);
214+
}
215+
216+
Widget _buildLocationIndicatorExpansionTile(BuildContext context) {
217+
return ExpansionTile(
218+
title: Text("LocationIndicator"),
219+
children: [
220+
ListTile(
221+
title: Text('Location (Ped)'),
222+
onTap: () {
223+
Navigator.pop(context);
224+
_locationIndicatorPedestrianButtonClicked();
225+
}),
226+
ListTile(
227+
title: Text('Location (Nav)'),
228+
onTap: () {
229+
Navigator.pop(context);
230+
_locationIndicatorNavigationButtonClicked();
231+
}),
232+
ListTile(
233+
title: Text('Location Active/Inactive'),
234+
onTap: () {
235+
Navigator.pop(context);
236+
_locationIndicatorActiveInactiveButtonClicked();
237+
}),
238+
],
239+
initiallyExpanded: true,
240+
);
241+
}
242+
243+
Widget _buildClearTile(BuildContext context) {
244+
return ListTile(
245+
title: Text('Clear'),
246+
onTap: () {
247+
Navigator.pop(context);
248+
_clearButtonClicked();
249+
});
250+
}
169251
}

examples/latest/explore/flutter/map_objects_app/lib/main.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ class MyApp extends StatelessWidget {
9696
Align button(String buttonLabel, Function callbackFunction) {
9797
return Align(
9898
alignment: Alignment.topCenter,
99-
child: RaisedButton(
100-
color: Colors.lightBlueAccent,
101-
textColor: Colors.white,
99+
child: ElevatedButton(
100+
style: ElevatedButton.styleFrom(
101+
primary: Colors.lightBlueAccent,
102+
onPrimary: Colors.white,
103+
),
102104
onPressed: () => callbackFunction(),
103105
child: Text(buttonLabel, style: TextStyle(fontSize: 20)),
104106
),

examples/latest/explore/flutter/map_view_pins_app/lib/main.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ class MyApp extends StatelessWidget {
8181
Align button(String buttonLabel, Function callbackFunction) {
8282
return Align(
8383
alignment: Alignment.topCenter,
84-
child: RaisedButton(
85-
color: Colors.lightBlueAccent,
86-
textColor: Colors.white,
84+
child: ElevatedButton(
85+
style: ElevatedButton.styleFrom(
86+
primary: Colors.lightBlueAccent,
87+
onPrimary: Colors.white,
88+
),
8789
onPressed: () => callbackFunction(),
8890
child: Text(buttonLabel, style: TextStyle(fontSize: 20)),
8991
),

0 commit comments

Comments
 (0)