Champlain.MapSource¶
- Subclasses:
Champlain.MapSourceChain
,Champlain.TileCache
,Champlain.TileSource
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Next source in the loading chain |
||
r/w |
Tile renderer used to render tiles |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Champlain.MapSource(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
The
Champlain.MapSource
structure contains only private data and should be accessed using the provided APINew in version 0.4.
- fill_tile(tile)¶
- Parameters:
tile (
Champlain.Tile
) – aChamplain.Tile
Fills the tile with image data (either from cache, network or rendered locally).
New in version 0.4.
- get_column_count(zoom_level)¶
- Parameters:
zoom_level (
int
) – the zoom level- Returns:
the number of tiles in a column
- Return type:
Gets the number of tiles in a column at this zoom level for this map source.
New in version 0.4.
- get_latitude(zoom_level, y)¶
- Parameters:
- Returns:
the latitude
- Return type:
Gets the latitude corresponding to this y position in the map source’s projection.
New in version 0.4.
- get_license()¶
- Returns:
the map source’s license.
- Return type:
Gets map source’s license.
New in version 0.4.
- get_license_uri()¶
- Returns:
the map source’s license URI.
- Return type:
Gets map source’s license URI.
New in version 0.4.
- get_longitude(zoom_level, x)¶
- Parameters:
- Returns:
the longitude
- Return type:
Gets the longitude corresponding to this x position in the map source’s projection.
New in version 0.4.
- get_max_zoom_level()¶
- Returns:
the maximum zoom level this map source supports
- Return type:
Gets map source’s maximum zoom level.
New in version 0.4.
- get_meters_per_pixel(zoom_level, latitude, longitude)¶
- Parameters:
- Returns:
the meters per pixel
- Return type:
Gets meters per pixel at the position on the map using this map source’s projection.
New in version 0.4.3.
- get_min_zoom_level()¶
- Returns:
the miminum zoom level this map source supports
- Return type:
Gets map source’s minimum zoom level.
New in version 0.4.
- get_name()¶
- Returns:
the map source’s name.
- Return type:
Gets map source’s name.
New in version 0.4.
- get_next_source()¶
- Returns:
the next source in the chain.
- Return type:
Get the next source in the chain.
New in version 0.6.
- get_projection()¶
- Returns:
the map source’s projection.
- Return type:
Gets map source’s projection.
New in version 0.4.
- get_renderer()¶
- Returns:
the renderer.
- Return type:
Get the renderer used for tiles rendering.
New in version 0.8.
- get_row_count(zoom_level)¶
- Parameters:
zoom_level (
int
) – the zoom level- Returns:
the number of tiles in a row
- Return type:
Gets the number of tiles in a row at this zoom level for this map source.
New in version 0.4.
- get_tile_size()¶
- Returns:
the tile’s size (width and height) in pixels for this map source
- Return type:
Gets map source’s tile size.
New in version 0.4.
- get_x(zoom_level, longitude)¶
- Parameters:
- Returns:
the x position
- Return type:
Gets the x position on the map using this map source’s projection. (0, 0) is located at the top left.
New in version 0.4.
- get_y(zoom_level, latitude)¶
- Parameters:
- Returns:
the y position
- Return type:
Gets the y position on the map using this map source’s projection. (0, 0) is located at the top left.
New in version 0.4.
- set_next_source(next_source)¶
- Parameters:
next_source (
Champlain.MapSource
) – the nextChamplain.MapSource
in the chain
Sets the next map source in the chain.
New in version 0.6.
- set_renderer(renderer)¶
- Parameters:
renderer (
Champlain.Renderer
) – the renderer
Sets the renderer used for tiles rendering.
New in version 0.8.
- do_fill_tile(tile) virtual¶
- Parameters:
tile (
Champlain.Tile
) – aChamplain.Tile
Fills the tile with image data (either from cache, network or rendered locally).
New in version 0.4.
- do_get_id() virtual¶
- Returns:
the map source’s id.
- Return type:
Gets map source’s id.
New in version 0.4.
- do_get_license() virtual¶
- Returns:
the map source’s license.
- Return type:
Gets map source’s license.
New in version 0.4.
- do_get_license_uri() virtual¶
- Returns:
the map source’s license URI.
- Return type:
Gets map source’s license URI.
New in version 0.4.
- do_get_max_zoom_level() virtual¶
- Returns:
the maximum zoom level this map source supports
- Return type:
Gets map source’s maximum zoom level.
New in version 0.4.
- do_get_min_zoom_level() virtual¶
- Returns:
the miminum zoom level this map source supports
- Return type:
Gets map source’s minimum zoom level.
New in version 0.4.
- do_get_name() virtual¶
- Returns:
the map source’s name.
- Return type:
Gets map source’s name.
New in version 0.4.
- do_get_projection() virtual¶
- Returns:
the map source’s projection.
- Return type:
Gets map source’s projection.
New in version 0.4.
Property Details¶
- Champlain.MapSource.props.next_source¶
- Name:
next-source
- Type:
- Default Value:
- Flags:
Next source in the loading chain.
New in version 0.6.
- Champlain.MapSource.props.renderer¶
- Name:
renderer
- Type:
- Default Value:
- Flags:
Renderer used for tiles rendering.
New in version 0.8.