Module: Geos::GoogleMaps::ApiCommon::UrlValueBounds

Instance Method Summary collapse

Instance Method Details

#to_g_url_value(precision = 6) ⇒ Object Also known as: to_g_url_value_bounds

Spit out Google’s toUrlValue format.



40
41
42
43
# File 'lib/geos/google_maps/api_common.rb', line 40

def to_g_url_value(precision = 6)
  e = self.envelope
  "#{e.southwest.to_g_url_value(precision)},#{e.northeast.to_g_url_value(precision)}"
end

#to_g_url_value_point(precision = 6) ⇒ Object

Force to Google’s toUrlValue as a point.



47
48
49
# File 'lib/geos/google_maps/api_common.rb', line 47

def to_g_url_value_point(precision = 6)
  self.centroid.to_g_url_value(precision)
end