tomchentw / react-google-maps

React.js Google Maps integration component
https://tomchentw.github.io/react-google-maps/
MIT License
4.62k stars 939 forks source link

How it is possible to move an icon within a Polyline component? #961

Closed peymancyb closed 5 years ago

peymancyb commented 5 years ago

I tried everything but there is no example or documentation description about it

peymancyb commented 5 years ago

I found out the solution, it is possible to change the icon position by using offset property


                    path={this.state.polyLines}
                    geodesic
                    options={{
                        icons: [
                            {
                                icon: MoveSymbol,
                                offset: `${newOffset}%`,
                            }
                        ]
                    }}
                />```