ChamplainMapSourceDesc: libchamplain Reference Manual

## ChamplainMapSourceDesc ChamplainMapSourceDesc — A class that describes map sources. |

## Functions

ChamplainMapSource * | (*ChamplainMapSourceConstructor) ()
ChamplainMapSourceDesc * | champlain_map_source_desc_new_full ()
const gchar * | champlain_map_source_desc_get_id ()
const gchar * | champlain_map_source_desc_get_name ()
const gchar * | champlain_map_source_desc_get_license ()
const gchar * | champlain_map_source_desc_get_license_uri ()
const gchar * | champlain_map_source_desc_get_uri_format ()
guint | champlain_map_source_desc_get_min_zoom_level ()
guint | champlain_map_source_desc_get_max_zoom_level ()
guint | champlain_map_source_desc_get_tile_size ()
ChamplainMapProjection | champlain_map_source_desc_get_projection ()
gpointer | champlain_map_source_desc_get_data ()
ChamplainMapSourceConstructor | champlain_map_source_desc_get_constructor ()

## Properties

gpointer | constructor | Read / Write / Construct Only
gpointer | data | Read / Write / Construct Only
gchar * | id | Read / Write / Construct Only
gchar * | license | Read / Write / Construct Only
gchar * | license-uri | Read / Write / Construct Only
guint | max-zoom-level | Read / Write / Construct Only
guint | min-zoom-level | Read / Write / Construct Only
gchar * | name | Read / Write / Construct Only
ChamplainMapProjection | projection | Read / Write / Construct Only
guint | tile-size | Read / Write / Construct Only
gchar * | uri-format | Read / Write / Construct Only

## Types and Values

struct | ChamplainMapSourceDesc
#define | CHAMPLAIN_MAP_SOURCE_CONSTRUCTOR

## Object Hierarchy

        GObject
        ╰── ChamplainMapSourceDesc

## Description

A class that describes map sources.

## Functions

### ChamplainMapSourceConstructor ()

    ChamplainMapSource *
    (*ChamplainMapSourceConstructor) (ChamplainMapSourceDesc *desc);

A ChamplainMapSource constructor. It should return a ready to use ChamplainMapSource.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

A fully constructed ChamplainMapSource ready to be used.

Since: 0.10

### champlain_map_source_desc_new_full ()

    ChamplainMapSourceDesc *
    champlain_map_source_desc_new_full (gchar *id,
                                        gchar *name,
                                        gchar *license,
                                        gchar *license_uri,
                                        guint min_zoom,
                                        guint max_zoom,
                                        guint tile_size,
                                        ChamplainMapProjection projection,
                                        gchar *uri_format,
                                        ChamplainMapSourceConstructor constructor,
                                        gpointer data);

Constructor of ChamplainMapSourceDesc which describes a ChamplainMapSource. This is returned by champlain_map_source_factory_get_registered

[skip]

#### Parameters

id | the map source's id |
name | the map source's name |
license | the map source's license |
license_uri | the map source's license URI |
min_zoom | the map source's minimum zoom level |
max_zoom | the map source's maximum zoom level |
tile_size | the map source's tile size (in pixels) |
projection | the map source's projection |
uri_format | the URI to fetch the tiles from, see champlain_network_tile_source_set_uri_format |
constructor | the map source's constructor |
data | user data passed to the constructor |

#### Returns

a constructed ChamplainMapSourceDesc object

Since: 0.10

### champlain_map_source_desc_get_id ()

    const gchar *
    champlain_map_source_desc_get_id (ChamplainMapSourceDesc *desc);

Gets map source's id.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the map source's id.

Since: 0.10

### champlain_map_source_desc_get_name ()

    const gchar *
    champlain_map_source_desc_get_name (ChamplainMapSourceDesc *desc);

Gets map source's name.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the map source's name.

Since: 0.10

### champlain_map_source_desc_get_license ()

    const gchar *
    champlain_map_source_desc_get_license (ChamplainMapSourceDesc *desc);

Gets map source's license.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the map source's license.

Since: 0.10

