ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️
492 stars 567 forks source link

Directions Service APIs #1079

Open ghost opened 2 years ago

ghost commented 2 years ago

Feature Request

Add the ability to render directions from point A to point B.

Plugin

Capacitor Google Maps

Description

I want to give users the ability to see the directions from point A to point B rendered on the map. The same thing that Uber or other delivery services do.

Platform(s)

iOS/Android

Preferred Solution

The Map will allow me to render directions for the user. Like https://developers.google.com/maps/documentation/javascript/directions

Alternatives

The regular google maps SDK

Additional Context

ngmiduc commented 1 year ago

Good one!

I used a workaround to render the direction route with a Polyline. Maybe that works for you too?

kyleabens commented 1 year ago

@ngmiduc How did you obtain the route info to then plot on the map? Can you get directions with this plugin or do you need to use the Google Maps API v3 services outside of this plugin to get that info?

ngmiduc commented 12 months ago

@ngmiduc How did you obtain the route info to then plot on the map? Can you get directions with this plugin or do you need to use the Google Maps API v3 services outside of this plugin to get that info?

Yes you will need to use Google Maps API v3 outside this plugin. The Direction API will give you all the coordinates to draw to draw the polyline. The styling looks actually very OK.