vectortile

package
v0.0.0-...-ff3b5ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package vectortile provides access to the Semantic Tile API.

For product documentation, see: https://developers.google.com/maps/contact-sales/

Creating a client

Usage example:

import "google.golang.org/api/vectortile/v1"
...
ctx := context.Background()
vectortileService, err := vectortile.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

vectortileService, err := vectortile.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
vectortileService, err := vectortile.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	// BasemapZOrder: The z-order of this geometry when rendered on a flat
	// basemap. Geometry with a lower z-order should be rendered beneath
	// geometry 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. Unlike Area.z_order this can be
	// used to compare with Line.basemap_z_order, and in fact may yield more
	// accurate rendering (where a line may be rendered beneath an area).
	BasemapZOrder *BasemapZOrder `json:"basemapZOrder,omitempty"`

	// HasExternalEdges: True if the polygon is not entirely internal to the
	// feature that it belongs to: that is, some of the edges are bordering
	// another feature.
	HasExternalEdges bool `json:"hasExternalEdges,omitempty"`

	// InternalEdges: When has_external_edges is true, the polygon has some
	// edges that border another feature. This field indicates the internal
	// edges that do not border another feature. Each value is an index into
	// the vertices array, and denotes the start vertex of the internal edge
	// (the next vertex in the boundary loop is the end of the edge). If the
	// selected vertex is the last vertex in the boundary loop, then the
	// edge between that vertex and the starting vertex of the loop is
	// internal. This field may be used for styling. For example, building
	// parapets could be placed only on the external edges of a building
	// polygon, or water could be lighter colored near the external edges of
	// a body of water. If has_external_edges is false, all edges are
	// internal and this field will be empty.
	InternalEdges []int64 `json:"internalEdges,omitempty"`

	// LoopBreaks: Identifies the boundary loops of the polygon. Only set
	// for INDEXED_TRIANGLE polygons. Each value is an index into the
	// vertices array indicating the beginning of a loop. For instance,
	// values of [2, 5] would indicate loop_data contained 3 loops with
	// indices 0-1, 2-4, and 5-end. This may be used in conjunction with the
	// internal_edges field for styling polygon boundaries. Note that an
	// edge may be on a polygon boundary but still internal to the feature.
	// For example, a feature split across multiple tiles will have an
	// internal polygon boundary edge along the edge of the tile.
	LoopBreaks []int64 `json:"loopBreaks,omitempty"`

	// TriangleIndices: When the polygon encoding is of type
	// INDEXED_TRIANGLES, this contains the indices of the triangle vertices
	// in the vertex_offsets field. There are 3 vertex indices per triangle.
	TriangleIndices []int64 `json:"triangleIndices,omitempty"`

	// Type: The polygon encoding type used for this area.
	//
	// Possible values:
	//   "TRIANGLE_FAN" - The first vertex in vertex_offset is the center of
	// a triangle fan. The other vertices are arranged around this vertex in
	// a fan shape. The following diagram showes a triangle fan polygon with
	// the vertices labelled with their indices in the vertex_offset list.
	// Triangle fan polygons always have a single boundary loop. Vertices
	// may be in either a clockwise or counterclockwise order. (1) / \ / \ /
	// \ (0)-----(2) / \ / / \ / / \ / (4)-----(3)
	//   "INDEXED_TRIANGLES" - The polygon is a set of triangles with three
	// vertex indices per triangle. The vertex indices can be found in the
	// triangle_indices field. Indexed triangle polygons also contain
	// information about boundary loops. These identify the loops at the
	// boundary of the polygon and may be used in conjunction with the
	// internal_edges field for styling. Boundary loops may represent either
	// a hole or a disconnected component of the polygon. The following
	// diagram shows an indexed triangle polygon with two boundary loops.
	// (0) (4) / \ / \ / \ / \ (1)----(2) (3)----(5)
	//   "TRIANGLE_STRIP" - A strip of triangles, where each triangle uses
	// the last edge of the previous triangle. Vertices may be in either a
	// clockwise or counterclockwise order. Only polygons without the
	// has_external_edges flag set will use triangle strips. (0) / \ / \ / \
	// (2)-----(1) / \ / / \ / / \ / (4)-----(3)
	Type string `json:"type,omitempty"`

	// VertexOffsets: The vertices present in the polygon defining the area.
	VertexOffsets *Vertex2DList `json:"vertexOffsets,omitempty"`

	// ZOrder: The z-ordering of this area. Areas with a lower z-order
	// should be rendered beneath areas with a higher z-order. This
	// z-ordering does not imply anything about the altitude of the line
	// relative to the ground, but it can be used to prevent z-fighting
	// during rendering on the client. This z-ordering can only be used to
	// compare areas, and cannot be compared with the z_order field in the
	// Line message. The z-order may be negative or zero. Prefer
	// Area.basemap_z_order.
	ZOrder int64 `json:"zOrder,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BasemapZOrder") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BasemapZOrder") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Area: Represents an area. Used to represent regions such as water, parks, etc. Next ID: 10

func (*Area) MarshalJSON

func (s *Area) MarshalJSON() ([]byte, error)

type BasemapZOrder

type BasemapZOrder struct {
	// ZGrade: The second most significant component of the ordering of a
	// component to be rendered onto the basemap.
	ZGrade int64 `json:"zGrade,omitempty"`

	// ZPlane: The most significant component of the ordering of a component
	// to be rendered onto the basemap.
	ZPlane int64 `json:"zPlane,omitempty"`

	// ZWithinGrade: The least significant component of the ordering of a
	// component to be rendered onto the basemap.
	ZWithinGrade int64 `json:"zWithinGrade,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ZGrade") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ZGrade") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

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.

