liodali / osm_flutter

OpenStreetMap plugin for flutter
https://pub.dev/packages/flutter_osm_plugin
MIT License
240 stars 98 forks source link

Fix the bug in the drawRoadManually function. #518

Closed spaiki007 closed 6 months ago

spaiki007 commented 7 months ago

When you call this function without roadBorderWidth.

-- Flutter
await controller.drawRoadManually(
  road, 
  RoadOption(
    roadWidth: 10,
    //roadBorderWidth: 0.1,
    roadColor: roadColor,
    zoomInto: false,
  ),
);

then in the function

-- Kotlin
 private fun drawRoadManually(call: MethodCall, result: MethodChannel.Result) {

        ...

        // args["roadBorderWidth"] == null // true
        val roadBorderWidth = (args["roadBorderWidth"] as Double).toFloat()

        ...

Please make roadBorderWidth either mandatory or provide a default value. flutter_osm_plugin: ^1.0.0

The same applies to roadBorderColor: please make it either mandatory or provide a default value.

liodali commented 7 months ago

oh my bad! i will do quick fix

liodali commented 7 months ago

check our new version 1.0.1

spaiki007 commented 7 months ago

Yes, everything works great, but please do the same for roadBorderColor.