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

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

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.

[View source]

761
762
763
# File 'lib/google/apis/vectortile_v1/classes.rb', line 761

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

Instance Attribute Details

#xFixnum

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

Returns:

  • (Fixnum)

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

def x
  @x
end

#yFixnum

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

Returns:

  • (Fixnum)

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

def y
  @y
end

#zoomFixnum

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

Returns:

  • (Fixnum)

759
760
761
# File 'lib/google/apis/vectortile_v1/classes.rb', line 759

def zoom
  @zoom
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

766
767
768
769
770
# File 'lib/google/apis/vectortile_v1/classes.rb', line 766

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