.setHeading(105d) .setLatLngPair(LatLng.newBuilder() .setLatitude(46.7512623d) .setLongitude(-121.9376983d) .build())
/** * Creates a {@link NewEnrichmentItem} with a {@link LocationEnrichment}. * * @throws IllegalArgumentException Thrown if the location name is null or empty. */ public static final NewEnrichmentItem createLocationEnrichment( String locationName, double latitude, double longitude) { if (locationName == null || locationName.isEmpty()) { throw new IllegalArgumentException("Location name cannot be null or empty."); } return NewEnrichmentItem.newBuilder() .setLocationEnrichment( LocationEnrichment.newBuilder() .setLocation( Location.newBuilder() .setLocationName(locationName) .setLatlng( LatLng.newBuilder().setLatitude(latitude).setLongitude(longitude)))) .build(); }
.setLocationName(originLocationName) .setLatlng( LatLng.newBuilder().setLatitude(originLatitude).setLongitude(originLongitude)); .setLatlng( LatLng.newBuilder() .setLatitude(destinationLatitude) .setLongitude(destinationLongitude));
public Builder mergeFrom(com.google.type.LatLng other) { if (other == com.google.type.LatLng.getDefaultInstance()) return this; if (other.getLatitude() != 0D) { setLatitude(other.getLatitude()); } if (other.getLongitude() != 0D) { setLongitude(other.getLongitude()); } onChanged(); return this; }
LatLng toProto() { LatLng.Builder latLngBuilder = LatLng.newBuilder(); latLngBuilder.setLatitude(latitude); latLngBuilder.setLongitude(longitude); return latLngBuilder.build(); }
protected com.google.type.LatLng toPb() { return com.google.type.LatLng.newBuilder() .setLatitude(latitude) .setLongitude(longitude) .build(); } }
LatLng toProto() { LatLng.Builder latLngBuilder = LatLng.newBuilder(); latLngBuilder.setLatitude(latitude); latLngBuilder.setLongitude(longitude); return latLngBuilder.build(); }
private Value geoPointValue(double latitude, double longitude) { return Value.newBuilder() .setGeoPointValue(LatLng.newBuilder().setLatitude(latitude).setLongitude(longitude).build()) .build(); }
protected com.google.type.LatLng toPb() { return com.google.type.LatLng.newBuilder() .setLatitude(latitude) .setLongitude(longitude) .build(); } }