Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
Circle with a LatLng as center and radius.
Instance Attribute Summary collapse
-
#center ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair.
-
#radius ⇒ Float
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1Circle
constructor
A new instance of GoogleMapsPlacesV1Circle.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1Circle
Returns a new instance of GoogleMapsPlacesV1Circle.
120 121 122 |
# File 'lib/google/apis/places_v1/classes.rb', line 120 def initialize(**args) update!(**args) end |
Instance Attribute Details
#center ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the WGS84 standard. Values
must be within normalized ranges.
Corresponds to the JSON property center
112 113 114 |
# File 'lib/google/apis/places_v1/classes.rb', line 112 def center @center end |
#radius ⇒ Float
Required. Radius measured in meters. The radius must be within [0.0, 50000.0].
The default radius is 0.0.
Corresponds to the JSON property radius
118 119 120 |
# File 'lib/google/apis/places_v1/classes.rb', line 118 def radius @radius end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
125 126 127 128 |
# File 'lib/google/apis/places_v1/classes.rb', line 125 def update!(**args) @center = args[:center] if args.key?(:center) @radius = args[:radius] if args.key?(:radius) end |