Show / Hide Table of Contents

Class LatLng

LatLng is a point in geographical coordinates, latitude and longitude. Notice that although usual map projections associate longitude with the x-coordinate of the map, and latitude with the y-coordinate, the latitude coordinate is always written first, followed by the longitude. Notice also that you cannot modify the coordinates of a LatLng. If you want to compute another point, you have to create a new one.

Inheritance
System.Object
LatLng
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:GoogleMaps
Assembly:GoogleMaps.dll
Syntax
public class LatLng : IScriptDescriptorData

Constructors

LatLng()

Initializes a new instance of the LatLng class.

Declaration
public LatLng()

LatLng(Double, Double)

Initializes a new instance of the LatLng class.

Declaration
public LatLng(double lat, double lng)
Parameters
Type Name Description
System.Double lat

The latitude geographical degrees value

System.Double lng

The Longitude geographical degrees value

Properties

Latitude

Gets or sets the latitude in degrees.

Declaration
public double Latitude { get; set; }
Property Value
Type Description
System.Double

The latitude.

Longitude

Gets or sets the longitude in degrees.

Declaration
public double Longitude { get; set; }
Property Value
Type Description
System.Double

The longitude.

Methods

FromScriptData(Object)

Retrieves an instance from script data.

Declaration
public static LatLng FromScriptData(object scriptObject)
Parameters
Type Name Description
System.Object scriptObject

The script object.

Returns
Type Description
LatLng

Parse(String)

Parses the provided string value for a new instance of LatLng.

Declaration
public static LatLng Parse(string value)
Parameters
Type Name Description
System.String value

The string value of the a LatLng instance.

Returns
Type Description
LatLng

The new instance of LatLng from the string data

ToScriptData()

Returns a script data representation of an instance of LatLng.

Declaration
public IDictionary<string, object> ToScriptData()
Returns
Type Description
System.Collections.Generic.IDictionary<System.String, System.Object>

The script data as System.Collections.Generic.IDictionary<TKey, TValue>

Implements
IScriptDescriptorData.ToScriptData()

ToString()

Returns a System.String that represents the current System.Object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the current System.Object.

Overrides
System.Object.ToString()

Operators

Implicit(String to LatLng)

Performs an implicit conversion from System.String to LatLng.

Declaration
public static implicit operator LatLng(string value)
Parameters
Type Name Description
System.String value

The string value of the LatLng instance.

Returns
Type Description
LatLng

The result LatLng of the conversion.

Back to top Copyright © 2017 GoogleMapControl
Generated by DocFX