func (*BasemapZOrder) MarshalJSON

func (s *BasemapZOrder) MarshalJSON() ([]byte, error)

type ExtrudedArea

type ExtrudedArea struct {
	// Area: The area representing the footprint of the extruded area.
	Area *Area `json:"area,omitempty"`

	// MaxZ: The z-value in local tile coordinates where the extruded area
	// ends.
	MaxZ int64 `json:"maxZ,omitempty"`

	// MinZ: The z-value in local tile coordinates where the extruded area
	// begins. This is non-zero for extruded areas that begin off the
	// ground. For example, a building with a skybridge may have an extruded
	// area component with a non-zero min_z.
	MinZ int64 `json:"minZ,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Area") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Area") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ExtrudedArea: Represents a height-extruded area: a 3D prism with a constant X-Y plane cross section. Used to represent extruded buildings. A single building may consist of several extruded areas. The min_z and max_z fields are scaled to the size of the tile. An extruded area with a max_z value of 4096 has the same height as the width of the tile that it is on.

func (*ExtrudedArea) MarshalJSON

func (s *ExtrudedArea) MarshalJSON() ([]byte, error)

type Feature

type Feature struct {
	// DisplayName: The localized name of this feature. Currently only
	// returned for roads.
	DisplayName string `json:"displayName,omitempty"`

	// Geometry: The geometry of this feature, representing the space that
	// it occupies in the world.
	Geometry *Geometry `json:"geometry,omitempty"`

	// PlaceId: Place ID of this feature, suitable for use in Places API
	// details requests.
	PlaceId string `json:"placeId,omitempty"`

	// Relations: Relations to other features.
	Relations []*Relation `json:"relations,omitempty"`

	// SegmentInfo: Metadata for features with the SEGMENT FeatureType.
	SegmentInfo *SegmentInfo `json:"segmentInfo,omitempty"`

	// Type: The type of this feature.
	//
	// Possible values:
	//   "FEATURE_TYPE_UNSPECIFIED" - Unknown feature type.
	//   "STRUCTURE" - Structures such as buildings and bridges.
	//   "BAR" - A business serving alcoholic drinks to be consumed onsite.
	//   "BANK" - A financial institution that offers services to the
	// general public.
	//   "LODGING" - A place that provides any type of lodging for
	// travelers.
	//   "CAFE" - A business that sells coffee, tea, and sometimes small
	// meals.
	//   "RESTAURANT" - A business that prepares meals on-site for service
	// to customers.
	//   "EVENT_VENUE" - A venue for private and public events.
	//   "TOURIST_DESTINATION" - Place of interest to tourists, typically
	// for natural or cultural value.
	//   "SHOPPING" - A structure containing a business or businesses that
	// sell goods.
	//   "SCHOOL" - Institution where young people receive general (not
	// vocation or professional) education.
	//   "SEGMENT" - Segments such as roads and train lines.
	//   "ROAD" - A way leading from one place to another intended for use
	// by vehicles.
	//   "LOCAL_ROAD" - A small city street, typically for travel in a
	// residential neighborhood.
	//   "ARTERIAL_ROAD" - Major through road that's expected to carry large
	// volumes of traffic.
	//   "HIGHWAY" - A major road including freeways and state highways.
	//   "CONTROLLED_ACCESS_HIGHWAY" - A highway with grade-separated
	// crossings that is accessed exclusively by ramps. These are usually
	// called "freeways" or "motorways". The enable_detailed_highway_types
	// request flag must be set in order for this type to be returned.
	//   "FOOTPATH" - A path that's primarily intended for use by
	// pedestrians and/or cyclists.
	//   "RAIL" - Tracks intended for use by trains.
	//   "FERRY" - Services which are part of the road network but are not
	// roads.
	//   "REGION" - Non-water areas such as parks and forest.
	//   "PARK" - Outdoor areas such as parks and botanical gardens.
	//   "BEACH" - A pebbly or sandy shore along the edge of a sea or lake.
	//   "FOREST" - Area of land covered by trees.
	//   "POLITICAL" - Political entities, such as provinces and districts.
	//   "ADMINISTRATIVE_AREA1" - Top-level divisions within a country, such
	// as prefectures or states.
	//   "LOCALITY" - Cities, towns, and other municipalities.
	//   "SUBLOCALITY" - Divisions within a locality like a borough or ward.
	//   "WATER" - Water features such as rivers and lakes.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DisplayName") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Feature: A feature representing a single geographic entity.

func (*Feature) MarshalJSON

func (s *Feature) MarshalJSON() ([]byte, error)

type FeatureTile

type FeatureTile struct {
	// Coordinates: The global tile coordinates that uniquely identify this
	// tile.
	Coordinates *TileCoordinates `json:"coordinates,omitempty"`

	// Features: Features present on this map tile.
	Features []*Feature `json:"features,omitempty"`

	// Name: Resource name of the tile. The tile resource name is prefixed
	// by its collection ID `tiles/` followed by the resource ID, which
	// encodes the tile's global x and y coordinates and zoom level as
	// `@,,z`. For example, `tiles/@1,2,3z`.
	Name string `json:"name,omitempty"`

	// Providers: Data providers for the data contained in this tile.
	Providers []*ProviderInfo `json:"providers,omitempty"`

	// Status: Tile response status code to support tile caching.
	//
	// Possible values:
	//   "STATUS_OK" - Everything worked out OK. The cache-control header
	// determines how long this Tile response may be cached by the client.
	// See also version_id and STATUS_OK_DATA_UNCHANGED.
	//   "STATUS_OK_DATA_UNCHANGED" - Indicates that the request was
	// processed successfully and that the tile data that would have been
	// returned are identical to the data already in the client's cache, as
	// specified by the value of client_tile_version_id contained in
	// GetFeatureTileRequest. In particular, the tile's features and
	// providers will not be populated when the tile data is identical.
	// However, the cache-control header and version_id can still change
	// even when the tile contents itself does not, so clients should always
	// use the most recent values returned by the API.
	Status string `json:"status,omitempty"`

	// VersionId: An opaque value, usually less than 30 characters, that
	// contains version info about this tile and the data that was used to
	// generate it. The client should store this value in its tile cache and
	// pass it back to the API in the client_tile_version_id field of
	// subsequent tile requests in order to enable the API to detect when
	// the new tile would be the same as the one the client already has in
	// its cache. Also see STATUS_OK_DATA_UNCHANGED.
	VersionId string `json:"versionId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Coordinates") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Coordinates") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

