libchamplain Reference Manual: ChamplainLocation

## ChamplainLocation ChamplainLocation — An interface common to objects having latitude and longitude |

## Functions

void | champlain_location_set_location ()
gdouble | champlain_location_get_latitude ()
gdouble | champlain_location_get_longitude ()

## Properties

gdouble | latitude | Read / Write
gdouble | longitude | Read / Write

## Types and Values

| ChamplainLocation
struct | ChamplainLocationIface

## Object Hierarchy

        GInterface
        ╰── ChamplainLocation

## Prerequisites

ChamplainLocation requires GObject.

## Known Implementations

ChamplainLocation is implemented by ChamplainCoordinate, ChamplainCustomMarker, ChamplainLabel, ChamplainMarker and ChamplainPoint.

## Description

By implementing ChamplainLocation the object declares that it has latitude and longitude and can be used to specify location on the map.

## Functions

### champlain_location_set_location ()

    void
    champlain_location_set_location (ChamplainLocation *location,
                                     gdouble latitude,
                                     gdouble longitude);

Sets the coordinates of the location

#### Parameters

location | a ChamplainLocation |
latitude | the latitude |
longitude | the longitude |

Since 0.10

### champlain_location_get_latitude ()

    gdouble
    champlain_location_get_latitude (ChamplainLocation *location);

Gets the latitude coordinate.

#### Parameters

location | a ChamplainLocation |

#### Returns

the latitude coordinate.

Since 0.10

### champlain_location_get_longitude ()

    gdouble
    champlain_location_get_longitude (ChamplainLocation *location);

Gets the longitude coordinate.

#### Parameters

location | a ChamplainLocation |

#### Returns

the longitude coordinate.

Since 0.10

## Types and Values

### ChamplainLocation

    typedef struct _ChamplainLocation ChamplainLocation;

An interface common to objects having latitude and longitude.

### struct ChamplainLocationIface

    struct ChamplainLocationIface {
      gdouble (*get_latitude)(ChamplainLocation *location);
      gdouble (*get_longitude)(ChamplainLocation *location);
      void (*set_location)(ChamplainLocation *location,
          gdouble latitude,
          gdouble longitude);
    };

An interface common to objects having latitude and longitude.

#### Members

`get_latitude` () | virtual function for obtaining latitude. |
`get_longitude` () | virtual function for obtaining longitude. |
`set_location` () | virtual function for setting position. |

## Property Details

### The `“latitude”` property

      “latitude”                 gdouble

The latitude coordonate

Flags: Read / Write

Allowed values: [-90,90]

Default value: 0

Since 0.10

### The `“longitude”` property

      “longitude”                gdouble

The longitude coordonate

Flags: Read / Write

Allowed values: [-180,180]

Default value: 0

Since 0.10