Sha256: 9636670e59c5036588e0bdfcd0e94643fbedd417b2353d4700d7ff63b4d9711d
Contents?: true
Size: 1010 Bytes
Versions: 7
Compression:
Stored size: 1010 Bytes
Contents
# Google Maps Volt Component (still a work in progress) Provides a simple google maps integration. First signup for a google maps api key here: https://developers.google.com/maps/documentation/javascript/tutorial Next put it in your config/app.rb file: config.google_maps_api_key = '....' Add this line to your application's Gemfile: gem 'volt-google-maps' And then execute: bundle Then install the component in the config/dependencies.rb file of any components you want google maps in: component 'google-maps' Lastly, use the google-maps tag: <style> .google-map { height: 400px; width: 600px; } </style> <div class="google-map"> <:google-maps /> </div> The map will take up the width of the div, so we add the style tag. The google-map tag can be passed many attributes: - zoom - integer for different zoom levels - center - the address to center the map on - markers - an array of marker Models (with _address and _content)
Version data entries
7 entries across 7 versions & 1 rubygems