Sha256: 923162573442128a0a37b51acc29bc4bfc84eb10c0fc45c04dc4cbcd885629f8

Contents?: true

Size: 1021 Bytes

Versions: 7

Compression:

Stored size: 1021 Bytes

Contents

require 'active_support/configurable'

module GmapCoordinatesPicker

  def self.configure(&block)
    yield @config ||= GmapCoordinatesPicker::Configuration.new
  end

  # Global settings for GmapCoordinatesPicker
  def self.config
    @config
  end

  # need a Class for 3.0
  class Configuration #:nodoc:
    include ActiveSupport::Configurable
    config_accessor :lat_column
    config_accessor :lng_column
    config_accessor :default_coordinates
    config_accessor :map_handler
    config_accessor :zoom_level
    config_accessor :map_container_class
    config_accessor :map_width
    config_accessor :map_height
  end

  configure do |config|
    config.lat_column = :latitude
    config.lng_column = :longitude
    config.default_coordinates = [23.727666666, 90.410550] #Dhaka (my home town) center point :)
    config.map_handler = 'gMapObj'
    config.zoom_level = 10
    config.map_container_class = 'gmap_coordinate_picker_container'
    config.map_width = '600px'
    config.map_height = '400px'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gmap_coordinates_picker-0.0.10 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.0.9 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.0.8 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.0.7 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.1.0 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.0.6 lib/gmap_coordinates_picker/config.rb
gmap_coordinates_picker-0.0.5 lib/gmap_coordinates_picker/config.rb