FeatureTile: A tile containing information about the map features located in the region it covers.

func (*FeatureTile) MarshalJSON

func (s *FeatureTile) MarshalJSON() ([]byte, error)

type FeaturetilesGetCall

type FeaturetilesGetCall struct {
	// contains filtered or unexported fields
}

func (*FeaturetilesGetCall) AlwaysIncludeBuildingFootprints

func (c *FeaturetilesGetCall) AlwaysIncludeBuildingFootprints(alwaysIncludeBuildingFootprints bool) *FeaturetilesGetCall

AlwaysIncludeBuildingFootprints sets the optional parameter "alwaysIncludeBuildingFootprints": Flag indicating whether the returned tile will always contain 2.5D footprints for structures. If enabled_modeled_volumes is set, this will mean that structures will have both their 3D models and 2.5D footprints returned.

func (*FeaturetilesGetCall) ClientInfoApiClient

func (c *FeaturetilesGetCall) ClientInfoApiClient(clientInfoApiClient string) *FeaturetilesGetCall

ClientInfoApiClient sets the optional parameter "clientInfo.apiClient": API client name and version. For example, the SDK calling the API. The exact format is up to the client.

func (*FeaturetilesGetCall) ClientInfoApplicationId

func (c *FeaturetilesGetCall) ClientInfoApplicationId(clientInfoApplicationId string) *FeaturetilesGetCall

ClientInfoApplicationId sets the optional parameter "clientInfo.applicationId": Application ID, such as the package name on Android and the bundle identifier on iOS platforms.

func (*FeaturetilesGetCall) ClientInfoApplicationVersion

func (c *FeaturetilesGetCall) ClientInfoApplicationVersion(clientInfoApplicationVersion string) *FeaturetilesGetCall

ClientInfoApplicationVersion sets the optional parameter "clientInfo.applicationVersion": Application version number, such as "1.2.3". The exact format is application-dependent.

func (*FeaturetilesGetCall) ClientInfoDeviceModel

func (c *FeaturetilesGetCall) ClientInfoDeviceModel(clientInfoDeviceModel string) *FeaturetilesGetCall

ClientInfoDeviceModel sets the optional parameter "clientInfo.deviceModel": Device model as reported by the device. The exact format is platform-dependent.

func (*FeaturetilesGetCall) ClientInfoOperatingSystem

func (c *FeaturetilesGetCall) ClientInfoOperatingSystem(clientInfoOperatingSystem string) *FeaturetilesGetCall

ClientInfoOperatingSystem sets the optional parameter "clientInfo.operatingSystem": Operating system name and version as reported by the OS. For example, "Mac OS X 10.10.4". The exact format is platform-dependent.

func (*FeaturetilesGetCall) ClientInfoPlatform

