Skip to content

Commit 05f6672

Browse files
Merge pull request #91 from Esri/PaulAllanSturm/manage_bookmarks
"Manage bookmarks" sample
2 parents 6bd6596 + e469ecf commit 05f6672

File tree

6 files changed

+395
-10
lines changed

6 files changed

+395
-10
lines changed

assets/generated_samples_list.json

Lines changed: 86 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,32 @@
763763
"title": "Identify layer features",
764764
"key": "identify_layer_features"
765765
},
766+
"manage_bookmarks": {
767+
"category": "Maps",
768+
"description": "Access and create bookmarks on a map.",
769+
"ignore": false,
770+
"images": [
771+
"manage_bookmarks.png"
772+
],
773+
"keywords": [
774+
"bookmark",
775+
"extent",
776+
"location",
777+
"zoom",
778+
"Bookmark",
779+
"Viewpoint"
780+
],
781+
"redirect_from": [],
782+
"relevant_apis": [
783+
"Bookmark",
784+
"Viewpoint"
785+
],
786+
"snippets": [
787+
"manage_bookmarks_sample.dart"
788+
],
789+
"title": "Manage bookmarks",
790+
"key": "manage_bookmarks"
791+
},
766792
"query_feature_table": {
767793
"category": "Search and Query",
768794
"description": "Find features in a feature table which match an SQL query.",
@@ -880,14 +906,28 @@
880906
},
881907
"set_basemap": {
882908
"category": "Maps",
883-
"description": "Set a map's basemap. A basemap is beneath all layers on a map and is used to provide visual reference for the operational layers.",
909+
"description": "Change a map's basemap. A basemap is beneath all layers on a map and is used to provide visual reference for the operational layers.",
884910
"ignore": false,
885-
"images": [],
886-
"keywords": [],
911+
"images": [
912+
"set_basemap.png"
913+
],
914+
"keywords": [
915+
"basemap",
916+
"map",
917+
"ArcGISMap",
918+
"ArcGISMapViewController",
919+
"Basemap"
920+
],
887921
"redirect_from": [],
888-
"relevant_apis": [],
889-
"snippets": [],
890-
"title": "Set Basemap",
922+
"relevant_apis": [
923+
"ArcGISMap",
924+
"ArcGISMapViewController",
925+
"Basemap"
926+
],
927+
"snippets": [
928+
"set_basemap_sample.dart"
929+
],
930+
"title": "Set basemap",
891931
"key": "set_basemap"
892932
},
893933
"show_device_location": {
@@ -926,11 +966,47 @@
926966
"category": "Maps",
927967
"description": "Display your device's location history on the map.",
928968
"ignore": false,
929-
"images": [],
930-
"keywords": [],
969+
"images": [
970+
"show_device_location_history.png"
971+
],
972+
"keywords": [
973+
"GPS",
974+
"bread crumb",
975+
"breadcrumb",
976+
"history",
977+
"movement",
978+
"navigation",
979+
"real-time",
980+
"trace",
981+
"track",
982+
"trail",
983+
"Graphic",
984+
"GraphicsOverlay",
985+
"LocationDataSource",
986+
"LocationDisplay",
987+
"LocationDisplayAutoPanMode",
988+
"PolylineBuilder",
989+
"SimpleLineSymbol",
990+
"SimpleMarkerSymbol",
991+
"SimpleRenderer",
992+
"SimulatedLocationDataSource"
993+
],
931994
"redirect_from": [],
932-
"relevant_apis": [],
933-
"snippets": [],
995+
"relevant_apis": [
996+
"Graphic",
997+
"GraphicsOverlay",
998+
"LocationDataSource",
999+
"LocationDisplay",
1000+
"LocationDisplayAutoPanMode",
1001+
"PolylineBuilder",
1002+
"SimpleLineSymbol",
1003+
"SimpleMarkerSymbol",
1004+
"SimpleRenderer",
1005+
"SimulatedLocationDataSource"
1006+
],
1007+
"snippets": [
1008+
"show_device_location_history_sample.dart"
1009+
],
9341010
"title": "Show device location history",
9351011
"key": "show_device_location_history"
9361012
},

