Module: Geos::GoogleMaps::ApiCommon::UrlValueBounds
- Included in:
- Geos::GoogleMaps::Api2::GeometryCollection, Geos::GoogleMaps::Api2::LineString, Geos::GoogleMaps::Api2::Polygon, Geos::GoogleMaps::Api3::GeometryCollection, Geos::GoogleMaps::Api3::LineString, Geos::GoogleMaps::Api3::Polygon
- Defined in:
- lib/geos/google_maps/api_common.rb
Instance Method Summary collapse
-
#to_g_url_value(precision = 6) ⇒ Object
(also: #to_g_url_value_bounds)
Spit out Google’s toUrlValue format.
-
#to_g_url_value_point(precision = 6) ⇒ Object
Force to Google’s toUrlValue as a point.
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 |