Skip to content

Commit

Permalink
Merge pull request liodali#233 from liodali/0.31.0
Browse files Browse the repository at this point in the history
merge 0.31.0,0.30.1+2, 0.30.1+1,0.30.1,0.30.0
  • Loading branch information
liodali authored Feb 19, 2022
2 parents eb89ea4 + b622da3 commit 03b411f
Show file tree
Hide file tree
Showing 37 changed files with 896 additions and 178 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 0.31.0:
* add drawMultiRoad in iOS side
* fix request permission when map initialized on user location
* add `zommInto` attribute in drawRoadManually method
## 0.30.1+2:
* hotfix for IndexOutOfBounds when put folder of road in overlay of the map before overlay of user location
## 0.30.1+1:
* remove unnecessary assert in inner controller
## 0.30.1:
* fix cast Double to CGFloat
* add extension method to List of GeoPoint to convert to Encoded route String
* add extension to convert Encoded route to List of GeoPoint
## 0.30.0: add draw multi roads and fix bug
* create new method `drawMutliRoad` to draw multiple road in the same time
* create new method `clearAllRoads` to clear all roads in the map
* fix bug when user location marker hidden by polylines
* remove deprecated attribute `image` from `MarkerIcon`, suppose to use `assetMarker`
## 0.29.1+3:
* fix docs
## 0.29.1+2:
Expand Down
66 changes: 60 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# flutter_osm_plugin
![pub](https://img.shields.io/badge/pub-v0.29.1%2B3-orange)
![pub](https://img.shields.io/badge/pub-v0.31.0-orange)


## Platform Support
Expand All @@ -21,6 +21,7 @@
* zoom into regon (Android/iOS)
* draw Road,recuperate information (duration/distance) of the current road (Android/iOS)
* draw Road manually (Android/iOS)
* draw multiple Roads (Android)
* ClickListener on Marker (Android/iOS)
* ClickListener on Map (Android/iOS)
* calculate distance between 2 points
Expand All @@ -40,7 +41,7 @@
Add the following to your `pubspec.yaml` file:

dependencies:
flutter_osm_plugin: ^0.29.1+3
flutter_osm_plugin: ^0.31.0


### Migration to `0.16.0` (Android Only)
Expand Down Expand Up @@ -375,7 +376,60 @@ await controller.drawRoadManually(
await controller.removeLastRoad();
```

<b>18) Change static GeoPoint position </b>
<b>18) draw multiple roads </b>

```dart
final configs = [
MultiRoadConfiguration(
startPoint: GeoPoint(
latitude: 47.4834379430,
longitude: 8.4638911095,
),
destinationPoint: GeoPoint(
latitude: 47.4046149269,
longitude: 8.5046595453,
),
),
MultiRoadConfiguration(
startPoint: GeoPoint(
latitude: 47.4814981476,
longitude: 8.5244329867,
),
destinationPoint: GeoPoint(
latitude: 47.3982152237,
longitude: 8.4129691189,
),
roadOptionConfiguration: MultiRoadOption(
roadColor: Colors.orange,
)),
MultiRoadConfiguration(
startPoint: GeoPoint(
latitude: 47.4519015578,
longitude: 8.4371175094,
),
destinationPoint: GeoPoint(
latitude: 47.4321999727,
longitude: 8.5147623089,
),
),
];
await controller.drawMultipleRoad(
configs,
commonRoadOption: MultiRoadOption(
roadColor: Colors.red,
),
);
```

<b>19) delete all roads </b>

```dart
await controller.clearAllRoads();
```


<b>20) Change static GeoPoint position </b>

> add new staticPoints with empty list of geoPoints (notice: if you add static point without marker,they will get default maker used by plugin)
Expand All @@ -387,7 +441,7 @@ await controller.drawRoadManually(
```dart
await controller.setStaticPosition(List<GeoPoint> geoPoints,String id );
```
<b>19) Change/Add Marker old/new static GeoPoint position </b>
<b>21) Change/Add Marker old/new static GeoPoint position </b>

> add marker of new static point
Expand All @@ -397,13 +451,13 @@ await controller.drawRoadManually(
await controller.setMarkerOfStaticPoint(String id,MarkerIcon markerIcon );
```

<b>20) change orientation of the map</b>
<b>22) change orientation of the map</b>

```dart
await controller.rotateMapCamera(degree);
```

<b>21) Draw Shape in the map </b>
<b>23) Draw Shape in the map </b>

* Circle
```dart
Expand Down
Loading

0 comments on commit 03b411f

Please sign in to comment.