Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
## [1.0.0] - Initial Release

* Initial release.
- Initial release.

## [1.0.1] - minor changes

* using default values for Polyline creation instead of hardcoded values in Polyline creation callback.
- using default values for Polyline creation instead of hardcoded values in Polyline creation callback.

## [1.0.2] - minor changes

* adding filtering function and updating the version number and dependencies

- adding filtering function and updating the version number and dependencies

## [1.0.3] - minor changes

* update of package description in pubspec.yaml
- update of package description in pubspec.yaml

## [1.0.4] - minor changes

* update of package description in pubspec.yaml
* update to flutter_map 6.0
* adding non-standard circle
- update of package description in pubspec.yaml
- update to flutter_map 6.0
- adding non-standard circle

## [1.0.5] - minor changes

* update of README.md, increasing version to 1.0.5
- update of README.md, increasing version to 1.0.5

## [1.0.6] - minor changes

* dart formatted geojson_parser.dart, changed README.md
- dart formatted geojson_parser.dart, changed README.md

## [1.0.7] - minor changes

* changed dependency for flutter_map to cover versions from 6 to 8 in pubspec.yaml, changed README.md
- changed dependency for flutter_map to cover versions from 6 to 8 in pubspec.yaml, changed README.md

## [1.0.8] - minor changes in text

* changed pubspec.yaml, README.md
- changed pubspec.yaml, README.md

## [1.1.0] - minor changes in text

- changed dependency for flutter_map to 8 in pubspec.yaml, removed `isFilled` attribute from `Polygon`
60 changes: 34 additions & 26 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -49,6 +49,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.8"
dart_earcut:
dependency: transitive
description:
name: dart_earcut
sha256: e485001bfc05dcbc437d7bfb666316182e3522d4c3f9668048e004d0eb2ce43b
url: "https://pub.dev"
source: hosted
version: "1.2.0"
fake_async:
dependency: transitive
description:
Expand All @@ -74,17 +82,17 @@ packages:
dependency: "direct main"
description:
name: flutter_map
sha256: cda8d72135b697f519287258b5294a57ce2f2a5ebf234f0e406aad4dc14c9399
sha256: f7d0379477274f323c3f3bc12d369a2b42eb86d1e7bd2970ae1ea3cff782449a
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "8.1.1"
flutter_map_geojson:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.0.8"
version: "1.1.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -126,26 +134,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -182,18 +190,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.15.0"
mgrs_dart:
dependency: transitive
description:
Expand Down Expand Up @@ -230,7 +238,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
Expand All @@ -243,10 +251,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
Expand All @@ -259,10 +267,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -275,10 +283,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.3"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -307,10 +315,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.3.0"
web:
dependency: transitive
description:
Expand All @@ -328,5 +336,5 @@ packages:
source: hosted
version: "2.0.0"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.13.0"
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.27.0"
8 changes: 3 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
Expand All @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.2+1

environment:
sdk: '>=2.18.4 <3.0.0'
sdk: ">=2.18.4 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand All @@ -32,11 +32,10 @@ dependencies:
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
flutter_map: ^6.0.0
flutter_map: ^8.0.0
flutter_map_geojson:
path: ..

Expand All @@ -56,7 +55,6 @@ dev_dependencies:

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down
25 changes: 7 additions & 18 deletions lib/src/geojson_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ class GeoJsonParser {
/// default [Polygon] border stroke
double? defaultPolygonBorderStroke;

/// default flag if [Polygon] is filled (default is true)
bool? defaultPolygonIsFilled;

/// default [CircleMarker] border color
Color? defaultCircleMarkerColor;

Expand Down Expand Up @@ -114,7 +111,6 @@ class GeoJsonParser {
this.defaultPolygonBorderColor,
this.defaultPolygonFillColor,
this.defaultPolygonBorderStroke,
this.defaultPolygonIsFilled,
this.defaultCircleMarkerColor,
this.defaultCircleMarkerBorderColor,
this.defaultCircleMarkerIsFilled,
Expand Down Expand Up @@ -178,11 +174,6 @@ class GeoJsonParser {
defaultPolygonBorderColor = color;
}

/// set default [Polygon] setting whether polygon is filled
set setDefaultPolygonIsFilled(bool filled) {
defaultPolygonIsFilled = filled;
}

/// main GeoJson parsing function
void parseGeoJson(Map<String, dynamic> g) {
// set default values if they are not specified by constructor
Expand All @@ -191,16 +182,15 @@ class GeoJsonParser {
polyLineCreationCallback ??= createDefaultPolyline;
polygonCreationCallback ??= createDefaultPolygon;
filterFunction ??= defaultFilterFunction;
defaultMarkerColor ??= Colors.red.withOpacity(0.8);
defaultMarkerColor ??= Colors.red.withValues(alpha: 0.8);
defaultMarkerIcon ??= Icons.location_pin;
defaultPolylineColor ??= Colors.blue.withOpacity(0.8);
defaultPolylineColor ??= Colors.blue.withValues(alpha: 0.8);
defaultPolylineStroke ??= 3.0;
defaultPolygonBorderColor ??= Colors.black.withOpacity(0.8);
defaultPolygonFillColor ??= Colors.black.withOpacity(0.1);
defaultPolygonIsFilled ??= true;
defaultPolygonBorderColor ??= Colors.black.withValues(alpha: 0.8);
defaultPolygonFillColor ??= Colors.black.withValues(alpha: 0.1);
defaultPolygonBorderStroke ??= 1.0;
defaultCircleMarkerColor ??= Colors.blue.withOpacity(0.25);
defaultCircleMarkerBorderColor ??= Colors.black.withOpacity(0.8);
defaultCircleMarkerColor ??= Colors.blue.withValues(alpha: 0.25);
defaultCircleMarkerBorderColor ??= Colors.black.withValues(alpha: 0.8);
defaultCircleMarkerIsFilled ??= true;

// loop through the GeoJson Map and parse it
Expand Down Expand Up @@ -393,9 +383,8 @@ class GeoJsonParser {
return Polygon(
points: outerRing,
holePointsList: holesList,
borderColor: defaultPolygonBorderColor!,
color: defaultPolygonFillColor!,
isFilled: defaultPolygonIsFilled!,
borderColor: defaultPolygonBorderColor!,
borderStrokeWidth: defaultPolygonBorderStroke!,
);
}
Expand Down
11 changes: 4 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: flutter_map_geojson
description: This package parses GeoJson formatted spatial data and creates arrays of Flutter Map objects using default or custom defined create functions.
description: This package parses GeoJson formatted spatial data and creates arrays of Flutter Map objects using default or custom defined create functions.
repository: https://github.com/jozes/flutter_map_geojson
issue_tracker: https://github.com/jozes/flutter_map_geojson/issues
version: 1.0.8
version: 1.1.0
homepage: https://github.com/jozes/flutter_map_geojson

environment:
Expand All @@ -12,13 +12,10 @@ environment:
dependencies:
flutter:
sdk: flutter
latlong2: ^0.9.0
flutter_map: ">=6.0.0 <8.0.0"
latlong2: ^0.9.1
flutter_map: ">=8.0.0 <9.0.0"

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0

# The following section is specific to Flutter packages.
flutter: