...

Package roads

import "google.golang.org/genproto/googleapis/maps/roads/v1op"
Overview
Index

Overview ▾

Index ▾

Variables
func RegisterRoadsServiceServer(s *grpc.Server, srv RoadsServiceServer)
type ListNearestRoadsRequest
    func (*ListNearestRoadsRequest) Descriptor() ([]byte, []int)
    func (x *ListNearestRoadsRequest) GetPoints() string
    func (x *ListNearestRoadsRequest) GetTravelMode() TravelMode
    func (*ListNearestRoadsRequest) ProtoMessage()
    func (x *ListNearestRoadsRequest) ProtoReflect() protoreflect.Message
    func (x *ListNearestRoadsRequest) Reset()
    func (x *ListNearestRoadsRequest) String() string
type ListNearestRoadsResponse
    func (*ListNearestRoadsResponse) Descriptor() ([]byte, []int)
    func (x *ListNearestRoadsResponse) GetSnappedPoints() []*SnappedPoint
    func (*ListNearestRoadsResponse) ProtoMessage()
    func (x *ListNearestRoadsResponse) ProtoReflect() protoreflect.Message
    func (x *ListNearestRoadsResponse) Reset()
    func (x *ListNearestRoadsResponse) String() string
type RoadsServiceClient
    func NewRoadsServiceClient(cc grpc.ClientConnInterface) RoadsServiceClient
type RoadsServiceServer
type SnapToRoadsRequest
    func (*SnapToRoadsRequest) Descriptor() ([]byte, []int)
    func (x *SnapToRoadsRequest) GetAssetId() string
    func (x *SnapToRoadsRequest) GetInterpolate() bool
    func (x *SnapToRoadsRequest) GetPath() string
    func (x *SnapToRoadsRequest) GetTravelMode() TravelMode
    func (*SnapToRoadsRequest) ProtoMessage()
    func (x *SnapToRoadsRequest) ProtoReflect() protoreflect.Message
    func (x *SnapToRoadsRequest) Reset()
    func (x *SnapToRoadsRequest) String() string
type SnapToRoadsResponse
    func (*SnapToRoadsResponse) Descriptor() ([]byte, []int)
    func (x *SnapToRoadsResponse) GetSnappedPoints() []*SnappedPoint
    func (x *SnapToRoadsResponse) GetWarningMessage() string
    func (*SnapToRoadsResponse) ProtoMessage()
    func (x *SnapToRoadsResponse) ProtoReflect() protoreflect.Message
    func (x *SnapToRoadsResponse) Reset()
    func (x *SnapToRoadsResponse) String() string
type SnappedPoint
    func (*SnappedPoint) Descriptor() ([]byte, []int)
    func (x *SnappedPoint) GetLocation() *latlng.LatLng
    func (x *SnappedPoint) GetOriginalIndex() *wrapperspb.UInt32Value
    func (x *SnappedPoint) GetPlaceId() string
    func (*SnappedPoint) ProtoMessage()
    func (x *SnappedPoint) ProtoReflect() protoreflect.Message
    func (x *SnappedPoint) Reset()
    func (x *SnappedPoint) String() string
type TravelMode
    func (TravelMode) Descriptor() protoreflect.EnumDescriptor
    func (x TravelMode) Enum() *TravelMode
    func (TravelMode) EnumDescriptor() ([]byte, []int)
    func (x TravelMode) Number() protoreflect.EnumNumber
    func (x TravelMode) String() string
    func (TravelMode) Type() protoreflect.EnumType
type UnimplementedRoadsServiceServer
    func (*UnimplementedRoadsServiceServer) ListNearestRoads(context.Context, *ListNearestRoadsRequest) (*ListNearestRoadsResponse, error)
    func (*UnimplementedRoadsServiceServer) SnapToRoads(context.Context, *SnapToRoadsRequest) (*SnapToRoadsResponse, error)

Package files

