Closed novito closed 12 years ago
I have checked that doc, and it's this line that I have followed:
<%= gmaps("markers" => { "data" => @markers, "options" => { "marker_picture" => your_pic, "marker_width" => 22, "marker_length" => 32 } }) %>
However, this doesn't make the picture to show up. It defaults to the google maps default one.
Ok, will dig this later. Which version do you use?
1.4.8
On Thu, May 3, 2012 at 4:44 PM, Benjamin Roth < reply@reply.github.com
wrote:
Ok, will dig this later. Which version do you use?
Reply to this email directly or view it on GitHub:
https://github.com/apneadiving/Google-Maps-for-Rails/issues/203#issuecomment-5501320
Joan Roig Arderiu roigarderiu@gmail.com Torrelles de Llobregat (Barcelona) Catalunya
Ok thanks, doc wasn't updated...
Simply do :
<%= gmaps("markers" => { "data" => @markers, "options" => { "picture" => your_pic, "width" => 22, "length" => 32 } }) %>
Sure. Thank you for this awesome gem.
I have a simple application to test this awesome gem and it's as simple as:
https://github.com/novito/maps4rails
When trying to add the picture of the marker in the view, by doing:
<%= gmaps("markers" => {"data" => @markers, "options" => { "marker_picture" => "assets/prova.png"}}) %>
That picture is not rendered. Even though in the source I can see this:
Gmaps.map.markers = [ {"description": "", "title": "", "sidebar": "", "lng": "-122.345467", "lat": "37.568749", "picture": "", "width": "", "height": ""} ]; Gmaps.map.markers_conf.marker_picture = "assets/prova.png";
So, I have tried looking into the code, but I fail to see where is that being set...