Giter VIP home page Giter VIP logo

Comments (3)

DaddyWarbucks avatar DaddyWarbucks commented on September 21, 2024

I can see in this line

that we do take in waypoints from props and pass it to the strategy.

But on this line in the strategy, you can see that we are not using the waypoints (or many other props)

const { origin, destination, travelMode } = data;

Both the nativeStrategy and the fetchStrategy should be updated to handle all of the directions props/options passed to them, unless @bondz has a reason they were not initially implemented. I believe he mentioned that the Directions component was added on later and kind of an "after thought", so its likely they weren't implemented simply for that reason.

I am travelling for the next two weeks. But when I get home I should be able to take a look at this.

@CScott0905 you can currently accomplish this by passing a promise to requestStrategy. Take a look at this line:

pathPromise = requestStrategy(data);

You can then take a look at the native and fetch strategies and see that they are basic calls to the google directions API and you can create your own.

from react-static-google-map.

bondz avatar bondz commented on September 21, 2024

Yes @DaddyWarbucks, it was an oversight. The directions component was a POC to prove that you could render directions async to a path and because the user could implement their own strategy to get the directions, the implementation was not prioritized. Wishing you safe travels @DaddyWarbucks

A workaround is to implement your own strategy @CScott0905 like @DaddyWarbucks showed until all the other props for Directions are handled by the built in strategies.

from react-static-google-map.

CScott0905 avatar CScott0905 commented on September 21, 2024

@DaddyWarbucks @bondz thank you for the quick response I will try the above thank you.

from react-static-google-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.