func (c *FeaturetilesGetCall) ClientInfoPlatform(clientInfoPlatform string) *FeaturetilesGetCall

ClientInfoPlatform sets the optional parameter "clientInfo.platform": Platform where the application is running.

Possible values:

"PLATFORM_UNSPECIFIED" - Unspecified or unknown OS.
"EDITOR" - Development environment.
"MAC_OS" - macOS.
"WINDOWS" - Windows.
"LINUX" - Linux
"ANDROID" - Android
"IOS" - iOS
"WEB_GL" - WebGL.

func (*FeaturetilesGetCall) ClientInfoUserId

func (c *FeaturetilesGetCall) ClientInfoUserId(clientInfoUserId string) *FeaturetilesGetCall

ClientInfoUserId sets the optional parameter "clientInfo.userId": Required. A client-generated user ID. The ID should be generated and persisted during the first user session or whenever a pre-existing ID is not found. The exact format is up to the client. This must be non-empty in a GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.client_info).

func (*FeaturetilesGetCall) ClientTileVersionId

func (c *FeaturetilesGetCall) ClientTileVersionId(clientTileVersionId string) *FeaturetilesGetCall

ClientTileVersionId sets the optional parameter "clientTileVersionId": Optional version id identifying the tile that is already in the client's cache. This field should be populated with the most recent version_id value returned by the API for the requested tile. If the version id is empty the server always returns a newly rendered tile. If it is provided the server checks if the tile contents would be identical to one that's already on the client, and if so, returns a stripped-down response tile with STATUS_OK_DATA_UNCHANGED instead.

func (*FeaturetilesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FeaturetilesGetCall) Do

Do executes the "vectortile.featuretiles.get" call. Exactly one of *FeatureTile or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *FeatureTile.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FeaturetilesGetCall) EnableDetailedHighwayTypes

func (c *FeaturetilesGetCall) EnableDetailedHighwayTypes(enableDetailedHighwayTypes bool) *FeaturetilesGetCall

EnableDetailedHighwayTypes sets the optional parameter "enableDetailedHighwayTypes": Flag indicating whether detailed highway types should be returned. If this is set, the CONTROLLED_ACCESS_HIGHWAY type may be returned. If not, then these highways will have the generic HIGHWAY type. This exists for backwards compatibility reasons.

func (*FeaturetilesGetCall) EnableFeatureNames

func (c *FeaturetilesGetCall) EnableFeatureNames(enableFeatureNames bool) *FeaturetilesGetCall

EnableFeatureNames sets the optional parameter "enableFeatureNames": Flag indicating whether human-readable names should be returned for features. If this is set, the display_name field on the feature will be filled out.

func (*FeaturetilesGetCall) EnableModeledVolumes

func (c *FeaturetilesGetCall) EnableModeledVolumes(enableModeledVolumes bool) *FeaturetilesGetCall

EnableModeledVolumes sets the optional parameter "enableModeledVolumes": Flag indicating whether 3D building models should be enabled. If this is set structures will be returned as 3D modeled volumes rather than 2.5D extruded areas where possible.

func (*FeaturetilesGetCall) EnablePoliticalFeatures

func (c *FeaturetilesGetCall) EnablePoliticalFeatures(enablePoliticalFeatures bool) *FeaturetilesGetCall

EnablePoliticalFeatures sets the optional parameter "enablePoliticalFeatures": Flag indicating whether political features should be returned.

func (*FeaturetilesGetCall) EnablePrivateRoads

func (c *FeaturetilesGetCall) EnablePrivateRoads(enablePrivateRoads bool) *FeaturetilesGetCall

EnablePrivateRoads sets the optional parameter "enablePrivateRoads": Flag indicating whether the returned tile will contain road features that are marked private. Private roads are indicated by the Feature.segment_info.road_info.is_private field.

func (*FeaturetilesGetCall) EnableUnclippedBuildings

func (c *FeaturetilesGetCall) EnableUnclippedBuildings(enableUnclippedBuildings bool) *FeaturetilesGetCall

EnableUnclippedBuildings sets the optional parameter "enableUnclippedBuildings": Flag indicating whether unclipped buildings should be returned. If this is set, building render ops will extend beyond the tile boundary. Buildings will only be returned on the tile that contains their centroid.

func (*FeaturetilesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*FeaturetilesGetCall) Header

func (c *FeaturetilesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*FeaturetilesGetCall) IfNoneMatch

func (c *FeaturetilesGetCall) IfNoneMatch(entityTag string) *FeaturetilesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*FeaturetilesGetCall) LanguageCode

func (c *FeaturetilesGetCall) LanguageCode(languageCode string) *FeaturetilesGetCall

LanguageCode sets the optional parameter "languageCode": Required. The BCP-47 language code corresponding to the language in which the name was requested, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

func (*FeaturetilesGetCall) RegionCode

func (c *FeaturetilesGetCall) RegionCode(regionCode string) *FeaturetilesGetCall

RegionCode sets the optional parameter "regionCode": Required. The Unicode country/region code (CLDR) of the location from which the request is coming from, such as "US" and "419". For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.

