类 LatLngAdapter

java.lang.Object
com.google.gson.TypeAdapter<LatLng>
ai.nextbillion.maps.internal.LatLngAdapter

public class LatLngAdapter
extends com.google.gson.TypeAdapter<LatLng>
Handle conversion from varying types of latitude and longitude representations.
  • 构造器概要

    构造器 
    构造器 说明
    LatLngAdapter()  
  • 方法概要

    修饰符和类型 方法 说明
    LatLng read​(com.google.gson.stream.JsonReader reader)
    Reads in a JSON object and try to create a LatLng in one of the following formats.
    void write​(com.google.gson.stream.JsonWriter out, LatLng value)
    Not supported.

    从类继承的方法 com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

  • 方法详细资料

    • read

      public LatLng read​(com.google.gson.stream.JsonReader reader) throws java.io.IOException
      Reads in a JSON object and try to create a LatLng in one of the following formats.
      {
         "lat" : -33.8353684,
         "lng" : 140.8527069
       }
      
       {
         "latitude": -33.865257570508334,
         "longitude": 151.19287000481452
       }
      指定者:
      read 在类中 com.google.gson.TypeAdapter<LatLng>
      抛出:
      java.io.IOException
    • write

      public void write​(com.google.gson.stream.JsonWriter out, LatLng value) throws java.io.IOException
      Not supported.
      指定者:
      write 在类中 com.google.gson.TypeAdapter<LatLng>
      抛出:
      java.io.IOException