![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
ChamplainNetworkMapSource; ChamplainNetworkMapSource* champlain_network_map_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, const gchar *uri_format); gchar * champlain_network_map_source_get_tile_uri (ChamplainNetworkMapSource *source, gint x, gint y, gint z); void champlain_network_map_source_set_uri_format (ChamplainNetworkMapSource *source, const gchar *uri_format); void champlain_network_map_source_fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
"offline" gboolean : Read / Write "proxy-uri" gchar* : Read / Write "uri-format" gchar* : Read / Write / Construct
This object is specialized for map tiles that can be downloaded from a web server. This include all web based map services such as OpenStreetMap, Google Maps, Yahoo Maps and more. This object contains all mechanisms necessary to download and cache (with the help of ChamplainCache) tiles.
Some preconfigured network map sources are built-in this library, see ChamplainMapSourceFactory.
ChamplainNetworkMapSource* champlain_network_map_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, const gchar *uri_format);
|
|
|
the map source's name |
|
the map source's license |
|
the map source's license URI |
|
the map source's minimum zoom level |
|
the map source's maximum zoom level |
|
the map source's tile size (in pixels) |
|
the map source's projection |
|
the URI to fetch the tiles from, see champlain_network_map_source_set_uri_format |
Returns : |
a constructed ChamplainNetworkMapSource |
Since 0.4
gchar * champlain_network_map_source_get_tile_uri (ChamplainNetworkMapSource *source, gint x, gint y, gint z);
|
the ChamplainNetworkMapSource |
|
the x position of the tile |
|
the y position of the tile |
|
the zool level of the tile |
Returns : |
a contruscted URI with the given parameters based on the map source's URI format. |
Since 0.4
void champlain_network_map_source_set_uri_format (ChamplainNetworkMapSource *source, const gchar *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 3 defined variable names: X, Y, and Z.
For example, this is the OpenStreetMap URI format: "http://tile.openstreetmap.org/Z#/X#/Y#.png"
|
the ChamplainNetworkMapSource |
|
the URI format |
Since 0.4
void champlain_network_map_source_fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
Fills the passed tile with image data. If not in ChamplainCache, this function will initiate an async download of the image at the map source's URI format. Once done, the tile's state will be set to CHAMPLAIN_STATE_DONE.
|
the ChamplainNetworkMapSource |
|
the ChamplainTile |
Since 0.4
"offline"
property"offline" gboolean : Read / Write
If the network map source can access network
Default value: FALSE
Since 0.4
"proxy-uri"
property"proxy-uri" gchar* : Read / Write
The proxy uri to use to access network
Default value: ""
Since 0.4
"uri-format"
property"uri-format" gchar* : Read / Write / Construct
The uri format for the map source, see champlain_network_map_source_set_uri_format
Default value: ""
Since 0.4