![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum ChamplainMapProjection; ChamplainMapSource; gint champlain_map_source_get_min_zoom_level (ChamplainMapSource *map_source); gint champlain_map_source_get_max_zoom_level (ChamplainMapSource *map_source); guint champlain_map_source_get_tile_size (ChamplainMapSource *map_source); guint champlain_map_source_get_x (ChamplainMapSource *map_source, gint zoom_level, gdouble longitude); guint champlain_map_source_get_y (ChamplainMapSource *map_source, gint zoom_level, gdouble latitude); gdouble champlain_map_source_get_longitude (ChamplainMapSource *map_source, gint zoom_level, guint x); gdouble champlain_map_source_get_latitude (ChamplainMapSource *map_source, gint zoom_level, guint y); guint champlain_map_source_get_row_count (ChamplainMapSource *map_source, gint zoom_level); guint champlain_map_source_get_column_count (ChamplainMapSource *map_source, gint zoom_level); void champlain_map_source_fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile); void champlain_map_source_set_name (ChamplainMapSource *map_source, const gchar *name); const gchar * champlain_map_source_get_name (ChamplainMapSource *map_source); void champlain_map_source_set_license (ChamplainMapSource *map_source, const gchar *license); const gchar * champlain_map_source_get_license (ChamplainMapSource *map_source); void champlain_map_source_set_license_uri (ChamplainMapSource *map_source, const gchar *license_uri); const gchar * champlain_map_source_get_license_uri (ChamplainMapSource *map_source); void champlain_map_source_set_projection (ChamplainMapSource *map_source, ChamplainMapProjection projection); ChamplainMapProjection champlain_map_source_get_projection (ChamplainMapSource *map_source);
"id" gchar* : Read / Write / Construct "license" gchar* : Read / Write / Construct "license-uri" gchar* : Read / Write / Construct "max-zoom-level" guint : Read / Write / Construct "min-zoom-level" guint : Read / Write / Construct "name" gchar* : Read / Write / Construct "projection" ChamplainMapProjection : Read / Write / Construct "tile-size" guint : Read / Write / Construct
ChamplainTiles come from map sources which are represented by ChamplainMapSource. This is should be considered an abstract type as it does nothing of interest.
When loading new tiles, ChamplainView calls champlain_map_source_get_tile on the current ChamplainMapSource passing it a ChamplainTile to be filled with the image. ChamplainMapSources should check with ChamplainCache if the image is already locally available with champlain_cache_fill_tile.
typedef enum { CHAMPLAIN_MAP_PROJECTION_MERCATOR } ChamplainMapProjection;
gint champlain_map_source_get_min_zoom_level (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the miminum zoom level this map source supports |
Since 0.4
gint champlain_map_source_get_max_zoom_level (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the maximum zoom level this map source supports |
Since 0.4
guint champlain_map_source_get_tile_size (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the tile's size (width and height) in pixels for this map source |
Since 0.4
guint champlain_map_source_get_x (ChamplainMapSource *map_source, gint zoom_level, gdouble longitude);
|
a ChamplainMapSource |
|
the zoom level |
|
a longitude |
Returns : |
the x position on the map using this map source's projection. (0, 0) is located at the top left. |
Since 0.4
guint champlain_map_source_get_y (ChamplainMapSource *map_source, gint zoom_level, gdouble latitude);
|
a ChamplainMapSource |
|
the zoom level |
|
a latitude |
Returns : |
the y position on the map using this map source's projection. (0, 0) is located at the top left. |
Since 0.4
gdouble champlain_map_source_get_longitude (ChamplainMapSource *map_source, gint zoom_level, guint x);
|
a ChamplainMapSource |
|
the zoom level |
|
a x position |
Returns : |
the longitude corresponding to this x position in the map source's projection. |
Since 0.4
gdouble champlain_map_source_get_latitude (ChamplainMapSource *map_source, gint zoom_level, guint y);
|
a ChamplainMapSource |
|
the zoom level |
|
a y position |
Returns : |
the latitude corresponding to this y position in the map source's projection. |
Since 0.4
guint champlain_map_source_get_row_count (ChamplainMapSource *map_source, gint zoom_level);
|
a ChamplainMapSource |
|
the zoom level |
Returns : |
the number of tiles in a row at this zoom level for this map source. |
Since 0.4
guint champlain_map_source_get_column_count (ChamplainMapSource *map_source, gint zoom_level);
|
a ChamplainMapSource |
|
the zoom level |
Returns : |
the number of tiles in a column at this zoom level for this map source. |
Since 0.4
void champlain_map_source_fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
Fills the tile with image data (either from cache, network or rendered locally).
|
a ChamplainMapSource |
|
A ChamplainTile |
Since 0.4
void champlain_map_source_set_name (ChamplainMapSource *map_source, const gchar *name);
Sets the map source's name.
|
a ChamplainMapSource |
|
a name |
Since 0.4
const gchar * champlain_map_source_get_name (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the map source's name. |
Since 0.4
void champlain_map_source_set_license (ChamplainMapSource *map_source, const gchar *license);
Sets the map source's license.
|
a ChamplainMapSource |
|
the licence |
Since 0.4
const gchar * champlain_map_source_get_license (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the map source's license. |
Since 0.4
void champlain_map_source_set_license_uri (ChamplainMapSource *map_source, const gchar *license_uri);
Sets the map source's license URI.
|
a ChamplainMapSource |
|
the licence URI |
Since 0.4
const gchar * champlain_map_source_get_license_uri (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the map source's license URI. |
Since 0.4
void champlain_map_source_set_projection (ChamplainMapSource *map_source, ChamplainMapProjection projection);
Sets the map source's projection.
|
a ChamplainMapSource |
|
a ChamplainMapProjection |
Since 0.4
ChamplainMapProjection champlain_map_source_get_projection (ChamplainMapSource *map_source);
|
a ChamplainMapSource |
Returns : |
the map source's projection. |
Since 0.4
"id"
property"id" gchar* : Read / Write / Construct
The name of the map source
Default value: ""
Since 0.4
"license"
property"license" gchar* : Read / Write / Construct
The usage license of the map source
Default value: ""
Since 0.4
"license-uri"
property"license-uri" gchar* : Read / Write / Construct
The usage license's uri for more information
Default value: ""
Since 0.4
"max-zoom-level"
property"max-zoom-level" guint : Read / Write / Construct
The maximum zoom level
Allowed values: <= 50
Default value: 18
Since 0.4
"min-zoom-level"
property"min-zoom-level" guint : Read / Write / Construct
The minimum zoom level
Allowed values: <= 50
Default value: 0
Since 0.4
"name"
property"name" gchar* : Read / Write / Construct
The name of the map source
Default value: ""
Since 0.4
"projection"
property"projection" ChamplainMapProjection : Read / Write / Construct
The map projection of the map source
Default value: CHAMPLAIN_MAP_PROJECTION_MERCATOR
Since 0.4
"tile-size"
property"tile-size" guint : Read / Write / Construct
The tile size of the map source
Allowed values: <= 2048
Default value: 256
Since 0.4