Sha256: 0db51e405a7010ce8418501ea7f15c4561f6aaa50c5b4ebe29cedde5ed95ac44

Contents?: true

Size: 842 Bytes

Versions: 10

Compression:

Stored size: 842 Bytes

Contents

Coprl::Presenters.define(:google_maps, namespace: :plugins) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :plugin_drawer
  plugin :google_maps
  page_title 'Maps'

  indented_grid do
    unless ENV['GOOGLE_API_KEY']
      headline 'You must define the ENV variable GOOGLE_API_KEY for this to render a map'
      subtitle 'Dev hint: Create an .env file with a `GOOGLE_API_KEY=yourkey` and restart. Goto [Google Using API Keys](https://developers.google.com/maps/documentation/javascript/get-api-key) to create a key.'
    end
    subheading 'Static Maps'
    address = '125 Park Street, Traverse City, MI'
    google_map address: address, height: "300px", width: "400px"  do
      event :click do
        loads "https://www.google.com/maps/place/#{address}"
      end
    end

    attach :code, file: __FILE__
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.11 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.10 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.9 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.8 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.7 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.6 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.5 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.4 app/demo/plugins/google_maps.pom
coprl-3.0.0.beta.3 app/demo/plugins/google_maps.pom