polyline.proto 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.maps.routing.v2;
  16. import "google/protobuf/struct.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Maps.Routing.V2";
  19. option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "PolylineProto";
  22. option java_package = "com.google.maps.routing.v2";
  23. option objc_class_prefix = "GMRV2";
  24. option php_namespace = "Google\\Maps\\Routing\\V2";
  25. option ruby_package = "Google::Maps::Routing::V2";
  26. // Encapsulates an encoded polyline.
  27. message Polyline {
  28. // Encapsulates the type of polyline. Defaults to encoded_polyline.
  29. oneof polyline_type {
  30. // The string encoding of the polyline using the [polyline encoding
  31. // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
  32. string encoded_polyline = 1;
  33. // Specifies a polyline using the [GeoJSON LineString
  34. // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
  35. google.protobuf.Struct geo_json_linestring = 2;
  36. }
  37. }
  38. // A set of values that specify the quality of the polyline.
  39. enum PolylineQuality {
  40. // No polyline quality preference specified. Defaults to `OVERVIEW`.
  41. POLYLINE_QUALITY_UNSPECIFIED = 0;
  42. // Specifies a high-quality polyline - which is composed using more points
  43. // than `OVERVIEW`, at the cost of increased response size. Use this value
  44. // when you need more precision.
  45. HIGH_QUALITY = 1;
  46. // Specifies an overview polyline - which is composed using a small number of
  47. // points. Use this value when displaying an overview of the route. Using this
  48. // option has a lower request latency compared to using the
  49. // `HIGH_QUALITY` option.
  50. OVERVIEW = 2;
  51. }
  52. // Specifies the preferred type of polyline to be returned.
  53. enum PolylineEncoding {
  54. // No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
  55. POLYLINE_ENCODING_UNSPECIFIED = 0;
  56. // Specifies a polyline encoded using the [polyline encoding
  57. // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
  58. ENCODED_POLYLINE = 1;
  59. // Specifies a polyline using the [GeoJSON LineString
  60. // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
  61. GEO_JSON_LINESTRING = 2;
  62. }