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

Highlight particular route of multiple routes in google map #966

Closed mrajeshkrossark closed 5 years ago

mrajeshkrossark commented 5 years ago

I want to hightlight the particular waypoints (route) from multiple waypoints in a google map.

For example in the below image, I want only need the route which is drawn line in red color. How to show/ highlight the certain route?

image

JustFly1984 commented 5 years ago

@mrajeshkrossark As I understand correctly, you can change route color globally for all paths together: https://stackoverflow.com/questions/19022702/how-to-change-the-color-of-route-in-google-maps-v3

There is a new version of this module at npm @react-google-maps/api Please consider to switch.

mrajeshkrossark commented 5 years ago

No, let I will explain clearly. I have multiple routes. So I have view specific route button for every routes. If user selects particular view then all other routes should be hide. Same for every routes. How to achieve this?

On Wed 6 Mar, 2019, 1:28 AM Alexey Lyakhov, notifications@github.com wrote:

@mrajeshkrossark https://github.com/mrajeshkrossark As I understand correctly, you can change route color globally for all paths together: https://stackoverflow.com/questions/19022702/how-to-change-the-color-of-route-in-google-maps-v3

There is a new version of this module at npm @react-google-maps/api Please consider to switch.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tomchentw/react-google-maps/issues/966#issuecomment-469835431, or mute the thread https://github.com/notifications/unsubscribe-auth/AVwzgFGPzyqoyjnnA8QPI4B6cew6zmlVks5vTsx2gaJpZM4bcO7B .

JustFly1984 commented 5 years ago

@mrajeshkrossark In new version of @react-google-maps/api you can make several components, and assign to each renderer its own default color, show al of them by default, and hide those you don't need.

mrajeshkrossark commented 5 years ago

I just managed with the array collection of multiple routes.