lib/models/samples_widget_list.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import 'package:arcgis_maps_sdk_flutter_samples/samples/find_closest_facility_fr
2323
import 'package:arcgis_maps_sdk_flutter_samples/samples/find_route/find_route_sample.dart';
2424
import 'package:arcgis_maps_sdk_flutter_samples/samples/generate_offline_map/generate_offline_map_sample.dart';
2525
import 'package:arcgis_maps_sdk_flutter_samples/samples/identify_layer_features/identify_layer_features_sample.dart';
26+
import 'package:arcgis_maps_sdk_flutter_samples/samples/manage_bookmarks/manage_bookmarks_sample.dart';
2627
import 'package:arcgis_maps_sdk_flutter_samples/samples/query_feature_table/query_feature_table_sample.dart';
2728
import 'package:arcgis_maps_sdk_flutter_samples/samples/query_table_statistics/query_table_statistics_sample.dart';
2829
import 'package:arcgis_maps_sdk_flutter_samples/samples/search_with_geocode/search_with_geocode_sample.dart';
@@ -72,6 +73,7 @@ const sampleWidgets = <String, Widget>{
7273
'find_route': FindRouteSample(),
7374
'generate_offline_map': GenerateOfflineMapSample(),
7475
'identify_layer_features': IdentifyLayerFeaturesSample(),
76+
'manage_bookmarks': ManageBookmarksSample(),
7577
'query_feature_table': QueryFeatureTableSample(),
7678
'query_table_statistics': QueryTableStatisticsSample(),
7779
'search_with_geocode': SearchWithGeocodeSample(),
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Manage bookmarks
2+
3+
Access and create bookmarks on a map.
4+
5+
![Image of manage bookmarks](manage_bookmarks.png)
6+
7+
## Use case
8+
9+
Bookmarks are used for easily storing and accessing saved locations on the map. Bookmarks are of interest in educational apps (e.g. touring historical sites) or more specifically, for a land management company wishing to visually monitor flood levels over time at a particular location. These locations can be saved as bookmarks and revisited easily each time their basemap data has been updated (e.g. working with up-to-date satellite imagery to monitor water levels).
10+
11+
## How to use the sample
12+
13+
The map in the sample comes pre-populated with a set of bookmarks. To access a bookmark and move to that location, tap on a bookmark's name from the 'Bookmarks' list. To add a bookmark, pan and/or zoom to a new location and tap the 'Add Bookmark' button. Enter a unique name for the bookmark and tap 'Add', and the bookmark will be added to the list.
14+
15+
## How it works
16+
17+
1. Instantiate a new `ArcGISMap` object and access the `List<Bookmark>` property at `ArcGISMap.bookmarks`.
18+
2. To create a new bookmark and add it to the bookmark list:
19+
- Instantiate a new `Bookmark` object passing in text (the name of the bookmark) and a `Viewpoint` as parameters.
20+
- Add the new bookmark to the bookmark list with `bookmarks.add(bookmark)`.
21+
22+
## Relevant API
23+
24+
* Bookmark
25+
* Viewpoint
26+
27+
## Tags
28+
29+
bookmark, extent, location, zoom
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"category": "Maps",
3+
"description": "Access and create bookmarks on a map.",
4+
"ignore": false,
5+
"images": [
6+
"manage_bookmarks.png"
7+
],
8+
"keywords": [
9+
"bookmark",
10+
"extent",
11+
"location",
12+
"zoom",
13+
"Bookmark",
14+
"Viewpoint"
15+
],
16+
"redirect_from": [],
17+
"relevant_apis": [
18+
"Bookmark",
19+
"Viewpoint"
20+
],
21+
"snippets": [
22+
"manage_bookmarks_sample.dart"
23+
],
24+
"title": "Manage bookmarks"
25+
}
292 KB
Loading

0 commit comments

Comments
 (0)