roads.pb.go

Variables

Enum value maps for TravelMode.

var (
    TravelMode_name = map[int32]string{
        0: "TRAVEL_MODE_UNSPECIFIED",
        1: "DRIVING",
        2: "CYCLING",
        3: "WALKING",
    }
    TravelMode_value = map[string]int32{
        "TRAVEL_MODE_UNSPECIFIED": 0,
        "DRIVING":                 1,
        "CYCLING":                 2,
        "WALKING":                 3,
    }
)
var File_google_maps_roads_v1op_roads_proto protoreflect.FileDescriptor

func RegisterRoadsServiceServer

func RegisterRoadsServiceServer(s *grpc.Server, srv RoadsServiceServer)

type ListNearestRoadsRequest

A request to the ListNearestRoads method, requesting that a sequence of points be snapped individually to the road segment that each is closest to.

type ListNearestRoadsRequest struct {

    // The points to be snapped as a series of lat, lng points. Specified as
    // a string of the format: lat,lng|lat,lng|...
    Points string `protobuf:"bytes,1,opt,name=points,proto3" json:"points,omitempty"`
    // The type of travel being tracked. This will constrain the roads we snap to.
    TravelMode TravelMode `protobuf:"varint,2,opt,name=travel_mode,json=travelMode,proto3,enum=google.maps.roads.v1op.TravelMode" json:"travel_mode,omitempty"`
    // contains filtered or unexported fields
}

func (*ListNearestRoadsRequest) Descriptor

func (*ListNearestRoadsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListNearestRoadsRequest.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsRequest) GetPoints

func (x *ListNearestRoadsRequest) GetPoints() string

func (*ListNearestRoadsRequest) GetTravelMode

func (x *ListNearestRoadsRequest) GetTravelMode() TravelMode

func (*ListNearestRoadsRequest) ProtoMessage

func (*ListNearestRoadsRequest) ProtoMessage()

func (*ListNearestRoadsRequest) ProtoReflect

func (x *ListNearestRoadsRequest) ProtoReflect() protoreflect.Message

func (*ListNearestRoadsRequest) Reset

func (x *ListNearestRoadsRequest) Reset()

func (*ListNearestRoadsRequest) String

func (x *ListNearestRoadsRequest) String() string

type ListNearestRoadsResponse

The response from the ListNearestRoads method, returning a list of snapped points.

type ListNearestRoadsResponse struct {

    // A list of snapped points.
    SnappedPoints []*SnappedPoint `protobuf:"bytes,1,rep,name=snapped_points,json=snappedPoints,proto3" json:"snapped_points,omitempty"`
    // contains filtered or unexported fields
}

func (*ListNearestRoadsResponse) Descriptor

func (*ListNearestRoadsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListNearestRoadsResponse.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsResponse) GetSnappedPoints

func (x *ListNearestRoadsResponse) GetSnappedPoints() []*SnappedPoint

func (*ListNearestRoadsResponse) ProtoMessage

func (*ListNearestRoadsResponse) ProtoMessage()

func (*ListNearestRoadsResponse) ProtoReflect

func (x *ListNearestRoadsResponse) ProtoReflect() protoreflect.Message

func (*ListNearestRoadsResponse) Reset

func (x *ListNearestRoadsResponse) Reset()

func (*ListNearestRoadsResponse) String

func (x *ListNearestRoadsResponse) String() string

type RoadsServiceClient

RoadsServiceClient is the client API for RoadsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RoadsServiceClient interface {
    // This method takes a sequence of latitude,longitude points and snaps them to
    // the most likely road segments. Optionally returns additional points giving
    // the full road geometry. Also returns a place ID for each snapped point.
    SnapToRoads(ctx context.Context, in *SnapToRoadsRequest, opts ...grpc.CallOption) (*SnapToRoadsResponse, error)
    // This method takes a list of latitude,longitude points and snaps them each
    // to their nearest road. Also returns a place ID for each snapped point.
    ListNearestRoads(ctx context.Context, in *ListNearestRoadsRequest, opts ...grpc.CallOption) (*ListNearestRoadsResponse, error)
}

