Skip to content

Commit

Permalink
Flutter map version up. support 6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
munkh-altai committed Dec 13, 2023
1 parent c476b7a commit b4236c8
Show file tree
Hide file tree
Showing 32 changed files with 672 additions and 531 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.0.6

- Flutter map version up. support 6.1.0

## 2.0.5

- Flutter map version up

## 2.0.4

- isFilled option added to polygon
Expand Down
102 changes: 53 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,62 +52,64 @@ class _MyAppState extends State<MyApp> {
Flexible(
child: FlutterMap(
options: MapOptions(
center: LatLng(32.91081899999999, -92.734876),
// center: LatLng(47.925812, 106.919831),
zoom: 9.0,
plugins: [EsriPlugin()],
// center: LatLng(39.7644863,-105.0199111), // line
center: LatLng(35.611909, -82.440682),
zoom: 14.0,
),
layers: [
TileLayerOptions(
children: [
TileLayer(
urlTemplate:
'http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
),
FeatureLayerOptions("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Congressional_Districts/FeatureServer/0",
"polygon",
onTap: (dynamic attributes, LatLng location) {
print(attributes);
},
render: (dynamic attributes){
// You can render by attribute
return PolygonOptions(
borderColor: Colors.blueAccent,
color: Colors.black12,
borderStrokeWidth: 2
);
},
),
FeatureLayerOptions(
"https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",
"point",
render:(dynamic attributes){
// You can render by attribute
return PointOptions(
width: 30.0,
height: 30.0,
builder: const Icon(Icons.pin_drop),
);
},
onTap: (attributes, LatLng location) {
print(attributes);
},
),
FeatureLayerOptions(
"https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Denver_Streets_Centerline/FeatureServer/0",
"polyline",
render:(dynamic attributes){
// You can render by attribute
return PolygonLineOptions(
borderColor: Colors.red,
color: Colors.red,
borderStrokeWidth: 2
);
},
onTap: (attributes, LatLng location) {
print(attributes);
},
// FeatureLayer(FeatureLayerOptions("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Congressional_Districts/FeatureServer/0",
// "polygon",
// onTap: (dynamic attributes, LatLng location) {
// print(attributes);
// },
// render: (dynamic attributes){
// return PolygonOptions(
// borderColor: Colors.red,
// color: Colors.black45,
// borderStrokeWidth: 2,
// isFilled:true
// );
// },
// ),)
FeatureLayer(
FeatureLayerOptions(
"https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",
"point",
render:(dynamic attributes){
// You can render by attribute
return PointOptions(
width: 30.0,
height: 30.0,
builder: const Icon(Icons.pin_drop),
);
},
onTap: (attributes, LatLng location) {
print(attributes);
},
)
),
// FeatureLayer(FeatureLayerOptions(
// "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Denver_Streets_Centerline/FeatureServer/0",
// "polyline",
// render:(dynamic attributes){
// // You can render by attribute
// return PolygonLineOptions(
// borderColor: Colors.red,
// color: Colors.red,
// borderStrokeWidth: 2
// );
// },
// onTap: (attributes, LatLng location) {
// print(attributes);
// },
// ))
],
),
Expand All @@ -119,6 +121,8 @@ class _MyAppState extends State<MyApp> {
);
}
}
```

### Run the example
Expand Down
24 changes: 22 additions & 2 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 27321ebbad34b0a3fafe99fac037102196d655ff
channel: stable
revision: "b0366e0a3f089e15fd89c97604ab402fe26b724c"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c
base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c
- platform: ios
create_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c
base_revision: b0366e0a3f089e15fd89c97604ab402fe26b724c

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
28 changes: 28 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
3 changes: 3 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_map_arcgis: 77120a3ecdc4c415923de1ed9ccb43a064e7da34

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3

0 comments on commit b4236c8

Please sign in to comment.