ChamplainTileSource: libchamplain Reference Manual

## ChamplainTileSource ChamplainTileSource — A base class of tile sources |

## Functions

void | champlain_tile_source_set_cache ()
ChamplainTileCache * | champlain_tile_source_get_cache ()
void | champlain_tile_source_set_id ()
void | champlain_tile_source_set_name ()
void | champlain_tile_source_set_license ()
void | champlain_tile_source_set_license_uri ()
void | champlain_tile_source_set_min_zoom_level ()
void | champlain_tile_source_set_max_zoom_level ()
void | champlain_tile_source_set_tile_size ()
void | champlain_tile_source_set_projection ()

## Properties

ChamplainTileCache * | cache | Read / Write
gchar * | id | Read / Write / Construct
gchar * | license | Read / Write / Construct
gchar * | license-uri | Read / Write / Construct
guint | max-zoom-level | Read / Write / Construct
guint | min-zoom-level | Read / Write / Construct
gchar * | name | Read / Write / Construct
ChamplainMapProjection | projection | Read / Write / Construct
guint | tile-size | Read / Write / Construct

## Types and Values

struct | ChamplainTileSource

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ChamplainMapSource
                ╰── ChamplainTileSource
                    ├── ChamplainFileTileSource
                    ├── ChamplainNetworkBboxTileSource
                    ├── ChamplainNetworkTileSource
                    ╰── ChamplainNullTileSource

## Description

This class defines properties common to all tile sources (that is, map sources that are not caches).

## Functions

### champlain_tile_source_set_cache ()

    void
    champlain_tile_source_set_cache (ChamplainTileSource *tile_source,
                                     ChamplainTileCache *cache);

Sets the map source's cache used for storing tiles.

#### Parameters

tile_source | a ChamplainTileSource |
cache | a ChamplainTileCache |

Since: 0.6

### champlain_tile_source_get_cache ()

    ChamplainTileCache *
    champlain_tile_source_get_cache (ChamplainTileSource *tile_source);

Gets the cache used for storing tiles by this tile source.

#### Parameters

tile_source | a ChamplainTileSource |

#### Returns

the cache.

[transfer none]

Since: 0.6

### champlain_tile_source_set_id ()

    void
    champlain_tile_source_set_id (ChamplainTileSource *tile_source,
                                  const gchar *id);

Sets the tile source's id.

#### Parameters

tile_source | a ChamplainTileSource |
id | an id |

Since: 0.4

### champlain_tile_source_set_name ()

    void
    champlain_tile_source_set_name (ChamplainTileSource *tile_source,
                                    const gchar *name);

Sets the tile source's name.

#### Parameters

tile_source | a ChamplainTileSource |
name | a name |

Since: 0.4

### champlain_tile_source_set_license ()

    void
    champlain_tile_source_set_license (ChamplainTileSource *tile_source,
                                       const gchar *license);

Sets the tile source's license.

#### Parameters

tile_source | a ChamplainTileSource |
license | the licence |

Since: 0.4

### champlain_tile_source_set_license_uri ()

    void
    champlain_tile_source_set_license_uri (ChamplainTileSource *tile_source,
                                           const gchar *license_uri);

Sets the tile source's license URI.

#### Parameters

tile_source | a ChamplainTileSource |
license_uri | the licence URI |

Since: 0.4

### champlain_tile_source_set_min_zoom_level ()

    void
    champlain_tile_source_set_min_zoom_level
                                   (ChamplainTileSource *tile_source,
                                    guint zoom_level);

Sets the tile source's minimal zoom level.

#### Parameters

tile_source | a ChamplainTileSource |
zoom_level | the minimal zoom level |

Since: 0.6

### champlain_tile_source_set_max_zoom_level ()

    void
    champlain_tile_source_set_max_zoom_level
                                   (ChamplainTileSource *tile_source,
                                    guint zoom_level);

Sets the tile source's maximum zoom level.

#### Parameters

tile_source | a ChamplainTileSource |
zoom_level | the maximum zoom level |

Since: 0.6

### champlain_tile_source_set_tile_size ()

    void
    champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source,
                                         guint tile_size);

Sets the tile source's tile size.

#### Parameters

tile_source | a ChamplainTileSource |
tile_size | the tile size |

Since: 0.6

### champlain_tile_source_set_projection ()

    void
    champlain_tile_source_set_projection (ChamplainTileSource *tile_source,
                                          ChamplainMapProjection projection);

Sets the tile source's projection.

#### Parameters

tile_source | a ChamplainTileSource |
projection | a ChamplainMapProjection |

Since: 0.4

## Types and Values

### struct ChamplainTileSource

    struct ChamplainTileSource;

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

Since: 0.6

## Property Details

### The `“cache”` property

      “cache”                    ChamplainTileCache *

The cache used for tile storage

Flags: Read / Write

Since: 0.6

### The `“id”` property

      “id”                       gchar *

The id of the tile source

Flags: Read / Write / Construct

Default value: ""

Since: 0.4

### The `“license”` property

      “license”                  gchar *

The usage license of the tile source

Flags: Read / Write / Construct

Default value: ""

Since: 0.4

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

      “license-uri”              gchar *

The usage license's uri for more information

Flags: Read / Write / Construct

Default value: ""

Since: 0.4

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

      “max-zoom-level”           guint

The maximum zoom level

Flags: Read / Write / Construct

Allowed values: <= 50

Default value: 18

Since: 0.4

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

      “min-zoom-level”           guint

The minimum zoom level

Flags: Read / Write / Construct

Allowed values: <= 50

Default value: 0

Since: 0.4

### The `“name”` property

      “name”                     gchar *

The name of the tile source

Flags: Read / Write / Construct

Default value: ""

Since: 0.4

### The `“projection”` property

      “projection”               ChamplainMapProjection

The map projection of the tile source

Flags: Read / Write / Construct

Default value: CHAMPLAIN_MAP_PROJECTION_MERCATOR

Since: 0.4

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

      “tile-size”                guint

The tile size of the tile source

Flags: Read / Write / Construct

Allowed values: <= 2048

Default value: 256

Since: 0.4