Closed bbuegler closed 12 years ago
Look here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Markers
Because InfoBox has special process and options, you must have at least in your view:
Gmaps.map.infobox = function(boxText) {
return {
content: boxText
}};
boxText contains the infowindow set in your controller.
firebug mentions: Gmaps.map is undefined, i have tried:
thanks for helping me again after you encouraged me to post here.
put this code under your gmaps call in the view and inside a content_for :scripts
you Sir, are a boss! there's no error anymore. though the content isn't inside the info_window yet
Because I wasn't sure, I redid the example I provide in the wiki and it's working properly.
I guess you've either a problem with the css or with the infoBow options.
damn if you knew how much i could hug you - you'd have an instance resistance to winter-depressions. I thank you soo much. I bow to you holding your breath to type such helpfull stuff.
hey i'm sure it's actually not a bug but i've been hurting my head for days now and couldn't get this straightened out. This is most likely due to me being a bloody noob. So here is my problem:
i've been trying to get a custom infowindow - i'm trying to make my first app on Rails 3.1.0 and Ruby 1.8.7. i've included the <%= yield :scripts %> and skipped the <%= yield :head %> since it's apparently not required in my version. my address is computing
and my custom markers are displayed beautifully. i have put together this little piece of code im my controller to show some content in the infowindow and to customise the markers.
it works fine too and even renders the partial. my problems started when i began modifiying the infowindow by passing the option custom_info_window_class:
<%= gmaps("markers" => {"data" => @json, "options" => { "custom_infowindow_class" => "yellow","randomize" => true, "max_random_distance" => 1000, "clusterer_maxZoom" => 17 }, "map_options" => { "type" => "HYBRID", "auto_adjust" => true,"center_on_stuff" => true }}) %>
it's hard an cruel but at this point my infowindow gets a new class but not the one i'm pasing. Instead it apparently defaults to: infoBox which allows me to do some styling but from this point on there is no content in my infowindow anylonger, besides the little close infowindow x. has anybody a tip for me?