I want to render the map only on demand(to minimize the loading time), means some link like 'Show Map' should render the map in a specified div. what should i do?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- How do you change the color of the dotted line on
- Eager-loading association count with Arel (Rails 3
- Is there a way to remove IDV Tags from an AIFF fil
相关文章
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
- Rspec controller error expecting <“index”> but
- Rspec controller error expecting <“index”> but
Simply use the 'to_gmaps4rails' method described here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Methods
Basically, do:
This will render only the js necessary to display your assets.
So include gmaps4rails.js and .css (if necessary), and the div to host the map.