polyline.proto 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright 2021 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.routes.v1;
  16. import "google/protobuf/struct.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Maps.Routes.V1";
  19. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "PolylineProto";
  22. option java_package = "com.google.maps.routes.v1";
  23. option objc_class_prefix = "GMRS";
  24. option php_namespace = "Google\\Maps\\Routes\\V1";
  25. // Encapsulates an encoded polyline.
  26. message Polyline {
  27. // Encapsulates the type of polyline. Defaults to encoded_polyline.
  28. oneof polyline_type {
  29. // The string encoding of the polyline using the [polyline encoding
  30. // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
  31. string encoded_polyline = 1;
  32. // Specifies a polyline using the [GeoJSON LineString
  33. // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
  34. google.protobuf.Struct geo_json_linestring = 2;
  35. }
  36. }
  37. // A set of values that specify the quality of the polyline.
  38. enum PolylineQuality {
  39. // No polyline quality preference specified. Defaults to `OVERVIEW`.
  40. POLYLINE_QUALITY_UNSPECIFIED = 0;
  41. // Specifies a high-quality polyline - which is composed using more points
  42. // than `OVERVIEW`, at the cost of increased response size. Use this value
  43. // when you need more precision.
  44. HIGH_QUALITY = 1;
  45. // Specifies an overview polyline - which is composed using a small number of
  46. // points. Use this value when displaying an overview of the route. Using this
  47. // option has a lower request latency compared to using the
  48. // `HIGH_QUALITY` option.
  49. OVERVIEW = 2;
  50. }
  51. // Specifies the preferred type of polyline to be returned.
  52. enum PolylineEncoding {
  53. // No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
  54. POLYLINE_ENCODING_UNSPECIFIED = 0;
  55. // Specifies a polyline encoded using the [polyline encoding
  56. // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
  57. ENCODED_POLYLINE = 1;
  58. // Specifies a polyline using the [GeoJSON LineString
  59. // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
  60. GEO_JSON_LINESTRING = 2;
  61. }