## ChamplainNetworkBboxTileSource

ChamplainNetworkBboxTileSource — A map source that loads tile data from an OpenStreetMap API server

## Functions

ChamplainNetworkBboxTileSource * | champlain_network_bbox_tile_source_new_full ()
void | champlain_network_bbox_tile_source_load_map_data ()
const gchar * | champlain_network_bbox_tile_source_get_api_uri ()
void | champlain_network_bbox_tile_source_set_api_uri ()
void | champlain_network_bbox_tile_source_set_user_agent ()

## Properties

gchar * | api-uri | Read / Write
gchar * | proxy-uri | Read / Write
ChamplainState | state | Read / Write
gchar * | user-agent | Write

## Types and Values

struct | ChamplainNetworkBboxTileSource

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ChamplainMapSource
                ╰── ChamplainTileSource
                    ╰── ChamplainNetworkBboxTileSource

## Description

This map source source downloads the map data from an OpenStreetMap API server. It supports protocol version 0.5 and 0.6.

http://wiki.openstreetmap.org/wiki/API

## Functions

### champlain_network_bbox_tile_source_new_full ()

    ChamplainNetworkBboxTileSource *
    champlain_network_bbox_tile_source_new_full
                                   (const gchar *id,
                                    const gchar *name,
                                    const gchar *license,
                                    const gchar *license_uri,
                                    guint min_zoom,
                                    guint max_zoom,
                                    guint tile_size,
                                    ChamplainMapProjection projection,
                                    ChamplainRenderer *renderer);

Constructor of ChamplainNetworkBboxTileSource.

#### 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 |
renderer | the ChamplainRenderer used to render tiles |

#### Returns

a constructed ChamplainNetworkBboxTileSource object

Since: 0.8

### champlain_network_bbox_tile_source_load_map_data ()

    void
    champlain_network_bbox_tile_source_load_map_data
                                   (ChamplainNetworkBboxTileSource *map_data_source,
                                    ChamplainBoundingBox *bbox);

Asynchronously loads map data within a bounding box from the server. The box must not exceed an edge size of 0.25 degree. There are also limitations on the maximum number of nodes that can be requested.

For details, see: http://api.openstreetmap.org/api/capabilities

#### Parameters

map_data_source | a ChamplainNetworkBboxTileSource |
bbox | bounding box of the requested area |

Since: 0.10

### champlain_network_bbox_tile_source_get_api_uri ()

    const gchar *
    champlain_network_bbox_tile_source_get_api_uri
                                   (ChamplainNetworkBboxTileSource *map_data_source);

Gets the URI of the API server.

#### Parameters

map_data_source | a ChamplainNetworkBboxTileSource |

#### Returns

the URI of the API server.

Since: 0.8

### champlain_network_bbox_tile_source_set_api_uri ()

    void
    champlain_network_bbox_tile_source_set_api_uri
                                   (ChamplainNetworkBboxTileSource *map_data_source,
                                    const gchar *api_uri);

Sets the URI of the API server.

#### Parameters

map_data_source | a ChamplainNetworkBboxTileSource |
api_uri | an URI of an API server |

Since: 0.8

### champlain_network_bbox_tile_source_set_user_agent ()

    void
    champlain_network_bbox_tile_source_set_user_agent
                                   (ChamplainNetworkBboxTileSource *map_data_source,
                                    const gchar *user_agent);

Sets the User-Agent header used communicating with the server.

#### Parameters

map_data_source | a ChamplainNetworkBboxTileSource |
user_agent | A User-Agent string |

Since: 0.12.16

## Types and Values

### struct ChamplainNetworkBboxTileSource

    struct ChamplainNetworkBboxTileSource;

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

Since: 0.8

## Property Details

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

      “api-uri”                  gchar *

The URI of an OpenStreetMap API server

Flags: Read / Write

Default value: "http://www.informationfreeway.org/api/0.6"

Since: 0.8

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

      “proxy-uri”                gchar *

Used to override the default proxy for accessing the network.

Flags: Read / Write

Default value: ""

Since: 0.8

### The `“state”` property

      “state”                    ChamplainState

The map source's state. Useful to know if the data source is loading or not.

Flags: Read / Write

Default value: CHAMPLAIN_STATE_NONE

Since: 0.8

### The `“user-agent”` property

      “user-agent”               gchar *

The HTTP user agent used for requests

Flags: Write

Default value: "libchamplain/0.12.16"

Since: 0.12.16