No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Small Active Admin plugin for setting up latitude and longitude.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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, openstreetmap.

  • 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.

  • api_key - you can send api key to map. WARNING! This is unsafe method, better use ENV-variable.

  • api_key_env - you can send name of ENV-variable where storing API key for map.

  • default_lat - default latitude for placemark, Moscow latitude by default.

  • default_lng - default longitude for placemark, Moscow longitude by default.

  • map_zoom - default zoom for map, 12 by default.

Example

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

Contributors

Alexey Krylov

License

MIT License. Copyright 2018 Alexey Krylov