Class: Google::Apis::VectortileV1::Feature

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vectortile_v1/classes.rb,
generated/google/apis/vectortile_v1/representations.rb,
generated/google/apis/vectortile_v1/representations.rb

Overview

A feature representing a single geographic entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Feature

Returns a new instance of Feature.



232
233
234
# File 'generated/google/apis/vectortile_v1/classes.rb', line 232

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

Instance Attribute Details

#display_nameString

The localized name of this feature. Currently only returned for roads. Corresponds to the JSON property displayName

Returns:

  • (String)


199
200
201
# File 'generated/google/apis/vectortile_v1/classes.rb', line 199

def display_name
  @display_name
end

#geometryGoogle::Apis::VectortileV1::Geometry

Represents the geometry of a feature, that is, the shape that it has on the map. The local tile coordinate system has the origin at the north-west (upper- left) corner of the tile, and is scaled to 4096 units across each edge. The height (Z) axis has the same scale factor: an extruded area with a max_z value of 4096 has the same height as the width of the tile that it is on. There is no clipping boundary, so it is possible that some coordinates will lie outside the tile boundaries. Corresponds to the JSON property geometry



210
211
212
# File 'generated/google/apis/vectortile_v1/classes.rb', line 210

def geometry
  @geometry
end

#place_idString

Place ID of this feature, suitable for use in Places API details requests. Corresponds to the JSON property placeId

Returns:

  • (String)


215
216
217
# File 'generated/google/apis/vectortile_v1/classes.rb', line 215

def place_id
  @place_id
end

#relationsArray<Google::Apis::VectortileV1::Relation>

Relations to other features. Corresponds to the JSON property relations



220
221
222
# File 'generated/google/apis/vectortile_v1/classes.rb', line 220

def relations
  @relations
end

#segment_infoGoogle::Apis::VectortileV1::SegmentInfo

Extra metadata relating to segments. Corresponds to the JSON property segmentInfo



225
226
227
# File 'generated/google/apis/vectortile_v1/classes.rb', line 225

def segment_info
  @segment_info
end

#typeString

The type of this feature. Corresponds to the JSON property type

Returns:

  • (String)


230
231
232
# File 'generated/google/apis/vectortile_v1/classes.rb', line 230

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



237
238
239
240
241
242
243
244
# File 'generated/google/apis/vectortile_v1/classes.rb', line 237

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @geometry = args[:geometry] if args.key?(:geometry)
  @place_id = args[:place_id] if args.key?(:place_id)
  @relations = args[:relations] if args.key?(:relations)
  @segment_info = args[:segment_info] if args.key?(:segment_info)
  @type = args[:type] if args.key?(:type)
end