Dev R
Dev R

Reputation: 1902

Getting different marker colors based on conditions gmaps4rails

I have a case where I want to show the marker in green color if someone is not registered and red color if someone is registered in a city. I have gone through the doc but could not find anything related to it.

How do I go about changing the colors of markers as per my conditions?

Upvotes: 1

Views: 382

Answers (1)

apneadiving
apneadiving

Reputation: 115541

The gem doesn't include marker color styling. I see only one solution:

  • create marker picture for each kind of marker

  • include your logic in gmaps4rails_marker_picture to render the appropriate one

Upvotes: 3

Related Questions