liodali / osm_flutter

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

drawRoad not calculate/draw in web platfrom correctly #509

Closed blazmahoric closed 8 months ago

blazmahoric commented 8 months ago

On web platform, the drawRoad method not showing or calculating foot road type correctly on some paths. On Android it is ok.

    // not showing or calculating correctly on web platform. It showing only dot.
    await controller.drawRoad(
      GeoPoint(latitude: 46.42481, longitude: 15.90403),
      GeoPoint(latitude: 46.42606, longitude: 15.90409),
      roadType: RoadType.foot,
      roadOption: const RoadOption(
          roadWidth: 15,
          roadColor: Colors.red,
          zoomInto: true,
          roadBorderWidth: 0),
    );

    // bottom coordinates works on both platforms.
    await controller.drawRoad(
      GeoPoint(latitude: 46.42388, longitude: 15.90294),
      GeoPoint(latitude: 46.42374, longitude: 15.90512),
      roadType: RoadType.foot,
      roadOption: const RoadOption(
          roadWidth: 10,
          roadColor: Colors.blueGrey,
          zoomInto: false,
          roadBorderWidth: 0),
    );

It looks like that method always calculating route for roadType.car on web platform. Altrough if we set foot or bike to roadType.

liodali commented 8 months ago

i will check the issue

liodali commented 8 months ago

which version you're currently use ?

blazmahoric commented 8 months ago

which version you're currently use ?

Tested on both, 0.70.4 and 1.0.0-rc.5.

liodali commented 8 months ago

i will fix our dart-osm-routing package thnx for report

liodali commented 8 months ago

i published a new version for rc 1.0.0-rc.6

blazmahoric commented 8 months ago

Thanks!