How to add different type of markers in Gmaps4Rails

I need to show two different markers in my Google map. I am using rails 3 and Gmaps4rails gem.

I my controller I have

 @marker1 = User.find(1)
 @marker2 = User.find(2)
 @json = [@marker1,@marker2].to_gmaps4rails

In view file

 <%= gmaps({
        "map_options" => { "zoom" => 12, "auto_adjust" => false, "center_latitude" =>, "center_longitude" => @marker1.lng},
        "markers"     => { "data" => @json }

 <%= yield :scripts %>

The map view I get is

I need to add different marker images for the each of them. How can this be done. please help.


I have simply one answer: it's explained in the wiki, within the Customize each marker section.

There is also some alternative to add the styles in a block from your controller instead of model level.

Need Your Help

Create new ttk widget from tkinter

python tkinter widget ttk

I'm actually trying to create ttk.Spinbox from tkinter.Spinbox. I can manipulate codes below like ttk.Scrollbar pattern. tkinter.Spinbox button gives an old look for my GUI that is why i want to ttk.

What Salt size and position for AES 256?

c# cryptography aes salt

haven't written encryption in a while and have forgotten some stuff.