genproto: google.golang.org/genproto/googleapis/maps/roads/v1op Index | Files

package roads

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

Index

Package Files

roads.pb.go

Variables

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,
    }
)

Enum value maps for TravelMode.

var File_google_maps_roads_v1op_roads_proto protoreflect.FileDescriptor

func RegisterRoadsServiceServer Uses

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

type ListNearestRoadsRequest Uses

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
}

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

func (*ListNearestRoadsRequest) Descriptor Uses

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

Deprecated: Use ListNearestRoadsRequest.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsRequest) GetPoints Uses

func (x *ListNearestRoadsRequest) GetPoints() string

func (*ListNearestRoadsRequest) GetTravelMode Uses

func (x *ListNearestRoadsRequest) GetTravelMode() TravelMode

func (*ListNearestRoadsRequest) ProtoMessage Uses

func (*ListNearestRoadsRequest) ProtoMessage()

func (*ListNearestRoadsRequest) ProtoReflect Uses

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

func (*ListNearestRoadsRequest) Reset Uses

func (x *ListNearestRoadsRequest) Reset()

func (*ListNearestRoadsRequest) String Uses

func (x *ListNearestRoadsRequest) String() string

type ListNearestRoadsResponse Uses

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
}

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

func (*ListNearestRoadsResponse) Descriptor Uses

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

Deprecated: Use ListNearestRoadsResponse.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsResponse) GetSnappedPoints Uses

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

func (*ListNearestRoadsResponse) ProtoMessage Uses

func (*ListNearestRoadsResponse) ProtoMessage()

func (*ListNearestRoadsResponse) ProtoReflect Uses

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

func (*ListNearestRoadsResponse) Reset Uses

func (x *ListNearestRoadsResponse) Reset()

func (*ListNearestRoadsResponse) String Uses

func (x *ListNearestRoadsResponse) String() string

type RoadsServiceClient Uses

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)
}

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.

func NewRoadsServiceClient Uses

func NewRoadsServiceClient(cc grpc.ClientConnInterface) RoadsServiceClient

type RoadsServiceServer Uses

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)
}

RoadsServiceServer is the server API for RoadsService service.

type SnapToRoadsRequest Uses

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
}

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

func (*SnapToRoadsRequest) Descriptor Uses

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

Deprecated: Use SnapToRoadsRequest.ProtoReflect.Descriptor instead.

func (*SnapToRoadsRequest) GetAssetId Uses

func (x *SnapToRoadsRequest) GetAssetId() string

func (*SnapToRoadsRequest) GetInterpolate Uses

func (x *SnapToRoadsRequest) GetInterpolate() bool

func (*SnapToRoadsRequest) GetPath Uses

func (x *SnapToRoadsRequest) GetPath() string

func (*SnapToRoadsRequest) GetTravelMode Uses

func (x *SnapToRoadsRequest) GetTravelMode() TravelMode

func (*SnapToRoadsRequest) ProtoMessage Uses

func (*SnapToRoadsRequest) ProtoMessage()

func (*SnapToRoadsRequest) ProtoReflect Uses

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

func (*SnapToRoadsRequest) Reset Uses

func (x *SnapToRoadsRequest) Reset()

func (*SnapToRoadsRequest) String Uses

func (x *SnapToRoadsRequest) String() string

type SnapToRoadsResponse Uses

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
}

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

func (*SnapToRoadsResponse) Descriptor Uses

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

Deprecated: Use SnapToRoadsResponse.ProtoReflect.Descriptor instead.

func (*SnapToRoadsResponse) GetSnappedPoints Uses

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

func (*SnapToRoadsResponse) GetWarningMessage Uses

func (x *SnapToRoadsResponse) GetWarningMessage() string

func (*SnapToRoadsResponse) ProtoMessage Uses

func (*SnapToRoadsResponse) ProtoMessage()

func (*SnapToRoadsResponse) ProtoReflect Uses

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

func (*SnapToRoadsResponse) Reset Uses

func (x *SnapToRoadsResponse) Reset()

func (*SnapToRoadsResponse) String Uses

func (x *SnapToRoadsResponse) String() string

type SnappedPoint Uses

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 *wrappers.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
}

A snapped point object, representing the result of snapping.

func (*SnappedPoint) Descriptor Uses

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

Deprecated: Use SnappedPoint.ProtoReflect.Descriptor instead.

func (*SnappedPoint) GetLocation Uses

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

func (*SnappedPoint) GetOriginalIndex Uses

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

func (*SnappedPoint) GetPlaceId Uses

func (x *SnappedPoint) GetPlaceId() string

func (*SnappedPoint) ProtoMessage Uses

func (*SnappedPoint) ProtoMessage()

func (*SnappedPoint) ProtoReflect Uses

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

func (*SnappedPoint) Reset Uses

func (x *SnappedPoint) Reset()

func (*SnappedPoint) String Uses

func (x *SnappedPoint) String() string

type TravelMode Uses

type TravelMode int32

An enum representing the mode of travel used for snapping.

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

func (TravelMode) Descriptor Uses

func (TravelMode) Descriptor() protoreflect.EnumDescriptor

func (TravelMode) Enum Uses

func (x TravelMode) Enum() *TravelMode

func (TravelMode) EnumDescriptor Uses

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

Deprecated: Use TravelMode.Descriptor instead.

func (TravelMode) Number Uses

func (x TravelMode) Number() protoreflect.EnumNumber

func (TravelMode) String Uses

func (x TravelMode) String() string

func (TravelMode) Type Uses

func (TravelMode) Type() protoreflect.EnumType

type UnimplementedRoadsServiceServer Uses

type UnimplementedRoadsServiceServer struct {
}

UnimplementedRoadsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRoadsServiceServer) ListNearestRoads Uses

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

func (*UnimplementedRoadsServiceServer) SnapToRoads Uses

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

Package roads imports 12 packages (graph). Updated 2020-07-05. Refresh now. Tools for package owners.