func NewRoadsServiceClient

func NewRoadsServiceClient(cc grpc.ClientConnInterface) RoadsServiceClient

type RoadsServiceServer

RoadsServiceServer is the server API for RoadsService service.

type RoadsServiceServer interface {
    // This method takes a sequence of latitude,longitude points and snaps them to
    // the most likely road segments. Optionally returns additional points giving
    // the full road geometry. Also returns a place ID for each snapped point.
    SnapToRoads(context.Context, *SnapToRoadsRequest) (*SnapToRoadsResponse, error)
    // This method takes a list of latitude,longitude points and snaps them each
    // to their nearest road. Also returns a place ID for each snapped point.
    ListNearestRoads(context.Context, *ListNearestRoadsRequest) (*ListNearestRoadsResponse, error)
}

type SnapToRoadsRequest

A request to the SnapToRoads method, requesting that a sequence of points be snapped to road segments.

type SnapToRoadsRequest struct {

    // The path to be snapped as a series of lat, lng points. Specified as
    // a string of the format: lat,lng|lat,lng|...
    Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
    // Whether to interpolate the points to return full road geometry.
    Interpolate bool `protobuf:"varint,2,opt,name=interpolate,proto3" json:"interpolate,omitempty"`
    // The asset ID of the asset to which this path relates. This is used for
    // abuse detection purposes for clients with asset-based SKUs.
    AssetId string `protobuf:"bytes,3,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
    // The type of travel being tracked. This will constrain the paths we snap to.
    TravelMode TravelMode `protobuf:"varint,4,opt,name=travel_mode,json=travelMode,proto3,enum=google.maps.roads.v1op.TravelMode" json:"travel_mode,omitempty"`
    // contains filtered or unexported fields
}

func (*SnapToRoadsRequest) Descriptor

func (*SnapToRoadsRequest) Descriptor() ([]byte, []int)

Deprecated: Use SnapToRoadsRequest.ProtoReflect.Descriptor instead.

func (*SnapToRoadsRequest) GetAssetId

func (x *SnapToRoadsRequest) GetAssetId() string

func (*SnapToRoadsRequest) GetInterpolate

func (x *SnapToRoadsRequest) GetInterpolate() bool

func (*SnapToRoadsRequest) GetPath

func (x *SnapToRoadsRequest) GetPath() string

func (*SnapToRoadsRequest) GetTravelMode

func (x *SnapToRoadsRequest) GetTravelMode() TravelMode

func (*SnapToRoadsRequest) ProtoMessage

func (*SnapToRoadsRequest) ProtoMessage()

func (*SnapToRoadsRequest) ProtoReflect

func (x *SnapToRoadsRequest) ProtoReflect() protoreflect.Message

func (*SnapToRoadsRequest) Reset

func (x *SnapToRoadsRequest) Reset()

func (*SnapToRoadsRequest) String

func (x *SnapToRoadsRequest) String() string

type SnapToRoadsResponse

The response from the SnapToRoads method, returning a sequence of snapped points.

type SnapToRoadsResponse struct {

    // A list of snapped points.
    SnappedPoints []*SnappedPoint `protobuf:"bytes,1,rep,name=snapped_points,json=snappedPoints,proto3" json:"snapped_points,omitempty"`
    // User-visible warning message, if any, which can be shown alongside a valid
    // result.
    WarningMessage string `protobuf:"bytes,2,opt,name=warning_message,json=warningMessage,proto3" json:"warning_message,omitempty"`
    // contains filtered or unexported fields
}

func (*SnapToRoadsResponse) Descriptor

func (*SnapToRoadsResponse) Descriptor() ([]byte, []int)

Deprecated: Use SnapToRoadsResponse.ProtoReflect.Descriptor instead.

func (*SnapToRoadsResponse) GetSnappedPoints

func (x *SnapToRoadsResponse) GetSnappedPoints() []*SnappedPoint

func (*SnapToRoadsResponse) GetWarningMessage

func (x *SnapToRoadsResponse) GetWarningMessage() string

func (*SnapToRoadsResponse) ProtoMessage

func (*SnapToRoadsResponse) ProtoMessage()

func (*SnapToRoadsResponse) ProtoReflect

func (x *SnapToRoadsResponse) ProtoReflect() protoreflect.Message

func (*SnapToRoadsResponse) Reset

func (x *SnapToRoadsResponse) Reset()

func (*SnapToRoadsResponse) String

func (x *SnapToRoadsResponse) String() string

type SnappedPoint

A snapped point object, representing the result of snapping.

type SnappedPoint struct {

    // The lat,lng of the snapped location.
    Location *latlng.LatLng `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
    // The index into the original path of the equivalent pre-snapped point.
    // This allows for identification of points which have been interpolated if
    // this index is missing.
    OriginalIndex *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=original_index,json=originalIndex,proto3" json:"original_index,omitempty"`
    // The place ID for this snapped location (road segment). These are the same
    // as are currently used by the Places API.
    PlaceId string `protobuf:"bytes,3,opt,name=place_id,json=placeId,proto3" json:"place_id,omitempty"`
    // contains filtered or unexported fields
}

