Sha256: 0905845f2834046f122d3dbc5ea79b5732022c0627e86b6ca3d06cfb24d0f784

Contents?: true

Size: 607 Bytes

Versions: 9

Compression:

Stored size: 607 Bytes

Contents

class @Gmaps.Google.Builders.Circle extends Gmaps.Objects.BaseBuilder

  # args:
  #   lat
  #   lng
  #   radius
  # provider options:
  #   https://developers.google.com/maps/documentation/javascript/reference?hl=fr#CircleOptions
  constructor: (@args, @provider_options = {})->
    @before_init()
    @serviceObject = @create_circle()
    @after_init()

  create_circle: ->
    new(@primitives().circle)(@circle_options())

  circle_options: ->
    base_options =
      center:   new(@primitives().latLng)(@args.lat, @args.lng)
      radius:   @args.radius
    _.defaults base_options, @provider_options

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gmaps4rails-2.1.2 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.1.1 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.1.0 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.5 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.4 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.3 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.2 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.1 vendor/assets/javascripts/gmaps/google/builders/circle.coffee
gmaps4rails-2.0.0 vendor/assets/javascripts/gmaps/google/builders/circle.coffee