Package ai.nextbillion.maps.internal
Class 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.
-
Constructor Summary
Constructors Constructor Description LatLngAdapter() -
Method Summary
-
Constructor Details
-
LatLngAdapter
public LatLngAdapter()
-
-
Method Details
-
read
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 }- Specified by:
readin classcom.google.gson.TypeAdapter<LatLng>- Throws:
java.io.IOException
-
write
Not supported.- Specified by:
writein classcom.google.gson.TypeAdapter<LatLng>- Throws:
java.io.IOException
-