mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
259 stars 117 forks source link

Add optional waypoint titles for Apple Maps #160

Closed manafire closed 10 months ago

manafire commented 10 months ago

See #113.

Creates a new Waypoint class that wraps Coords and accepts an optional title. Because the refactor changes waypoints from List<Coord> into List<Waypoint>, this would be a breaking change with how showDirections is called.

Because the Android implementation appears to solely rely on URL construction (via getMapDirectionsUrl), I didn't have to adjust anything there - just the iOS implementation and common dart code.

This will only work for Apple Maps, as Google doesn't support waypoint labels :/

I've never worked with platform-specific plugin code and had to learn Swift (🤯) to figure this out, so please take a look!

I've tested the iOS example as well as the package in my own project for both Apple Maps iOS and Google Maps on Android.

mattermoran commented 10 months ago

Nice one! Will take a look tomorrow :)

mattermoran commented 10 months ago

Thanks for contributing! Will be available in the next release once I sort out other prs :)

mattermoran commented 8 months ago

Available now in v3 :)

manafire commented 8 months ago

Woot! I'm so happy to contribute! Thanks!