Module: Geos::GoogleMaps::Api2::Point

Defined in:
lib/geos/google_maps/api_2.rb

Instance Method Summary collapse

Instance Method Details

#to_g_lat_lng_api2(options = {}) ⇒ Object

Returns a new GLatLng.



125
126
127
128
129
130
131
132
133
# File 'lib/geos/google_maps/api_2.rb', line 125

def to_g_lat_lng_api2(options = {})
  klass = if options[:short_class]
    'GLatLng'
  else
    'google.maps.LatLng'
  end

  "new #{klass}(#{self.lat}, #{self.lng})"
end

#to_g_point_api2(options = {}) ⇒ Object

Returns a new GPoint



136
137
138
139
140
141
142
143
144
# File 'lib/geos/google_maps/api_2.rb', line 136

def to_g_point_api2(options = {})
  klass = if options[:short_class]
    'GPoint'
  else
    'google.maps.Point'
  end

  "new #{klass}(#{self.x}, #{self.y})"
end