Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AddressDescriptorLandmark

Inherits:
Object
  • Object
show all
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

Basic landmark information and the landmark's relationship with the target location. Landmarks are prominent places that can be used to describe a location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1AddressDescriptorLandmark

Returns a new instance of GoogleMapsPlacesV1AddressDescriptorLandmark.



186
187
188
# File 'lib/google/apis/places_v1/classes.rb', line 186

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameGoogle::Apis::PlacesV1::GoogleTypeLocalizedText

Localized variant of a text in a particular language. Corresponds to the JSON property displayName



148
149
150
# File 'lib/google/apis/places_v1/classes.rb', line 148

def display_name
  @display_name
end

#nameString

The landmark's resource name. Corresponds to the JSON property name

Returns:

  • (String)


153
154
155
# File 'lib/google/apis/places_v1/classes.rb', line 153

def name
  @name
end

#place_idString

The landmark's place id. Corresponds to the JSON property placeId

Returns:

  • (String)


158
159
160
# File 'lib/google/apis/places_v1/classes.rb', line 158

def place_id
  @place_id
end

#spatial_relationshipString

Defines the spatial relationship between the target location and the landmark. Corresponds to the JSON property spatialRelationship

Returns:

  • (String)


163
164
165
# File 'lib/google/apis/places_v1/classes.rb', line 163

def spatial_relationship
  @spatial_relationship
end

#straight_line_distance_metersFloat

The straight line distance, in meters, between the center point of the target and the center point of the landmark. In some situations, this value can be longer than travel_distance_meters. Corresponds to the JSON property straightLineDistanceMeters

Returns:

  • (Float)


170
171
172
# File 'lib/google/apis/places_v1/classes.rb', line 170

def straight_line_distance_meters
  @straight_line_distance_meters
end

#travel_distance_metersFloat

The travel distance, in meters, along the road network from the target to the landmark, if known. This value does not take into account the mode of transportation, such as walking, driving, or biking. Corresponds to the JSON property travelDistanceMeters

Returns:

  • (Float)


177
178
179
# File 'lib/google/apis/places_v1/classes.rb', line 177

def travel_distance_meters
  @travel_distance_meters
end

#typesArray<String>

A set of type tags for this landmark. For a complete list of possible values, see https://developers.google.com/maps/documentation/places/web-service/place- types. Corresponds to the JSON property types

Returns:

  • (Array<String>)


184
185
186
# File 'lib/google/apis/places_v1/classes.rb', line 184

def types
  @types
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



191
192
193
194
195
196
197
198
199
# File 'lib/google/apis/places_v1/classes.rb', line 191

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
  @place_id = args[:place_id] if args.key?(:place_id)
  @spatial_relationship = args[:spatial_relationship] if args.key?(:spatial_relationship)
  @straight_line_distance_meters = args[:straight_line_distance_meters] if args.key?(:straight_line_distance_meters)
  @travel_distance_meters = args[:travel_distance_meters] if args.key?(:travel_distance_meters)
  @types = args[:types] if args.key?(:types)
end