func (*SnappedPoint) Descriptor

func (*SnappedPoint) Descriptor() ([]byte, []int)

Deprecated: Use SnappedPoint.ProtoReflect.Descriptor instead.

func (*SnappedPoint) GetLocation

func (x *SnappedPoint) GetLocation() *latlng.LatLng

func (*SnappedPoint) GetOriginalIndex

func (x *SnappedPoint) GetOriginalIndex() *wrapperspb.UInt32Value

func (*SnappedPoint) GetPlaceId

func (x *SnappedPoint) GetPlaceId() string

func (*SnappedPoint) ProtoMessage

func (*SnappedPoint) ProtoMessage()

func (*SnappedPoint) ProtoReflect

func (x *SnappedPoint) ProtoReflect() protoreflect.Message

func (*SnappedPoint) Reset

func (x *SnappedPoint) Reset()

func (*SnappedPoint) String

func (x *SnappedPoint) String() string

type TravelMode

An enum representing the mode of travel used for snapping.

type TravelMode int32
const (
    TravelMode_TRAVEL_MODE_UNSPECIFIED TravelMode = 0
    TravelMode_DRIVING                 TravelMode = 1
    TravelMode_CYCLING                 TravelMode = 2
    TravelMode_WALKING                 TravelMode = 3
)

func (TravelMode) Descriptor

func (TravelMode) Descriptor() protoreflect.EnumDescriptor

func (TravelMode) Enum

func (x TravelMode) Enum() *TravelMode

func (TravelMode) EnumDescriptor

func (TravelMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use TravelMode.Descriptor instead.

func (TravelMode) Number

func (x TravelMode) Number() protoreflect.EnumNumber

func (TravelMode) String

func (x TravelMode) String() string

func (TravelMode) Type

func (TravelMode) Type() protoreflect.EnumType

type UnimplementedRoadsServiceServer

UnimplementedRoadsServiceServer can be embedded to have forward compatible implementations.

type UnimplementedRoadsServiceServer struct {
}

func (*UnimplementedRoadsServiceServer) ListNearestRoads

func (*UnimplementedRoadsServiceServer) ListNearestRoads(context.Context, *ListNearestRoadsRequest) (*ListNearestRoadsResponse, error)

func (*UnimplementedRoadsServiceServer) SnapToRoads

func (*UnimplementedRoadsServiceServer) SnapToRoads(context.Context, *SnapToRoadsRequest) (*SnapToRoadsResponse, error)