android.location.Address.setLatitude()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中android.location.Address.setLatitude()方法的一些代码示例,展示了Address.setLatitude()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.setLatitude()方法的具体详情如下:
包路径:android.location.Address
类名称:Address
方法名:setLatitude

Address.setLatitude介绍

暂无

代码示例

代码示例来源:origin: sytolk/TaxiAndroidOpen

  1. addr.setLatitude(result.getJSONObject("geometry").getJSONObject("location").getDouble("lat"));
  2. addr.setLongitude(result.getJSONObject("geometry").getJSONObject("location").getDouble("lng"));
  3. retList.add(addr);

代码示例来源:origin: org.robolectric/shadows-maps

  1. private Address makeAddress() {
  2. Address address = new Address(Locale.getDefault());
  3. address.setLatitude(simulatedLatitude);
  4. address.setLongitude(simulatedLongitude);
  5. ReflectionHelpers.setField(address, "mHasLatitude", hasLatitude);
  6. ReflectionHelpers.setField(address, "mHasLongitude", hasLongitude);
  7. return address;
  8. }

代码示例来源:origin: com.github.japgolly.android.test/robolectric

  1. @Implementation
  2. public List<Address> getFromLocationName(String locationName, int maxResults) throws IOException {
  3. didResolution = true;
  4. this.lastLocationName = locationName;
  5. if (shouldSimulateGeocodeException) {
  6. throw new IOException("Simulated geocode exception");
  7. }
  8. if (returnNoResults) {
  9. return new ArrayList<Address>();
  10. } else {
  11. Address address = makeAddress();
  12. address.setLatitude(simulatedLatitude);
  13. address.setLongitude(simulatedLongitude);
  14. return oneElementList(address);
  15. }
  16. }

代码示例来源:origin: MKergall/osmbonuspack

  1. gAddress.setLatitude(jPoint.get("lat").getAsDouble());
  2. gAddress.setLongitude(jPoint.get("lng").getAsDouble());

代码示例来源:origin: thuryn/your-local-weather

  1. address.setLatitude(result.getDouble(WIRE_LATITUDE));
  2. address.setLongitude(result.getDouble(WIRE_LONGITUDE));

代码示例来源:origin: MKergall/osmbonuspack

  1. return null;
  2. gAddress.setLatitude(jResult.get("lat").getAsDouble());
  3. gAddress.setLongitude(jResult.get("lon").getAsDouble());
  4. JsonObject jAddress = jResult.get("address").getAsJsonObject();

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

  1. public CustomAddress(Address address) {
  2. super(address.getLocale());
  3. for (int i = 0; i <= address.getMaxAddressLineIndex(); i++){
  4. super.setAddressLine(i, address.getAddressLine(i));
  5. }
  6. super.setFeatureName(address.getFeatureName());
  7. super.setAdminArea(address.getAdminArea());
  8. super.setSubAdminArea(address.getSubAdminArea());
  9. super.setLocality(address.getLocality());
  10. super.setSubLocality(address.getSubLocality());
  11. super.setThoroughfare(address.getThoroughfare());
  12. super.setSubThoroughfare(address.getSubThoroughfare());
  13. super.setPostalCode(address.getPostalCode());
  14. super.setCountryCode(address.getCountryCode());
  15. super.setCountryName(address.getCountryName());
  16. super.setLatitude(address.getLatitude());
  17. super.setLongitude(address.getLongitude());
  18. super.setPhone(address.getPhone());
  19. super.setUrl(address.getUrl());
  20. super.setExtras(address.getExtras());
  21. }

相关文章