Class: Google::Apis::VectortileV1::TileCoordinates

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

Global tile coordinates. Global tile coordinates reference a specific tile on the map at a specific zoom level. The origin of this coordinate system is always at the northwest corner of the map, with x values increasing from west to east and y values increasing from north to south. Tiles are indexed using x, y coordinates from that origin. The zoom level containing the entire world in a tile is 0, and it increases as you zoom in. Zoom level n + 1 will contain 4 times as many tiles as zoom level n. The zoom level controls the level of detail of the data that is returned. In particular, this affects the set of feature types returned, their density, and geometry simplification. The exact tile contents may change over time, but care will be taken to keep supporting the most important use cases. For example, zoom level 15 shows roads for orientation and planning in the local neighborhood and zoom level 17 shows buildings to give users on foot a sense of situational awareness.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TileCoordinates

Returns a new instance of TileCoordinates.



756
757
758
# File 'generated/google/apis/vectortile_v1/classes.rb', line 756

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

Instance Attribute Details

#xFixnum

Required. The x coordinate. Corresponds to the JSON property x

Returns:

  • (Fixnum)


744
745
746
# File 'generated/google/apis/vectortile_v1/classes.rb', line 744

def x
  @x
end

#yFixnum

Required. The y coordinate. Corresponds to the JSON property y

Returns:

  • (Fixnum)


749
750
751
# File 'generated/google/apis/vectortile_v1/classes.rb', line 749

def y
  @y
end

#zoomFixnum

Required. The Google Maps API zoom level. Corresponds to the JSON property zoom

Returns:

  • (Fixnum)


754
755
756
# File 'generated/google/apis/vectortile_v1/classes.rb', line 754

def zoom
  @zoom
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



761
762
763
764
765
# File 'generated/google/apis/vectortile_v1/classes.rb', line 761

def update!(**args)
  @x = args[:x] if args.key?(:x)
  @y = args[:y] if args.key?(:y)
  @zoom = args[:zoom] if args.key?(:zoom)
end