type FeaturetilesService

type FeaturetilesService struct {
	// contains filtered or unexported fields
}

func NewFeaturetilesService

func NewFeaturetilesService(s *Service) *FeaturetilesService

func (*FeaturetilesService) Get

Get: Gets a feature tile by its tile resource name.

  • name: Resource name of the tile. The tile resource name is prefixed by its collection ID `tiles/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `tiles/@1,2,3z`.

type FirstDerivativeElevationGrid

type FirstDerivativeElevationGrid struct {
	// AltitudeMultiplier: A multiplier applied to the altitude fields below
	// to extract the actual altitudes in meters from the elevation grid.
	AltitudeMultiplier float64 `json:"altitudeMultiplier,omitempty"`

	// Rows: Rows of points containing altitude data making up the elevation
	// grid. Each row is the same length. Rows are ordered from north to
	// south. E.g: rows[0] is the north-most row, and rows[n] is the
	// south-most row.
	Rows []*Row `json:"rows,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltitudeMultiplier")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltitudeMultiplier") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

FirstDerivativeElevationGrid: A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0].a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs between them as integers at some requested level of precision to take advantage of integer packing. The actual altitude values a[] can be reconstructed using the scale and each row's first_altitude and altitude_diff fields. More details in go/elevation-encoding-options-for-enduro under "Recommended implementation".

func (*FirstDerivativeElevationGrid) MarshalJSON

func (s *FirstDerivativeElevationGrid) MarshalJSON() ([]byte, error)

func (*FirstDerivativeElevationGrid) UnmarshalJSON

func (s *FirstDerivativeElevationGrid) UnmarshalJSON(data []byte) error

type Geometry

type Geometry struct {
	// Areas: The areas present in this geometry.
	Areas []*Area `json:"areas,omitempty"`

	// ExtrudedAreas: The extruded areas present in this geometry. Not
	// populated if modeled_volumes are included in this geometry unless
	// always_include_building_footprints is set in GetFeatureTileRequest,
	// in which case the client should decide which (extruded areas or
	// modeled volumes) should be used (they should not be rendered
	// together).
	ExtrudedAreas []*ExtrudedArea `json:"extrudedAreas,omitempty"`

	// Lines: The lines present in this geometry.
	Lines []*Line `json:"lines,omitempty"`

	// ModeledVolumes: The modeled volumes present in this geometry. Not
	// populated unless enable_modeled_volumes has been set in
	// GetFeatureTileRequest.
	ModeledVolumes []*ModeledVolume `json:"modeledVolumes,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Areas") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Areas") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

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.

func (*Geometry) MarshalJSON

func (s *Geometry) MarshalJSON() ([]byte, error)

type Line

type Line struct {
	// BasemapZOrder: The z-order of this geometry when rendered on a flat
	// basemap. Geometry with a lower z-order should be rendered beneath
	// geometry 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. Unlike Line.z_order this can be
	// used to compare with Area.basemap_z_order, and in fact may yield more
	// accurate rendering (where a line may be rendered beneath an area).
	BasemapZOrder *BasemapZOrder `json:"basemapZOrder,omitempty"`

	// VertexOffsets: The vertices present in the polyline.
	VertexOffsets *Vertex2DList `json:"vertexOffsets,omitempty"`

	// ZOrder: 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.
	ZOrder int64 `json:"zOrder,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BasemapZOrder") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BasemapZOrder") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

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

func (*Line) MarshalJSON

func (s *Line) MarshalJSON() ([]byte, error)

type ModeledVolume

type ModeledVolume struct {
	// Strips: The triangle strips present in this mesh.
	Strips []*TriangleStrip `json:"strips,omitempty"`

	// VertexOffsets: The vertices present in the mesh defining the modeled
	// volume.
	VertexOffsets *Vertex3DList `json:"vertexOffsets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Strips") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Strips") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ModeledVolume: Represents a modeled volume in 3D space. Used to represent 3D buildings.

func (*ModeledVolume) MarshalJSON

func (s *ModeledVolume) MarshalJSON() ([]byte, error)

type ProviderInfo

type ProviderInfo struct {
	// Description: Attribution string for this provider. This string is not
	// localized.
	Description string `json:"description,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Description") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ProviderInfo: Information about the data providers that should be included in the attribution string shown by the client.

func (*ProviderInfo) MarshalJSON

func (s *ProviderInfo) MarshalJSON() ([]byte, error)

type Relation

