class SerializableLatLng
(Niantic.Lightship.Maps.Coordinates.SerializableLatLng)
Overview
A serializable version of LatLng. The LatLng type is a readonly struct
, which can't easily be serialized as fields in Unity Objects or modified in the Editor's Inspector. The SerializableLatLng type is an Editor- friendly version of the readonly
value type, with methods to easily convert between the two.
class SerializableLatLng {
public:
// fields
double Latitude => _latitude;
double Longitude => _longitude;
// methods
SerializableLatLng(double latitude, double longitude);
static implicit operator LatLng (SerializableLatLng value);
static implicit operator SerializableLatLng (in LatLng value);
};
Detailed Documentation
A serializable version of LatLng. The LatLng type is a readonly struct
, which can't easily be serialized as fields in Unity Objects or modified in the Editor's Inspector. The SerializableLatLng type is an Editor- friendly version of the readonly
value type, with methods to easily convert between the two.
Methods
SerializableLatLng
SerializableLatLng(double latitude, double longitude)
Constructor
Parameters:
latitude
- Latitude, in degrees
longitude
- Longitude, in degrees
operator LatLng
static implicit operator LatLng (SerializableLatLng value)
Implicit conversion from a SerializableLatLng to a LatLng.
Parameters:
value
- The value to convert
Returns:
The lat/lng value as a LatLng
operator SerializableLatLng
static implicit operator SerializableLatLng (in LatLng value)
Implicit conversion from a LatLng to a SerializableLatLng.
Parameters:
value
- The value to convert
Returns:
The lat/lng value as a SerializableLatLng