mirror of https://github.com/grpc/grpc-java.git
RouteGuideClient example: use E7 format for latitude & longitude
As indicated in the proto file, point coordinates are in degrees encoded in E7 format. https://github.com/grpc/grpc-java/blob/master/examples/src/main/proto/route_guide.proto#L54
This commit is contained in:
parent
88bd7278ae
commit
d097cc0ee0
|
|
@ -218,8 +218,8 @@ public class RouteGuideClient {
|
|||
|
||||
try {
|
||||
RouteNote[] requests =
|
||||
{newNote("First message", 0, 0), newNote("Second message", 0, 1),
|
||||
newNote("Third message", 1, 0), newNote("Fourth message", 1, 1)};
|
||||
{newNote("First message", 0, 0), newNote("Second message", 0, 10_000_000),
|
||||
newNote("Third message", 10_000_000, 0), newNote("Fourth message", 10_000_000, 10_000_000)};
|
||||
|
||||
for (RouteNote request : requests) {
|
||||
info("Sending message \"{0}\" at {1}, {2}", request.getMessage(), request.getLocation()
|
||||
|
|
|
|||
|
|
@ -400,9 +400,9 @@ public class RouteGuideClientTest {
|
|||
assertEquals(
|
||||
Arrays.asList(
|
||||
Point.newBuilder().setLatitude(0).setLongitude(0).build(),
|
||||
Point.newBuilder().setLatitude(0).setLongitude(1).build(),
|
||||
Point.newBuilder().setLatitude(1).setLongitude(0).build(),
|
||||
Point.newBuilder().setLatitude(1).setLongitude(1).build()
|
||||
Point.newBuilder().setLatitude(0).setLongitude(10_000_000).build(),
|
||||
Point.newBuilder().setLatitude(10_000_000).setLongitude(0).build(),
|
||||
Point.newBuilder().setLatitude(10_000_000).setLongitude(10_000_000).build()
|
||||
),
|
||||
locationsDelivered);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue