Shumate.Location¶
- Implementations:
Shumate.Coordinate
,Shumate.Marker
,Shumate.SymbolEvent
,Shumate.Viewport
Methods¶
|
|
|
|
|
Virtual Methods¶
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The latitude coordonate in degrees |
||
r/w |
The longitude coordonate in degrees |
Signals¶
None
Fields¶
None
Class Details¶
- class Shumate.Location¶
- Bases:
- Structure:
An interface common to objects having latitude and longitude
By implementing
Shumate.Location
the object declares that it has latitude and longitude and can be used to specify location on the map.- distance(other)¶
- Parameters:
other (
Shumate.Location
) – a [iface`Location`]- Returns:
the distance in meters between self and other
- Return type:
Calculates the distance in meters between two locations.
This function uses the great-circle distance formula, which assumes Earth is a perfect sphere. This limits the accuracy of the result, but is good enough for most purposes.
New in version 1.2.
- get_latitude()¶
- Returns:
the latitude coordinate in degrees.
- Return type:
Gets the latitude coordinate in degrees.
- get_longitude()¶
- Returns:
the longitude coordinate in degrees.
- Return type:
Gets the longitude coordinate in degrees.
- set_location(latitude, longitude)¶
-
Sets the coordinates of the location
- do_get_latitude() virtual¶
- Returns:
the latitude coordinate in degrees.
- Return type:
Gets the latitude coordinate in degrees.
- do_get_longitude() virtual¶
- Returns:
the longitude coordinate in degrees.
- Return type:
Gets the longitude coordinate in degrees.
Property Details¶
- Shumate.Location.props.latitude¶
-
The latitude coordonate in degrees