Champlain.NetworkTileSource

g Champlain.MapSource Champlain.MapSource Champlain.TileSource Champlain.TileSource Champlain.MapSource->Champlain.TileSource Champlain.NetworkTileSource Champlain.NetworkTileSource Champlain.TileSource->Champlain.NetworkTileSource 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, uri_format, renderer)

get_max_conns ()

get_offline ()

get_proxy_uri ()

get_uri_format ()

set_max_conns (max_conns)

set_offline (offline)

set_proxy_uri (proxy_uri)

set_uri_format (uri_format)

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

max-conns

int

r/w

The maximum number of allowed simultaneous connections for this tile source.

offline

bool

r/w

Offline

proxy-uri

str

r/w

The proxy URI to use to access network

uri-format

str

r/w/c

The URI format

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_instance

Champlain.TileSource

r

Class Details

class Champlain.NetworkTileSource(**kwargs)
Bases:

Champlain.TileSource

Abstract:

No

Structure:

Champlain.NetworkTileSourceClass

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

New in version 0.6.

classmethod new_full(id, name, license, license_uri, min_zoom, max_zoom, tile_size, projection, uri_format, renderer)
Parameters:
Returns:

a constructed Champlain.NetworkTileSource object

Return type:

Champlain.NetworkTileSource

Constructor of Champlain.NetworkTileSource.

New in version 0.4.

get_max_conns()
Returns:

the max number of allowed simultaneous connections for this tile source.

Return type:

int

Gets the max number of allowed simultaneous connections for this tile source.

New in version 0.12.14.

get_offline()
Returns:

True when the tile source is set to be offline; False otherwise.

Return type:

bool

Gets offline status.

New in version 0.6.

get_proxy_uri()
Returns:

the proxy uri

Return type:

str

Gets the proxy uri used to access network.

New in version 0.6.

get_uri_format()
Returns:

A URI format used for URI creation when downloading tiles. See Champlain.NetworkTileSource.set_uri_format() for more information.

Return type:

str

Default constructor of Champlain.NetworkTileSource.

New in version 0.6.

set_max_conns(max_conns)
Parameters:

max_conns (int) – the number of allowed simultaneous connections

Sets the max number of allowed simultaneous connections for this tile source.

Before changing this remember to verify how many simultaneous connections your tile provider allows you to make.

New in version 0.12.14.

set_offline(offline)
Parameters:

offline (bool) – True when the tile source should be offline; False otherwise

Sets offline status.

New in version 0.6.

set_proxy_uri(proxy_uri)
Parameters:

proxy_uri (str) – the proxy uri used to access network

Override the default proxy for accessing the network.

New in version 0.6.

set_uri_format(uri_format)
Parameters:

uri_format (str) – the URI format

A URI format is a URI where x, y and zoom level information have been marked for parsing and insertion. There can be an unlimited number of marked items in a URI format. They are delimited by “#” before and after the variable name. There are 4 defined variable names: X, Y, Z, and TMSY for Y in TMS coordinates.

For example, this is the OpenStreetMap URI format: “https://tile.openstreetmap.org/\#Z\#/\#X\#/\#Y\#.png”

New in version 0.4.

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.NetworkTileSource.props.max_conns
Name:

max-conns

Type:

int

Default Value:

2

Flags:

READABLE, WRITABLE

Specifies the max number of allowed simultaneous connections for this tile source.

Before changing this remember to verify how many simultaneous connections your tile provider allows you to make.

New in version 0.12.14.

Champlain.NetworkTileSource.props.offline
Name:

offline

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Specifies whether the network tile source can access network

New in version 0.4.

Champlain.NetworkTileSource.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.4.

Champlain.NetworkTileSource.props.uri_format
Name:

uri-format

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT

The uri format of the tile source, see Champlain.NetworkTileSource.set_uri_format

New in version 0.4.

Champlain.NetworkTileSource.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.