ruby on rails - Accessing the Google map object via Gmaps4Rails API -


I have successfully used GMaps4Rails to present markers with a Rail / Mongoid / Spasial model, Generally GMaps4 is getting only incredibly quiet.

However, one thing remains silent behind my mind (though I've got to fix it): In all instances and answers, I have seen the Google Map object through the Gmaps4Rails. Map , such as

  google.maps.event.addListener (Gmaps4Rails.map, 'click', function (object) {warning (object.latLng);});   

(taken from)

However, I never got this job. If I log on to Gmaps4Rails.map in the console, then it is undefined. Gmaps.map object type is Google Maps , so to go to the actual Google Map, I need to type

  google. Event.addListener (Gmaps.map.map, 'click', ...)   

I

  = Provide the map immediately via gmaps I am (: Map_options = & gt; {"detect_location" = & gt; right, "center_on_user" => right, "zoom" => 12})   

The signal will also be appreciated, as I am a harasser that I am doing something wrong.

Update : I should have read

me No questions can be seen here :)

Some things have changed since my 1.0.0 release, so yes, you are searching for dated signals. But you Gmaps.map.map . Received reply using.

  • GIMPS is a namespace that includes all the maps that you can create your own page <

  • You can add another .map (this is a bit annoying but I do not want it < P>

    / html>

  • Comments

    Popular posts from this blog

    mysql - BLOB/TEXT column 'value' used in key specification without a key length -

    c# - Using Vici cool Storage with monodroid -

    python - referencing a variable in another function? -