Class: Google::Apis::VectortileV1::Line

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

Represents a 2D polyline. Used to represent segments such as roads, train tracks, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Line

Returns a new instance of Line.



431
432
433
# File 'generated/google/apis/vectortile_v1/classes.rb', line 431

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

Instance Attribute Details

#basemap_z_orderGoogle::Apis::VectortileV1::BasemapZOrder

Metadata necessary to determine the ordering of a particular basemap element relative to others. To render the basemap correctly, sort by z-plane, then z- grade, then z-within-grade. Corresponds to the JSON property basemapZOrder



409
410
411
# File 'generated/google/apis/vectortile_v1/classes.rb', line 409

def basemap_z_order
  @basemap_z_order
end

#vertex_offsetsGoogle::Apis::VectortileV1::Vertex2DList

2D vertex list used for lines and areas. Each entry represents an offset from the previous one in local tile coordinates. The first entry is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)]. Corresponds to the JSON property vertexOffsets



417
418
419
# File 'generated/google/apis/vectortile_v1/classes.rb', line 417

def vertex_offsets
  @vertex_offsets
end

#z_orderFixnum

The z-order of the line. Lines with a lower z-order should be rendered beneath lines with a higher z-order. This z-ordering does not imply anything about the altitude of the area relative to the ground, but it can be used to prevent z- fighting during rendering on the client. In general, larger and more important road features will have a higher z-order line associated with them. This z- ordering can only be used to compare lines, and cannot be compared with the z_order field in the Area message. The z-order may be negative or zero. Prefer Line.basemap_z_order. Corresponds to the JSON property zOrder

Returns:

  • (Fixnum)


429
430
431
# File 'generated/google/apis/vectortile_v1/classes.rb', line 429

def z_order
  @z_order
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



436
437
438
439
440
# File 'generated/google/apis/vectortile_v1/classes.rb', line 436

def update!(**args)
  @basemap_z_order = args[:basemap_z_order] if args.key?(:basemap_z_order)
  @vertex_offsets = args[:vertex_offsets] if args.key?(:vertex_offsets)
  @z_order = args[:z_order] if args.key?(:z_order)
end