type Relation struct {
	// RelatedFeatureIndex: Zero-based index to look up the related feature
	// from the list of features in the tile.
	RelatedFeatureIndex int64 `json:"relatedFeatureIndex,omitempty"`

	// RelationType: Relation type between the origin feature to the related
	// feature.
	//
	// Possible values:
	//   "RELATION_TYPE_UNSPECIFIED" - Unspecified relation type. Should
	// never happen.
	//   "OCCUPIES" - The origin feature occupies the related feature.
	//   "PRIMARILY_OCCUPIED_BY" - The origin feature is primarily occupied
	// by the related feature.
	RelationType string `json:"relationType,omitempty"`

	// ForceSendFields is a list of field names (e.g. "RelatedFeatureIndex")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "RelatedFeatureIndex") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Relation: Represents a relation to another feature in the tile. For example, a building might be occupied by a given POI. The related feature can be retrieved using the related feature index.

func (*Relation) MarshalJSON

func (s *Relation) MarshalJSON() ([]byte, error)

type RoadInfo

type RoadInfo struct {
	// IsPrivate: Road has signage discouraging or prohibiting use by the
	// general public. E.g., roads with signs that say "Private", or "No
	// trespassing."
	IsPrivate bool `json:"isPrivate,omitempty"`

	// ForceSendFields is a list of field names (e.g. "IsPrivate") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "IsPrivate") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

RoadInfo: Extra metadata relating to roads.

func (*RoadInfo) MarshalJSON

func (s *RoadInfo) MarshalJSON() ([]byte, error)

type Row

type Row struct {
	// AltitudeDiffs: The difference between each successive pair of
	// altitudes, from west to east. The first, westmost point, is just the
	// altitude rather than a diff. The units are specified by the
	// altitude_multiplier parameter above; the value in meters is given by
	// altitude_multiplier * altitude_diffs[n]. The altitude row (in metres
	// above sea level) can be reconstructed with: a[0] = altitude_diffs[0]
	// * altitude_multiplier when n > 0, a[n] = a[n-1] + altitude_diffs[n-1]
	// * altitude_multiplier.
	AltitudeDiffs []int64 `json:"altitudeDiffs,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltitudeDiffs") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltitudeDiffs") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Row: A row of altitude points in the elevation grid, ordered from west to east.

func (*Row) MarshalJSON

func (s *Row) MarshalJSON() ([]byte, error)

type SecondDerivativeElevationGrid

type SecondDerivativeElevationGrid struct {
	// AltitudeMultiplier: A multiplier applied to the elements in the
	// encoded data to extract the actual altitudes in meters.
	AltitudeMultiplier float64 `json:"altitudeMultiplier,omitempty"`

	// ColumnCount: The number of columns included in the encoded elevation
	// data (i.e. the horizontal resolution of the grid).
	ColumnCount int64 `json:"columnCount,omitempty"`

	// EncodedData: A stream of elements each representing a point on the
	// tile running across each row from left to right, top to bottom. There
	// will be precisely horizontal_resolution * vertical_resolution
	// elements in the stream. The elements are not the heights, rather the
	// second order derivative of the values one would expect in a stream of
	// height data. Each element is a varint with the following encoding:
	// ----------------------------------------------------------------------
	// --| | Head Nibble |
	// ----------------------------------------------------------------------
	// --| | Bit 0 | Bit 1 | Bits 2-3 | | Terminator| Sign (1=neg) | Least
	// significant 2 bits of absolute error |
	// ----------------------------------------------------------------------
	// --| | Tail Nibble #1 |
	// ----------------------------------------------------------------------
	// --| | Bit 0 | Bit 1-3 | | Terminator| Least significant 3 bits of
	// absolute error |
	// ----------------------------------------------------------------------
	// --| | ... | Tail Nibble #n |
	// ----------------------------------------------------------------------
	// --| | Bit 0 | Bit 1-3 | | Terminator| Least significant 3 bits of
	// absolute error |
	// ----------------------------------------------------------------------
	// --|
	EncodedData string `json:"encodedData,omitempty"`

	// RowCount: The number of rows included in the encoded elevation data
	// (i.e. the vertical resolution of the grid).
	RowCount int64 `json:"rowCount,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltitudeMultiplier")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltitudeMultiplier") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

SecondDerivativeElevationGrid: A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0].a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs of the diffs between them as integers at some requested level of precision to take advantage of integer packing. Note that the data is packed in such a way that is fast to decode in Unity and that further optimizes wire size.

func (*SecondDerivativeElevationGrid) MarshalJSON

func (s *SecondDerivativeElevationGrid) MarshalJSON() ([]byte, error)

func (*SecondDerivativeElevationGrid) UnmarshalJSON

func (s *SecondDerivativeElevationGrid) UnmarshalJSON(data []byte) error

type SegmentInfo

type SegmentInfo struct {
	// RoadInfo: Metadata for features with the ROAD FeatureType.
	RoadInfo *RoadInfo `json:"roadInfo,omitempty"`

	// ForceSendFields is a list of field names (e.g. "RoadInfo") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "RoadInfo") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SegmentInfo: Extra metadata relating to segments.

func (*SegmentInfo) MarshalJSON

func (s *SegmentInfo) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Featuretiles *FeaturetilesService

	Terraintiles *TerraintilesService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type TerrainTile

type TerrainTile struct {
	// Coordinates: The global tile coordinates that uniquely identify this
	// tile.
	Coordinates *TileCoordinates `json:"coordinates,omitempty"`

	// FirstDerivative: Terrain elevation data encoded as a
	// FirstDerivativeElevationGrid. cs/symbol:FirstDerivativeElevationGrid.
	FirstDerivative *FirstDerivativeElevationGrid `json:"firstDerivative,omitempty"`

	// Name: Resource name of the tile. The tile resource name is prefixed
	// by its collection ID `terrain/` followed by the resource ID, which
	// encodes the tile's global x and y coordinates and zoom level as
	// `@,,z`. For example, `terrain/@1,2,3z`.
	Name string `json:"name,omitempty"`

	// SecondDerivative: Terrain elevation data encoded as a
	// SecondDerivativeElevationGrid.
	// cs/symbol:SecondDerivativeElevationGrid. See go/byte-encoded-terrain
	// for more details.
	SecondDerivative *SecondDerivativeElevationGrid `json:"secondDerivative,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Coordinates") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Coordinates") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TerrainTile: A tile containing information about the terrain located in the region it covers.

func (*TerrainTile) MarshalJSON

func (s *TerrainTile) MarshalJSON() ([]byte, error)

type TerraintilesGetCall

type TerraintilesGetCall struct {
	// contains filtered or unexported fields
}

func (*TerraintilesGetCall) AltitudePrecisionCentimeters

func (c *TerraintilesGetCall) AltitudePrecisionCentimeters(altitudePrecisionCentimeters int64) *TerraintilesGetCall

AltitudePrecisionCentimeters sets the optional parameter "altitudePrecisionCentimeters": The precision of terrain altitudes in centimeters. Possible values: between 1 (cm level precision) and 1,000,000 (10-kilometer level precision).

func (*TerraintilesGetCall) ClientInfoApiClient

func (c *TerraintilesGetCall) ClientInfoApiClient(clientInfoApiClient string) *TerraintilesGetCall

ClientInfoApiClient sets the optional parameter "clientInfo.apiClient": API client name and version. For example, the SDK calling the API. The exact format is up to the client.

func (*TerraintilesGetCall) ClientInfoApplicationId

func (c *TerraintilesGetCall) ClientInfoApplicationId(clientInfoApplicationId string) *TerraintilesGetCall

ClientInfoApplicationId sets the optional parameter "clientInfo.applicationId": Application ID, such as the package name on Android and the bundle identifier on iOS platforms.

func (*TerraintilesGetCall) ClientInfoApplicationVersion

func (c *TerraintilesGetCall) ClientInfoApplicationVersion(clientInfoApplicationVersion string) *TerraintilesGetCall

ClientInfoApplicationVersion sets the optional parameter "clientInfo.applicationVersion": Application version number, such as "1.2.3". The exact format is application-dependent.

func (*TerraintilesGetCall) ClientInfoDeviceModel

func (c *TerraintilesGetCall) ClientInfoDeviceModel(clientInfoDeviceModel string) *TerraintilesGetCall

ClientInfoDeviceModel sets the optional parameter "clientInfo.deviceModel": Device model as reported by the device. The exact format is platform-dependent.

func (*TerraintilesGetCall) ClientInfoOperatingSystem

func (c *TerraintilesGetCall) ClientInfoOperatingSystem(clientInfoOperatingSystem string) *TerraintilesGetCall

ClientInfoOperatingSystem sets the optional parameter "clientInfo.operatingSystem": Operating system name and version as reported by the OS. For example, "Mac OS X 10.10.4". The exact format is platform-dependent.

func (*TerraintilesGetCall) ClientInfoPlatform

func (c *TerraintilesGetCall) ClientInfoPlatform(clientInfoPlatform string) *TerraintilesGetCall

ClientInfoPlatform sets the optional parameter "clientInfo.platform": Platform where the application is running.

Possible values:

"PLATFORM_UNSPECIFIED" - Unspecified or unknown OS.
"EDITOR" - Development environment.
"MAC_OS" - macOS.
"WINDOWS" - Windows.
"LINUX" - Linux
"ANDROID" - Android
"IOS" - iOS
"WEB_GL" - WebGL.

func (*TerraintilesGetCall) ClientInfoUserId

func (c *TerraintilesGetCall) ClientInfoUserId(clientInfoUserId string) *TerraintilesGetCall

ClientInfoUserId sets the optional parameter "clientInfo.userId": Required. A client-generated user ID. The ID should be generated and persisted during the first user session or whenever a pre-existing ID is not found. The exact format is up to the client. This must be non-empty in a GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.client_info).

func (*TerraintilesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TerraintilesGetCall) Do

Do executes the "vectortile.terraintiles.get" call. Exactly one of *TerrainTile or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TerrainTile.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TerraintilesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TerraintilesGetCall) Header

func (c *TerraintilesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*TerraintilesGetCall) IfNoneMatch

func (c *TerraintilesGetCall) IfNoneMatch(entityTag string) *TerraintilesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*TerraintilesGetCall) MaxElevationResolutionCells

func (c *TerraintilesGetCall) MaxElevationResolutionCells(maxElevationResolutionCells int64) *TerraintilesGetCall

MaxElevationResolutionCells sets the optional parameter "maxElevationResolutionCells": The maximum allowed resolution for the returned elevation heightmap. Possible values: between 1 and 1024 (and not less than min_elevation_resolution_cells). Over-sized heightmaps will be non-uniformly down-sampled such that each edge is no longer than this value. Non-uniformity is chosen to maximise the amount of preserved data. For example: Original resolution: 100px (width) * 30px (height) max_elevation_resolution: 30 New resolution: 30px (width) * 30px (height)

func (*TerraintilesGetCall) MinElevationResolutionCells

func (c *TerraintilesGetCall) MinElevationResolutionCells(minElevationResolutionCells int64) *TerraintilesGetCall

MinElevationResolutionCells sets the optional parameter "minElevationResolutionCells": api-linter: core::0131::request-unknown-fields=disabled aip.dev/not-precedent: Maintaining existing request parameter pattern. The minimum allowed resolution for the returned elevation heightmap. Possible values: between 0 and 1024 (and not more than max_elevation_resolution_cells). Zero is supported for backward compatibility. Under-sized heightmaps will be non-uniformly up-sampled such that each edge is no shorter than this value. Non-uniformity is chosen to maximise the amount of preserved data. For example: Original resolution: 30px (width) * 10px (height) min_elevation_resolution: 30 New resolution: 30px (width) * 30px (height)

func (*TerraintilesGetCall) TerrainFormats

func (c *TerraintilesGetCall) TerrainFormats(terrainFormats ...string) *TerraintilesGetCall

TerrainFormats sets the optional parameter "terrainFormats": Terrain formats that the client understands.

Possible values:

"TERRAIN_FORMAT_UNKNOWN" - An unknown or unspecified terrain

format.

"FIRST_DERIVATIVE" - Terrain elevation data encoded as a

FirstDerivativeElevationGrid. .

"SECOND_DERIVATIVE" - Terrain elevation data encoded as a

SecondDerivativeElevationGrid.

type TerraintilesService

type TerraintilesService struct {
	// contains filtered or unexported fields
}

func NewTerraintilesService

func NewTerraintilesService(s *Service) *TerraintilesService

func (*TerraintilesService) Get

Get: Gets a terrain tile by its tile resource name.

  • name: Resource name of the tile. The tile resource name is prefixed by its collection ID `terraintiles/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `terraintiles/@1,2,3z`.

type TileCoordinates

type TileCoordinates struct {
	// X: Required. The x coordinate.
	X int64 `json:"x,omitempty"`

	// Y: Required. The y coordinate.
	Y int64 `json:"y,omitempty"`

	// Zoom: Required. The Google Maps API zoom level.
	Zoom int64 `json:"zoom,omitempty"`

	// ForceSendFields is a list of field names (e.g. "X") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "X") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TileCoordinates: 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.

func (*TileCoordinates) MarshalJSON

func (s *TileCoordinates) MarshalJSON() ([]byte, error)

type TriangleStrip

type TriangleStrip struct {
	// VertexIndices: Index into the vertex_offset array representing the
	// next vertex in the triangle strip.
	VertexIndices []int64 `json:"vertexIndices,omitempty"`

	// ForceSendFields is a list of field names (e.g. "VertexIndices") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "VertexIndices") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TriangleStrip: Represents a strip of triangles. Each triangle uses the last edge of the previous one. The following diagram shows an example of a triangle strip, with each vertex labeled with its index in the vertex_index array. (1)-----(3) / \ / \ / \ / \ / \ / \ (0)-----(2)-----(4) Vertices may be in either clockwise or counter-clockwise order.

func (*TriangleStrip) MarshalJSON

func (s *TriangleStrip) MarshalJSON() ([]byte, error)

type Vertex2DList

type Vertex2DList struct {
	// XOffsets: List of x-offsets in local tile coordinates.
	XOffsets []int64 `json:"xOffsets,omitempty"`

	// YOffsets: List of y-offsets in local tile coordinates.
	YOffsets []int64 `json:"yOffsets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "XOffsets") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "XOffsets") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

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)].

func (*Vertex2DList) MarshalJSON

func (s *Vertex2DList) MarshalJSON() ([]byte, error)

type Vertex3DList

type Vertex3DList struct {
	// XOffsets: List of x-offsets in local tile coordinates.
	XOffsets []int64 `json:"xOffsets,omitempty"`

	// YOffsets: List of y-offsets in local tile coordinates.
	YOffsets []int64 `json:"yOffsets,omitempty"`

	// ZOffsets: List of z-offsets in local tile coordinates.
	ZOffsets []int64 `json:"zOffsets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "XOffsets") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "XOffsets") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Vertex3DList: 3D vertex list used for modeled volumes. Each entry represents an offset from the previous one in local tile coordinates. The first coordinate is offset from (0, 0, 0).

func (*Vertex3DList) MarshalJSON

func (s *Vertex3DList) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL