Champlain.NetworkBboxTileSource

g Champlain.MapSource Champlain.MapSource Champlain.TileSource Champlain.TileSource Champlain.MapSource->Champlain.TileSource Champlain.NetworkBboxTileSource Champlain.NetworkBboxTileSource Champlain.TileSource->Champlain.NetworkBboxTileSource GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Champlain.MapSource GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Champlain.TileSource (10), Champlain.MapSource (20), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new_full (id, name, license, license_uri, min_zoom, max_zoom, tile_size, projection, renderer)

get_api_uri ()

load_map_data (bbox)

set_api_uri (api_uri)

set_user_agent (user_agent)

Virtual Methods

Inherited:

Champlain.MapSource (9), GObject.Object (7)

Properties

Inherited:

Champlain.TileSource (9), Champlain.MapSource (2)

Name

Type

Flags

Short Description

api-uri

str

r/w

The API URI of an OpenStreetMap server

proxy-uri

str

r/w

The proxy URI to use to access network

state

Champlain.State

r/w

The state of the map data source

user-agent

str

w

The HTTP user agent used for network requests

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Champlain.TileSource

r

Class Details

class Champlain.NetworkBboxTileSource(**kwargs)
Bases:

Champlain.TileSource

Abstract:

No

Structure:

Champlain.NetworkBboxTileSourceClass

The Champlain.NetworkBboxTileSource structure contains only private data and should be accessed using the provided API

New in version 0.8.

classmethod new_full(id, name, license, license_uri, min_zoom, max_zoom, tile_size, projection, renderer)
Parameters:
  • id (str) – the map source’s id

  • name (str) – the map source’s name

  • license (str) – the map source’s license

  • license_uri (str) – the map source’s license URI

  • min_zoom (int) – the map source’s minimum zoom level

  • max_zoom (int) – the map source’s maximum zoom level

  • tile_size (int) – the map source’s tile size (in pixels)

  • projection (Champlain.MapProjection) – the map source’s projection

  • renderer (Champlain.Renderer) – the Champlain.Renderer used to render tiles

Returns:

a constructed Champlain.NetworkBboxTileSource object

Return type:

Champlain.NetworkBboxTileSource

Constructor of Champlain.NetworkBboxTileSource.

New in version 0.8.

get_api_uri()
Returns:

the URI of the API server.

Return type:

str

Gets the URI of the API server.

New in version 0.8.

load_map_data(bbox)
Parameters:

bbox (Champlain.BoundingBox) – bounding box of the requested area

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: https://api.openstreetmap.org/api/capabilities

New in version 0.10.

set_api_uri(api_uri)
Parameters:

api_uri (str) – an URI of an API server

Sets the URI of the API server.

New in version 0.8.

set_user_agent(user_agent)
Parameters:

user_agent (str) – A User-Agent string

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

New in version 0.12.16.

Property Details

Champlain.NetworkBboxTileSource.props.api_uri
Name:

api-uri

Type:

str

Default Value:

'https://www.informationfreeway.org/api/0.6'

Flags:

READABLE, WRITABLE

The URI of an OpenStreetMap API server

New in version 0.8.

Champlain.NetworkBboxTileSource.props.proxy_uri
Name:

proxy-uri

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

Used to override the default proxy for accessing the network.

New in version 0.8.

Champlain.NetworkBboxTileSource.props.state
Name:

state

Type:

Champlain.State

Default Value:

Champlain.State.NONE

Flags:

READABLE, WRITABLE

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

New in version 0.8.

Champlain.NetworkBboxTileSource.props.user_agent
Name:

user-agent

Type:

str

Default Value:

'libchamplain/0.12.21'

Flags:

WRITABLE

The HTTP user agent used for requests

New in version 0.12.16.