本文整理了Java中android.location.Address.setLongitude()
方法的一些代码示例,展示了Address.setLongitude()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.setLongitude()
方法的具体详情如下:
包路径:android.location.Address
类名称:Address
方法名:setLongitude
暂无
代码示例来源:origin: sytolk/TaxiAndroidOpen
addr.setLongitude(result.getJSONObject("geometry").getJSONObject("location").getDouble("lng"));
retList.add(addr);
代码示例来源:origin: org.robolectric/shadows-maps
private Address makeAddress() {
Address address = new Address(Locale.getDefault());
address.setLatitude(simulatedLatitude);
address.setLongitude(simulatedLongitude);
ReflectionHelpers.setField(address, "mHasLatitude", hasLatitude);
ReflectionHelpers.setField(address, "mHasLongitude", hasLongitude);
return address;
}
代码示例来源:origin: com.github.japgolly.android.test/robolectric
@Implementation
public List<Address> getFromLocationName(String locationName, int maxResults) throws IOException {
didResolution = true;
this.lastLocationName = locationName;
if (shouldSimulateGeocodeException) {
throw new IOException("Simulated geocode exception");
}
if (returnNoResults) {
return new ArrayList<Address>();
} else {
Address address = makeAddress();
address.setLatitude(simulatedLatitude);
address.setLongitude(simulatedLongitude);
return oneElementList(address);
}
}
代码示例来源:origin: MKergall/osmbonuspack
gAddress.setLongitude(jPoint.get("lng").getAsDouble());
代码示例来源:origin: thuryn/your-local-weather
address.setLongitude(result.getDouble(WIRE_LONGITUDE));
代码示例来源:origin: MKergall/osmbonuspack
gAddress.setLongitude(jResult.get("lon").getAsDouble());
JsonObject jAddress = jResult.get("address").getAsJsonObject();
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
public CustomAddress(Address address) {
super(address.getLocale());
for (int i = 0; i <= address.getMaxAddressLineIndex(); i++){
super.setAddressLine(i, address.getAddressLine(i));
}
super.setFeatureName(address.getFeatureName());
super.setAdminArea(address.getAdminArea());
super.setSubAdminArea(address.getSubAdminArea());
super.setLocality(address.getLocality());
super.setSubLocality(address.getSubLocality());
super.setThoroughfare(address.getThoroughfare());
super.setSubThoroughfare(address.getSubThoroughfare());
super.setPostalCode(address.getPostalCode());
super.setCountryCode(address.getCountryCode());
super.setCountryName(address.getCountryName());
super.setLatitude(address.getLatitude());
super.setLongitude(address.getLongitude());
super.setPhone(address.getPhone());
super.setUrl(address.getUrl());
super.setExtras(address.getExtras());
}
内容来源于网络,如有侵权,请联系作者删除!