Comments (3)
I can see in this line
that we do take inwaypoints
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)
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:
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.
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.
@DaddyWarbucks @bondz thank you for the quick response I will try the above thank you.
from react-static-google-map.
Related Issues (20)
- In Direction component "Uncaught ReferenceError: google is not defined" error occur
- 0.9.0 has been published but not to github
- react-hot-loader causing issue in rendering of static map
- .
- Bump and publish new NPM version HOT 2
- Incorrect types in index.d.ts
- Incomplete typing for StaticGoogleMap
- Error while using latest version HOT 2
- Is there any way I can change the color or mode for map? HOT 2
- Issue finding react-promise in 0.5.5
- New Prop Placeholder to make a progressive image HOT 4
- Add progressive image loading example to docs
- Add progressive image loading example to docs HOT 1
- Add a `style` prop to the <img> HOT 7
- Add <StreetViewGoogleMap /> component HOT 4
- export interfaces to be TypeScript friendly
- Why are markers required? HOT 1
- Marker iconURL param potentially not working as expected?
- map_id is not available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-static-google-map.