### champlain_map_source_desc_get_license_uri ()

    const gchar *
    champlain_map_source_desc_get_license_uri
                                   (ChamplainMapSourceDesc *desc);

Gets map source's license URI.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the map source's license URI.

Since: 0.10

### champlain_map_source_desc_get_uri_format ()

    const gchar *
    champlain_map_source_desc_get_uri_format
                                   (ChamplainMapSourceDesc *desc);

Gets network map source's URI format.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the URI format.

Since: 0.10

### champlain_map_source_desc_get_min_zoom_level ()

    guint
    champlain_map_source_desc_get_min_zoom_level
                                   (ChamplainMapSourceDesc *desc);

Gets map source's minimum zoom level.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the miminum zoom level this map source supports

Since: 0.10

### champlain_map_source_desc_get_max_zoom_level ()

    guint
    champlain_map_source_desc_get_max_zoom_level
                                   (ChamplainMapSourceDesc *desc);

Gets map source's maximum zoom level.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the maximum zoom level this map source supports

Since: 0.10

### champlain_map_source_desc_get_tile_size ()

    guint
    champlain_map_source_desc_get_tile_size
                                   (ChamplainMapSourceDesc *desc);

Gets map source's tile size.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the tile's size (width and height) in pixels for this map source

Since: 0.10

### champlain_map_source_desc_get_projection ()

    ChamplainMapProjection
    champlain_map_source_desc_get_projection
                                   (ChamplainMapSourceDesc *desc);

Gets map source's projection.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the map source's projection.

Since: 0.10

### champlain_map_source_desc_get_data ()

    gpointer
    champlain_map_source_desc_get_data (ChamplainMapSourceDesc *desc);

Gets user data.

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the user data.

[transfer none]

Since: 0.10

### champlain_map_source_desc_get_constructor ()

    ChamplainMapSourceConstructor
    champlain_map_source_desc_get_constructor
                                   (ChamplainMapSourceDesc *desc);

Gets the map source constructor.

[skip]

#### Parameters

desc | a ChamplainMapSourceDesc |

#### Returns

the constructor.

Since: 0.10

## Types and Values

### struct ChamplainMapSourceDesc

    struct ChamplainMapSourceDesc;

The ChamplainMapSourceDesc structure contains only private data and should be accessed using the provided API

Since: 0.10

### CHAMPLAIN_MAP_SOURCE_CONSTRUCTOR

    #define CHAMPLAIN_MAP_SOURCE_CONSTRUCTOR (f) ((ChamplainMapSourceConstructor) (f))

Conversion macro to ChamplainMapSourceConstructor.

Since: 0.10

## Property Details

### The `“constructor”` property

      “constructor”              gpointer

The map source constructor

Flags: Read / Write / Construct Only

Since: 0.10

### The `“data”` property

      “data”                     gpointer

User data passed to the constructor

Flags: Read / Write / Construct Only

Since: 0.10

### The `“id”` property

      “id”                       gchar *

The id of the map source

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.10

### The `“license”` property

      “license”                  gchar *

The license of the map source

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.10

### The `“license-uri”` property

      “license-uri”              gchar *

The license's uri for more information

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.10

### The `“max-zoom-level”` property

      “max-zoom-level”           guint

The maximum zoom level

Flags: Read / Write / Construct Only

Allowed values: <= 20

Default value: 20

Since: 0.10

### The `“min-zoom-level”` property

      “min-zoom-level”           guint

The minimum zoom level

Flags: Read / Write / Construct Only

Allowed values: <= 20

Default value: 0

Since: 0.10

### The `“name”` property

      “name”                     gchar *

The name of the map source

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.10

### The `“projection”` property

      “projection”               ChamplainMapProjection

The map projection of the map source

Flags: Read / Write / Construct Only

Default value: CHAMPLAIN_MAP_PROJECTION_MERCATOR

Since: 0.10

### The `“tile-size”` property

      “tile-size”                guint

The tile size of the map source

Flags: Read / Write / Construct Only

Allowed values: <= G_MAXLONG

Default value: 256

Since: 0.10

### The `“uri-format”` property

      “uri-format”               gchar *

The URI format of a network map source

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.10