accessd / activeadmin-latlng

Active Admin plugin for setting up latitude and longitude

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ActiveadminLatlng

Build Status Code Climate codecov

Active Admin latitude and longitude plugin

alt tag

Getting started

gem 'activeadmin_latlng'
form do |f|
  f.inputs do
    f.input :lat
    f.input :lng
    f.latlng # add this
  end
  f.actions
end

Settings

  • lang - language, en by default.

  • map - map provider, google by default. Available: google, yandex.

  • id_lat and id_lng - identificator of latitude and longitude inputs. <model_name>_lat and <model_name>_lng by default.

  • height - map height in pixels, 400 by default.

  • loading_map - loading map library. true by default. Set to false, if map loaded in other place.

Example

form do |f|
  f.inputs do
    f.input :lat
    f.input :lng
    f.latlng lang: :ru, map: :yandex, height: 500, loading_map: false
  end
  f.actions
end

Contributors

Alexey Krylov

License

MIT License. Copyright 2017 Alexey Krylov

About

Active Admin plugin for setting up latitude and longitude

License:MIT License


Languages

Language:Ruby 88.3%Language:HTML 8.4%Language:CSS 2.2%Language:JavaScript 1.0%Language:CoffeeScript 0.0%