diff --git a/CHANGELOG.md b/CHANGELOG.md index f78c06c..4a6e01e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.1 + +* Update document ## 1.0.0 * PUMP flutter_map to 3.0.0 diff --git a/README.md b/README.md index 7445e22..01a3c4f 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,39 @@ dependencies: ```dart return FlutterMap( - mapController: mapController, - options: MapOptions( - center: LatLng(51.509364, -0.128928), - zoom: 9.2, - plugins: [AnimatedMarkerPlugin()]), - layers: [ - TileLayerOptions( - urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png", - ), - AnimatedMarkerLayerOptions( - marker: Marker( - point: LatLng(0, 0), - builder: (context) => FlutterLogo(), + mapController: mapController, + options: MapOptions( + center: LatLng(51.509364, -0.128928), + zoom: 9.2, ), - ), - ], - ); + children: [ + TileLayer( + urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', + ), + if (locationData != null) + AnimatedMarkerLayer( + options: AnimatedMarkerLayerOptions( + duration: Duration( + milliseconds: duration, + ), + marker: Marker( + width: 30, + height: 30, + point: LatLng( + nextSimulateLocation.latitude, + nextSimulateLocation.longitude, + ), + builder: (context) => Center( + child: Transform.rotate( + angle: max(0, locationData.heading ?? 0) * pi / 180, + child: Image.asset( + 'lib/assets/puck.png', + ), + ), + ), + ), + ), + ), + ], + ); ``` \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 923541d..2f52a2c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -82,7 +82,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0" + version: "1.0.1" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 308c099..3637f14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_map_animated_marker description: Animated marker for flutter_mapp -version: 1.0.0 +version: 1.0.1 homepage: https://github.com/ankiimation/flutter_map_animated_marker environment: