Commit a2dea0eeb45f145b7d8869111abb7c4d57a9f76c
- Diff rendering mode:
- inline
- side by side
champlain/champlain-bounding-box.h
(4 / 0)
|   | |||
| 33 | 33 | ||
| 34 | 34 | /** | |
| 35 | 35 | * ChamplainBoundingBox: | |
| 36 | * @left: left coordinate | ||
| 37 | * @bottom: bottom coordinate | ||
| 38 | * @right: right coordinate | ||
| 39 | * @top: top coordinate | ||
| 36 | 40 | * | |
| 37 | 41 | * Defines the area of a ChamplainMapDataSource that contains data. | |
| 38 | 42 | * |
champlain/champlain-error-tile-source.c
(19 / 0)
|   | |||
| 17 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 18 | 18 | */ | |
| 19 | 19 | ||
| 20 | /** | ||
| 21 | * SECTION:champlain-error-tile-source | ||
| 22 | * @short_description: A map source displaying error tiles | ||
| 23 | * | ||
| 24 | * #ChamplainErrorTileSource always fills a tile with error tile image. | ||
| 25 | * Applications can create their own error tile sources to change the look | ||
| 26 | * of the error tile. | ||
| 27 | */ | ||
| 28 | |||
| 20 | 29 | #include "champlain-error-tile-source.h" | |
| 21 | 30 | ||
| 22 | 31 | G_DEFINE_TYPE (ChamplainErrorTileSource, champlain_error_tile_source, CHAMPLAIN_TYPE_TILE_SOURCE); | |
| … | … | ||
| 74 | 74 | priv->error_actor = NULL; | |
| 75 | 75 | } | |
| 76 | 76 | ||
| 77 | /** | ||
| 78 | * champlain_error_tile_source_new_full: | ||
| 79 | * @tile_size: size of the error tile | ||
| 80 | * | ||
| 81 | * Constructor of #ChamplainErrorTileSource. | ||
| 82 | * | ||
| 83 | * Returns: a constructed #ChamplainErrorTileSource | ||
| 84 | * | ||
| 85 | * Since: 0.6 | ||
| 86 | */ | ||
| 77 | 87 | ChamplainErrorTileSource* champlain_error_tile_source_new_full (guint tile_size) | |
| 78 | 88 | { | |
| 79 | 89 | return g_object_new (CHAMPLAIN_TYPE_ERROR_TILE_SOURCE, "tile-size", tile_size, NULL); |
champlain/champlain-file-cache.c
(98 / 0)
|   | |||
| 17 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 18 | 18 | */ | |
| 19 | 19 | ||
| 20 | /** | ||
| 21 | * SECTION:champlain-file-cache | ||
| 22 | * @short_description: Stores and loads cached tiles from the file system | ||
| 23 | * | ||
| 24 | * #ChamplainFileCache is a map source that stores and retrieves tiles from the | ||
| 25 | * file system. It can be temporary (deleted when the object is destroyed) or | ||
| 26 | * permanent. Tiles most frequently loaded gain in "popularity". This popularity | ||
| 27 | * is taken into account when purging the cache. | ||
| 28 | */ | ||
| 29 | |||
| 20 | 30 | #define DEBUG_FLAG CHAMPLAIN_DEBUG_CACHE | |
| 21 | 31 | #include "champlain-debug.h" | |
| 22 | 32 | ||
| … | … | ||
| 329 | 329 | object_class->set_property = champlain_file_cache_set_property; | |
| 330 | 330 | object_class->constructed = champlain_file_cache_constructed; | |
| 331 | 331 | ||
| 332 | /** | ||
| 333 | * ChamplainFileCache:size-limit: | ||
| 334 | * | ||
| 335 | * The cache size limit in bytes. | ||
| 336 | * | ||
| 337 | * Note: this new value will not be applied until you call #champlain_cache_purge | ||
| 338 | * | ||
| 339 | * Since: 0.4 | ||
| 340 | */ | ||
| 332 | 341 | pspec = g_param_spec_uint ("size-limit", | |
| 333 | 342 | "Size Limit", | |
| 334 | 343 | "The cache's size limit (Mb)", | |
| … | … | ||
| 347 | 347 | G_PARAM_CONSTRUCT | G_PARAM_READWRITE); | |
| 348 | 348 | g_object_class_install_property (object_class, PROP_SIZE_LIMIT, pspec); | |
| 349 | 349 | ||
| 350 | /** | ||
| 351 | * ChamplainFileCache:cache-dir: | ||
| 352 | * | ||
| 353 | * The directory where the tile database is stored. | ||
| 354 | * | ||
| 355 | * Since: 0.6 | ||
| 356 | */ | ||
| 350 | 357 | pspec = g_param_spec_string ("cache-dir", | |
| 351 | 358 | "Cache Directory", | |
| 352 | 359 | "The directory of the cache", | |
| … | … | ||
| 383 | 383 | priv->stmt_update = NULL; | |
| 384 | 384 | } | |
| 385 | 385 | ||
| 386 | /** | ||
| 387 | * champlain_file_cache_new: | ||
| 388 | * | ||
| 389 | * Default constructor of #ChamplainFileCache. | ||
| 390 | * | ||
| 391 | * Returns: a constructed permanent cache of maximal size 100000000 B inside | ||
| 392 | * ~/.cache/champlain. | ||
| 393 | * | ||
| 394 | * Since: 0.6 | ||
| 395 | */ | ||
| 386 | 396 | ChamplainFileCache* champlain_file_cache_new (void) | |
| 387 | 397 | { | |
| 388 | 398 | gchar *cache_path; | |
| … | … | ||
| 406 | 406 | return cache; | |
| 407 | 407 | } | |
| 408 | 408 | ||
| 409 | /** | ||
| 410 | * champlain_file_cache_new_full: | ||
| 411 | * @size_limit: maximal size of the cache in bytes | ||
| 412 | * @cache_dir: the directory where the cache is created. For temporary caches | ||
| 413 | * one more directory with random name is created inside this directory. | ||
| 414 | * When cache_dir == NULL, a cache in ~/.cache/champlain is used for permanent | ||
| 415 | * caches and /tmp for temporary caches. | ||
| 416 | * @persistent: if TRUE, the cache is persistent; otherwise the cache is | ||
| 417 | * temporary and will be deleted when the cache object is destructed. | ||
| 418 | * | ||
| 419 | * Constructor of #ChamplainFileCache. | ||
| 420 | * | ||
| 421 | * Returns: a constructed #ChamplainFileCache | ||
| 422 | * | ||
| 423 | * Since: 0.6 | ||
| 424 | */ | ||
| 409 | 425 | ChamplainFileCache* champlain_file_cache_new_full (guint size_limit, | |
| 410 | 426 | const gchar *cache_dir, gboolean persistent) | |
| 411 | 427 | { | |
| … | … | ||
| 431 | 431 | return cache; | |
| 432 | 432 | } | |
| 433 | 433 | ||
| 434 | /** | ||
| 435 | * champlain_file_cache_get_size_limit: | ||
| 436 | * @file_cache: a #ChamplainCache | ||
| 437 | * | ||
| 438 | * Gets the cache size limit in bytes. | ||
| 439 | * | ||
| 440 | * Returns: size limit | ||
| 441 | * | ||
| 442 | * Since: 0.4 | ||
| 443 | */ | ||
| 434 | 444 | guint | |
| 435 | 445 | champlain_file_cache_get_size_limit (ChamplainFileCache *file_cache) | |
| 436 | 446 | { | |
| … | … | ||
| 450 | 450 | return priv->size_limit; | |
| 451 | 451 | } | |
| 452 | 452 | ||
| 453 | /** | ||
| 454 | * champlain_file_cache_get_cache_dir: | ||
| 455 | * @file_cache: a #ChamplainCache | ||
| 456 | * | ||
| 457 | * Gets the directory where the cache database is stored. | ||
| 458 | * | ||
| 459 | * Returns: the directory | ||
| 460 | * | ||
| 461 | * Since: 0.6 | ||
| 462 | */ | ||
| 453 | 463 | const gchar * | |
| 454 | 464 | champlain_file_cache_get_cache_dir (ChamplainFileCache *file_cache) | |
| 455 | 465 | { | |
| … | … | ||
| 469 | 469 | return priv->cache_dir; | |
| 470 | 470 | } | |
| 471 | 471 | ||
| 472 | /** | ||
| 473 | * champlain_file_cache_set_size_limit: | ||
| 474 | * @file_cache: a #ChamplainCache | ||
| 475 | * @size_limit: the cache limit in bytes | ||
| 476 | * | ||
| 477 | * Sets the cache size limit in bytes. | ||
| 478 | * | ||
| 479 | * Since: 0.4 | ||
| 480 | */ | ||
| 472 | 481 | void | |
| 473 | 482 | champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache, | |
| 474 | 483 | guint size_limit) | |
| … | … | ||
| 863 | 863 | return FALSE; | |
| 864 | 864 | } | |
| 865 | 865 | ||
| 866 | /** | ||
| 867 | * champlain_file_cache_purge_on_idle: | ||
| 868 | * @file_cache: a #ChamplainCache | ||
| 869 | * | ||
| 870 | * Purge the cache from the less popular tiles until cache's size limit is reached. | ||
| 871 | * This is a non blocking call as the purge will happen when the application is idle | ||
| 872 | * | ||
| 873 | * Since: 0.4 | ||
| 874 | */ | ||
| 866 | 875 | void | |
| 867 | 876 | champlain_file_cache_purge_on_idle (ChamplainFileCache *file_cache) | |
| 868 | 877 | { | |
| … | … | ||
| 879 | 879 | g_idle_add (purge_on_idle, file_cache); | |
| 880 | 880 | } | |
| 881 | 881 | ||
| 882 | /** | ||
| 883 | * champlain_file_cache_purge: | ||
| 884 | * @file_cache: a #ChamplainCache | ||
| 885 | * | ||
| 886 | * Purge the cache from the less popular tiles until cache's size limit is reached. | ||
| 887 | * | ||
| 888 | * Since: 0.4 | ||
| 889 | */ | ||
| 882 | 890 | void | |
| 883 | 891 | champlain_file_cache_purge (ChamplainFileCache *file_cache) | |
| 884 | 892 | { |
champlain/champlain-map-data-source.c
(1 / 1)
|   | |||
| 193 | 193 | * champlain_map_data_source_get_map_data: | |
| 194 | 194 | * @data_source: a #ChamplainMapDataSource | |
| 195 | 195 | * | |
| 196 | * Returns the #MemphisMap of the data source or NULL. | ||
| 196 | * Returns: the #MemphisMap of the data source or NULL. | ||
| 197 | 197 | * | |
| 198 | 198 | * Since: 0.6 | |
| 199 | 199 | */ |
champlain/champlain-map-source-chain.c
(42 / 2)
|   | |||
| 16 | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 17 | 17 | */ | |
| 18 | 18 | ||
| 19 | /** | ||
| 20 | * SECTION:champlain-map-source-chain | ||
| 21 | * @short_description: A map source simplifying creation of source chains | ||
| 22 | * | ||
| 23 | * This map source simplifies creation of map chains by providing two | ||
| 24 | * functions for their creation and modification in a stack-like manner: | ||
| 25 | * champlain_map_source_chain_push() and champlain_map_source_chain_pop(). | ||
| 26 | * For instance, to create a chain consisting of #ChamplainFileCache, | ||
| 27 | * #ChamplainNetworkTileSource and #ChamplainErrorTileSource, the map | ||
| 28 | * sources have to be pushed into the chain in the reverse order starting | ||
| 29 | * from #ChamplainErrorTileSource. After its creation, #ChamplainMapSourceChain | ||
| 30 | * behaves as a chain of map sources it contains. | ||
| 31 | */ | ||
| 32 | |||
| 19 | 33 | #include "champlain-map-source-chain.h" | |
| 20 | 34 | #include "champlain-tile-cache.h" | |
| 21 | 35 | #include "champlain-tile-source.h" | |
| … | … | ||
| 63 | 63 | ChamplainMapSourceChainPrivate *priv = GET_PRIVATE(object); | |
| 64 | 64 | ||
| 65 | 65 | while (priv->stack_top) | |
| 66 | champlain_map_source_chain_pop_map_source (source_chain); | ||
| 66 | champlain_map_source_chain_pop (source_chain); | ||
| 67 | 67 | ||
| 68 | 68 | G_OBJECT_CLASS (champlain_map_source_chain_parent_class)->dispose (object); | |
| 69 | 69 | } | |
| … | … | ||
| 105 | 105 | priv->sig_handler_id = 0; | |
| 106 | 106 | } | |
| 107 | 107 | ||
| 108 | /** | ||
| 109 | * champlain_map_source_chain_new: | ||
| 110 | * | ||
| 111 | * Constructor of #ChamplainMapSourceChain. | ||
| 112 | * | ||
| 113 | * Returns: a new empty #ChamplainMapSourceChain. | ||
| 114 | * | ||
| 115 | * Since: 0.6 | ||
| 116 | */ | ||
| 108 | 117 | ChamplainMapSourceChain* champlain_map_source_chain_new (void) | |
| 109 | 118 | { | |
| 110 | 119 | return g_object_new (CHAMPLAIN_TYPE_MAP_SOURCE_CHAIN, NULL); | |
| … | … | ||
| 242 | 242 | g_signal_emit_by_name (source_chain, "reload-tiles", NULL); | |
| 243 | 243 | } | |
| 244 | 244 | ||
| 245 | /** | ||
| 246 | * champlain_map_source_chain_push: | ||
| 247 | * @source_chain: a #ChamplainMapSourceChain | ||
| 248 | * @map_source: the #ChamplainMapSource to be pushed into the chain | ||
| 249 | * | ||
| 250 | * Pushes a map source into the chain. | ||
| 251 | * | ||
| 252 | * Since: 0.6 | ||
| 253 | */ | ||
| 245 | 254 | void champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain, ChamplainMapSource *map_source) | |
| 246 | 255 | { | |
| 247 | 256 | ChamplainMapSourceChainPrivate *priv = GET_PRIVATE(source_chain); | |
| … | … | ||
| 288 | 288 | G_CALLBACK (reload_tiles_cb), source_chain); | |
| 289 | 289 | } | |
| 290 | 290 | ||
| 291 | void champlain_map_source_chain_pop_map_source (ChamplainMapSourceChain *source_chain) | ||
| 291 | /** | ||
| 292 | * champlain_map_source_chain_pop: | ||
| 293 | * @source_chain: a #ChamplainMapSourceChain | ||
| 294 | * | ||
| 295 | * Pops the map source from the top of the stack from the chain. | ||
| 296 | * | ||
| 297 | * Since: 0.6 | ||
| 298 | */ | ||
| 299 | void champlain_map_source_chain_pop (ChamplainMapSourceChain *source_chain) | ||
| 292 | 300 | { | |
| 293 | 301 | ChamplainMapSourceChainPrivate *priv = GET_PRIVATE(source_chain); | |
| 294 | 302 | ChamplainMapSource *old_stack_top = priv->stack_top; |
champlain/champlain-map-source-chain.h
(1 / 1)
|   | |||
| 54 | 54 | ChamplainMapSourceChain* champlain_map_source_chain_new (void); | |
| 55 | 55 | ||
| 56 | 56 | void champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain, ChamplainMapSource *map_source); | |
| 57 | void champlain_map_source_chain_pop_map_source (ChamplainMapSourceChain *source_chain); | ||
| 57 | void champlain_map_source_chain_pop (ChamplainMapSourceChain *source_chain); | ||
| 58 | 58 | ||
| 59 | 59 | G_END_DECLS | |
| 60 | 60 |
champlain/champlain-map-source-factory.c
(13 / 1)
|   | |||
| 18 | 18 | ||
| 19 | 19 | /** | |
| 20 | 20 | * SECTION:champlain-map-source-factory | |
| 21 | * @short_description: Manages #ChamplainMapSource | ||
| 21 | * @short_description: Manages #ChamplainMapSource instances | ||
| 22 | 22 | * | |
| 23 | 23 | * This factory manages the create of #ChamplainMapSource. It contains names | |
| 24 | 24 | * and constructor functions for each available map sources in libchamplain. | |
| … | … | ||
| 328 | 328 | ||
| 329 | 329 | /** | |
| 330 | 330 | * champlain_map_source_factory_dup_list: | |
| 331 | * @factory: the Factory | ||
| 331 | 332 | * | |
| 332 | 333 | * Returns: the list of registered map sources, the items should not be freed, | |
| 333 | 334 | * the list should be freed with #g_slist_free. | |
| … | … | ||
| 373 | 373 | return NULL; | |
| 374 | 374 | } | |
| 375 | 375 | ||
| 376 | /** | ||
| 377 | * champlain_map_source_factory_create_cached_source: | ||
| 378 | * @factory: the Factory | ||
| 379 | * @id: the wanted map source id | ||
| 380 | * | ||
| 381 | * Returns: a ready to use #ChamplainMapSourceChain consisting of | ||
| 382 | * #ChamplainFileCache, #ChamplainMapSource matching the given name, and | ||
| 383 | * #ChamplainErrorTileSource. | ||
| 384 | * | ||
| 385 | * Since: 0.6 | ||
| 386 | */ | ||
| 376 | 387 | ChamplainMapSource * champlain_map_source_factory_create_cached_source (ChamplainMapSourceFactory *factory, | |
| 377 | 388 | const gchar *id) | |
| 378 | 389 | { |
champlain/champlain-map-source.c
(249 / 2)
|   | |||
| 16 | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 17 | 17 | */ | |
| 18 | 18 | ||
| 19 | /** | ||
| 20 | * SECTION:champlain-map-source | ||
| 21 | * @short_description: A base class for map sources | ||
| 22 | * | ||
| 23 | * #ChamplainTile objects come from map sources which are represented by | ||
| 24 | * #ChamplainMapSource. This is should be considered an abstract | ||
| 25 | * type as it does nothing of interest. | ||
| 26 | * | ||
| 27 | * When loading new tiles, #ChamplainView calls champlain_map_source_fill_tile() | ||
| 28 | * on the current #ChamplainMapSource passing it a #ChamplainTile to be filled | ||
| 29 | * with the image. | ||
| 30 | * | ||
| 31 | * Apart from being a base class of all map sources, #ChamplainMapSource | ||
| 32 | * also supports cooperation of multiple map sources by arranging them into | ||
| 33 | * chains. Every map source has the #ChamplainMapSource::next-source property | ||
| 34 | * that determines the next map source in the chain. When a function of | ||
| 35 | * a #ChamplainMapSource object is invoked, the map source may decide to | ||
| 36 | * delegate the work to the next map source in the chain by invoking the | ||
| 37 | * same function on it. | ||
| 38 | |||
| 39 | * To undertand the concept of chains, consider for instance a chain | ||
| 40 | * consisting of #ChamplainFileCache whose next source is | ||
| 41 | * #ChamplainNetworkTileSource whose next source is #ChamplainErrorTileSource. | ||
| 42 | * When champlain_map_source_fill_tile() is called on the first object of the | ||
| 43 | * chain, #ChamplainFileCache, the cache checks whether it contains the | ||
| 44 | * requested tile in its database. If it does, it returns the tile; otherwise, | ||
| 45 | * it calls champlain_map_source_fill_tile() on the next source in the chain | ||
| 46 | * (#ChamplainNetworkTileSource). The network tile source loads the tile | ||
| 47 | * from the network. When successful, it returns the tile; otherwise it requests | ||
| 48 | * the tile from the next source in the chain (#ChamplainErrorTileSource). | ||
| 49 | * #ChamplainErrorTileSource always generates an error tile, no matter what | ||
| 50 | * its next source is. | ||
| 51 | */ | ||
| 52 | |||
| 19 | 53 | #include "champlain-map-source.h" | |
| 20 | 54 | ||
| 21 | 55 | #include <math.h> | |
| … | … | ||
| 170 | 170 | klass->get_min_zoom_level = NULL; | |
| 171 | 171 | klass->get_max_zoom_level = NULL; | |
| 172 | 172 | klass->get_tile_size = NULL; | |
| 173 | klass->get_projection = NULL; | ||
| 173 | 174 | ||
| 174 | 175 | klass->fill_tile = NULL; | |
| 175 | 176 | ||
| 177 | /** | ||
| 178 | * ChamplainMapSource:next-source: | ||
| 179 | * | ||
| 180 | * Next source in the loading chain. | ||
| 181 | * | ||
| 182 | * Since: 0.6 | ||
| 183 | */ | ||
| 176 | 184 | pspec = g_param_spec_object ("next-source", | |
| 177 | 185 | "Next Source", | |
| 178 | 186 | "Next source in the loading chain", | |
| … | … | ||
| 192 | 192 | * ChamplainMapSource::reload-tiles: | |
| 193 | 193 | * @map_source: the #ChamplainMapSource that received the signal | |
| 194 | 194 | * | |
| 195 | * The ::reload-tiles signal is emitted when the map source changed | ||
| 196 | * its style or data | ||
| 195 | * The ChamplainMapSource::reload-tiles signal is emitted when the map source | ||
| 196 | * changed its style or data | ||
| 197 | 197 | * | |
| 198 | 198 | * Since: 0.6 | |
| 199 | 199 | */ | |
| … | … | ||
| 212 | 212 | priv->sig_handler_id = 0; | |
| 213 | 213 | } | |
| 214 | 214 | ||
| 215 | /** | ||
| 216 | * champlain_map_source_get_next_source: | ||
| 217 | * @map_source: a #ChamplainMapSource | ||
| 218 | * | ||
| 219 | * Get the next source in the chain. | ||
| 220 | * | ||
| 221 | * Returns: the next source in the chain. | ||
| 222 | * | ||
| 223 | * Since: 0.6 | ||
| 224 | */ | ||
| 215 | 225 | ChamplainMapSource * | |
| 216 | 226 | champlain_map_source_get_next_source (ChamplainMapSource *map_source) | |
| 217 | 227 | { | |
| … | … | ||
| 238 | 238 | g_signal_emit_by_name (self, "reload-tiles", NULL); | |
| 239 | 239 | } | |
| 240 | 240 | ||
| 241 | /** | ||
| 242 | * champlain_map_source_set_next_source: | ||
| 243 | * @map_source: a #ChamplainMapSource | ||
| 244 | * @next_source: the next #ChamplainMapSource in the chain | ||
| 245 | * | ||
| 246 | * Sets the next map source in the chain. | ||
| 247 | * | ||
| 248 | * Since: 0.6 | ||
| 249 | */ | ||
| 241 | 250 | void | |
| 242 | 251 | champlain_map_source_set_next_source (ChamplainMapSource *map_source, | |
| 243 | 252 | ChamplainMapSource *next_source) | |
| … | … | ||
| 278 | 278 | g_object_notify (G_OBJECT (map_source), "next-source"); | |
| 279 | 279 | } | |
| 280 | 280 | ||
| 281 | /** | ||
| 282 | * champlain_map_source_get_id: | ||
| 283 | * @map_source: a #ChamplainMapSource | ||
| 284 | * | ||
| 285 | * Gets map source's id. | ||
| 286 | * | ||
| 287 | * Returns: the map source's id. | ||
| 288 | * | ||
| 289 | * Since: 0.4 | ||
| 290 | */ | ||
| 281 | 291 | const gchar * | |
| 282 | 292 | champlain_map_source_get_id (ChamplainMapSource *map_source) | |
| 283 | 293 | { | |
| … | … | ||
| 296 | 296 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_id (map_source); | |
| 297 | 297 | } | |
| 298 | 298 | ||
| 299 | /** | ||
| 300 | * champlain_map_source_get_name: | ||
| 301 | * @map_source: a #ChamplainMapSource | ||
| 302 | * | ||
| 303 | * Gets map source's name. | ||
| 304 | * | ||
| 305 | * Returns: the map source's name. | ||
| 306 | * | ||
| 307 | * Since: 0.4 | ||
| 308 | */ | ||
| 299 | 309 | const gchar * | |
| 300 | 310 | champlain_map_source_get_name (ChamplainMapSource *map_source) | |
| 301 | 311 | { | |
| … | … | ||
| 314 | 314 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_name (map_source); | |
| 315 | 315 | } | |
| 316 | 316 | ||
| 317 | /** | ||
| 318 | * champlain_map_source_get_license: | ||
| 319 | * @map_source: a #ChamplainMapSource | ||
| 320 | * | ||
| 321 | * Gets map source's license. | ||
| 322 | * | ||
| 323 | * Returns: the map source's license. | ||
| 324 | * | ||
| 325 | * Since: 0.4 | ||
| 326 | */ | ||
| 317 | 327 | const gchar * | |
| 318 | 328 | champlain_map_source_get_license (ChamplainMapSource *map_source) | |
| 319 | 329 | { | |
| … | … | ||
| 332 | 332 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_license (map_source); | |
| 333 | 333 | } | |
| 334 | 334 | ||
| 335 | /** | ||
| 336 | * champlain_map_source_get_license_uri: | ||
| 337 | * @map_source: a #ChamplainMapSource | ||
| 338 | * | ||
| 339 | * Gets map source's license URI. | ||
| 340 | * | ||
| 341 | * Returns: the map source's license URI. | ||
| 342 | * | ||
| 343 | * Since: 0.4 | ||
| 344 | */ | ||
| 335 | 345 | const gchar * | |
| 336 | 346 | champlain_map_source_get_license_uri (ChamplainMapSource *map_source) | |
| 337 | 347 | { | |
| … | … | ||
| 350 | 350 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_license_uri (map_source); | |
| 351 | 351 | } | |
| 352 | 352 | ||
| 353 | /** | ||
| 354 | * champlain_map_source_get_min_zoom_level: | ||
| 355 | * @map_source: a #ChamplainMapSource | ||
| 356 | * | ||
| 357 | * Gets map source's minimum zoom level. | ||
| 358 | * | ||
| 359 | * Returns: the miminum zoom level this map source supports | ||
| 360 | * | ||
| 361 | * Since: 0.4 | ||
| 362 | */ | ||
| 353 | 363 | guint | |
| 354 | 364 | champlain_map_source_get_min_zoom_level (ChamplainMapSource *map_source) | |
| 355 | 365 | { | |
| … | … | ||
| 368 | 368 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_min_zoom_level (map_source); | |
| 369 | 369 | } | |
| 370 | 370 | ||
| 371 | /** | ||
| 372 | * champlain_map_source_get_max_zoom_level: | ||
| 373 | * @map_source: a #ChamplainMapSource | ||
| 374 | * | ||
| 375 | * Gets map source's maximum zoom level. | ||
| 376 | * | ||
| 377 | * Returns: the maximum zoom level this map source supports | ||
| 378 | * | ||
| 379 | * Since: 0.4 | ||
| 380 | */ | ||
| 371 | 381 | guint | |
| 372 | 382 | champlain_map_source_get_max_zoom_level (ChamplainMapSource *map_source) | |
| 373 | 383 | { | |
| … | … | ||
| 386 | 386 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_max_zoom_level (map_source); | |
| 387 | 387 | } | |
| 388 | 388 | ||
| 389 | /** | ||
| 390 | * champlain_map_source_get_tile_size: | ||
| 391 | * @map_source: a #ChamplainMapSource | ||
| 392 | * | ||
| 393 | * Gets map source's tile size. | ||
| 394 | * | ||
| 395 | * Returns: the tile's size (width and height) in pixels for this map source | ||
| 396 | * | ||
| 397 | * Since: 0.4 | ||
| 398 | */ | ||
| 389 | 399 | guint | |
| 390 | 400 | champlain_map_source_get_tile_size (ChamplainMapSource *map_source) | |
| 391 | 401 | { | |
| … | … | ||
| 404 | 404 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_tile_size (map_source); | |
| 405 | 405 | } | |
| 406 | 406 | ||
| 407 | /** | ||
| 408 | * champlain_map_source_get_projection: | ||
| 409 | * @map_source: a #ChamplainMapSource | ||
| 410 | * | ||
| 411 | * Gets map source's projection. | ||
| 412 | * | ||
| 413 | * Returns: the map source's projection. | ||
| 414 | * | ||
| 415 | * Since: 0.4 | ||
| 416 | */ | ||
| 417 | ChamplainMapProjection | ||
| 418 | champlain_map_source_get_projection (ChamplainMapSource *map_source) | ||
| 419 | { | ||
| 420 | g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), CHAMPLAIN_MAP_PROJECTION_MERCATOR); | ||
| 421 | |||
| 422 | return CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_projection (map_source); | ||
| 423 | } | ||
| 424 | |||
| 425 | /** | ||
| 426 | * champlain_map_source_get_x: | ||
| 427 | * @map_source: a #ChamplainMapSource | ||
| 428 | * @zoom_level: the zoom level | ||
| 429 | * @longitude: a longitude | ||
| 430 | * | ||
| 431 | * Gets the x position on the map using this map source's projection. | ||
| 432 | * (0, 0) is located at the top left. | ||
| 433 | * | ||
| 434 | * Returns: the x position | ||
| 435 | * | ||
| 436 | * Since: 0.4 | ||
| 437 | */ | ||
| 407 | 438 | guint | |
| 408 | 439 | champlain_map_source_get_x (ChamplainMapSource *map_source, | |
| 409 | 440 | guint zoom_level, | |
| … | … | ||
| 446 | 446 | return ((longitude + 180.0) / 360.0 * pow (2.0, zoom_level)) * champlain_map_source_get_tile_size (map_source); | |
| 447 | 447 | } | |
| 448 | 448 | ||
| 449 | /** | ||
| 450 | * champlain_map_source_get_y: | ||
| 451 | * @map_source: a #ChamplainMapSource | ||
| 452 | * @zoom_level: the zoom level | ||
| 453 | * @latitude: a latitude | ||
| 454 | * | ||
| 455 | * Gets the y position on the map using this map source's projection. | ||
| 456 | * (0, 0) is located at the top left. | ||
| 457 | * | ||
| 458 | * Returns: the y position | ||
| 459 | * | ||
| 460 | * Since: 0.4 | ||
| 461 | */ | ||
| 449 | 462 | guint | |
| 450 | 463 | champlain_map_source_get_y (ChamplainMapSource *map_source, | |
| 451 | 464 | guint zoom_level, | |
| … | … | ||
| 472 | 472 | M_PI) / 2.0 * pow (2.0, zoom_level)) * champlain_map_source_get_tile_size (map_source); | |
| 473 | 473 | } | |
| 474 | 474 | ||
| 475 | /** | ||
| 476 | * champlain_map_source_get_longitude: | ||
| 477 | * @map_source: a #ChamplainMapSource | ||
| 478 | * @zoom_level: the zoom level | ||
| 479 | * @x: a x position | ||
| 480 | * | ||
| 481 | * Gets the longitude corresponding to this x position in the map source's | ||
| 482 | * projection. | ||
| 483 | * | ||
| 484 | * Returns: the longitude | ||
| 485 | * | ||
| 486 | * Since: 0.4 | ||
| 487 | */ | ||
| 475 | 488 | gdouble | |
| 476 | 489 | champlain_map_source_get_longitude (ChamplainMapSource *map_source, | |
| 477 | 490 | guint zoom_level, | |
| … | … | ||
| 497 | 497 | return dx / pow (2.0, zoom_level) * 360.0 - 180; | |
| 498 | 498 | } | |
| 499 | 499 | ||
| 500 | /** | ||
| 501 | * champlain_map_source_get_latitude: | ||
| 502 | * @map_source: a #ChamplainMapSource | ||
| 503 | * @zoom_level: the zoom level | ||
| 504 | * @y: a y position | ||
| 505 | * | ||
| 506 | * Gets the latitude corresponding to this y position in the map source's | ||
| 507 | * projection. | ||
| 508 | * | ||
| 509 | * Returns: the latitude | ||
| 510 | * | ||
| 511 | * Since: 0.4 | ||
| 512 | */ | ||
| 500 | 513 | gdouble | |
| 501 | 514 | champlain_map_source_get_latitude (ChamplainMapSource *map_source, | |
| 502 | 515 | guint zoom_level, | |
| … | … | ||
| 523 | 523 | return 180.0 / M_PI * atan (0.5 * (exp (n) - exp (-n))); | |
| 524 | 524 | } | |
| 525 | 525 | ||
| 526 | /** | ||
| 527 | * champlain_map_source_get_row_count: | ||
| 528 | * @map_source: a #ChamplainMapSource | ||
| 529 | * @zoom_level: the zoom level | ||
| 530 | * | ||
| 531 | * Gets the number of tiles in a row at this zoom level for this map source. | ||
| 532 | * | ||
| 533 | * Returns: the number of tiles in a row | ||
| 534 | * | ||
| 535 | * Since: 0.4 | ||
| 536 | */ | ||
| 526 | 537 | guint | |
| 527 | 538 | champlain_map_source_get_row_count (ChamplainMapSource *map_source, | |
| 528 | 539 | guint zoom_level) | |
| … | … | ||
| 545 | 545 | return pow (2, zoom_level); | |
| 546 | 546 | } | |
| 547 | 547 | ||
| 548 | /** | ||
| 549 | * champlain_map_source_get_column_count: | ||
| 550 | * @map_source: a #ChamplainMapSource | ||
| 551 | * @zoom_level: the zoom level | ||
| 552 | * | ||
| 553 | * Gets the number of tiles in a column at this zoom level for this map | ||
| 554 | * source. | ||
| 555 | * | ||
| 556 | * Returns: the number of tiles in a column | ||
| 557 | * | ||
| 558 | * Since: 0.4 | ||
| 559 | */ | ||
| 548 | 560 | guint | |
| 549 | 561 | champlain_map_source_get_column_count (ChamplainMapSource *map_source, | |
| 550 | 562 | guint zoom_level) | |
| … | … | ||
| 570 | 570 | ||
| 571 | 571 | #define EARTH_RADIUS 6378137.0 /* meters, Equatorial radius */ | |
| 572 | 572 | ||
| 573 | /** | ||
| 574 | * champlain_map_source_get_meters_per_pixel: | ||
| 575 | * @map_source: a #ChamplainMapSource | ||
| 576 | * @zoom_level: the zoom level | ||
| 577 | * @latitude: a latitude | ||
| 578 | * @longitude: a longitude | ||
| 579 | * | ||
| 580 | * Gets meters per pixel at the position on the map using this map source's projection. | ||
| 581 | * | ||
| 582 | * Returns: the meters per pixel | ||
| 583 | * | ||
| 584 | * Since: 0.4.3 | ||
| 585 | */ | ||
| 573 | 586 | gdouble | |
| 574 | 587 | champlain_map_source_get_meters_per_pixel (ChamplainMapSource *map_source, | |
| 575 | 588 | guint zoom_level, | |
| … | … | ||
| 603 | 603 | (tile_size * champlain_map_source_get_row_count (map_source, zoom_level)); | |
| 604 | 604 | } | |
| 605 | 605 | ||
| 606 | /** | ||
| 607 | * champlain_map_source_fill_tile: | ||
| 608 | * @map_source: a #ChamplainMapSource | ||
| 609 | * @tile: A #ChamplainTile | ||
| 610 | * | ||
| 611 | * Fills the tile with image data (either from cache, network or rendered | ||
| 612 | * locally). | ||
| 613 | * | ||
| 614 | * Since: 0.4 | ||
| 615 | */ | ||
| 606 | 616 | void | |
| 607 | 617 | champlain_map_source_fill_tile (ChamplainMapSource *map_source, | |
| 608 | 618 | ChamplainTile *tile) |
champlain/champlain-map-source.h
(7 / 0)
|   | |||
| 38 | 38 | ||
| 39 | 39 | typedef struct _ChamplainMapSourceClass ChamplainMapSourceClass; | |
| 40 | 40 | ||
| 41 | typedef enum | ||
| 42 | { | ||
| 43 | CHAMPLAIN_MAP_PROJECTION_MERCATOR | ||
| 44 | } ChamplainMapProjection; | ||
| 45 | |||
| 41 | 46 | struct _ChamplainMapSource | |
| 42 | 47 | { | |
| 43 | 48 | GInitiallyUnowned parent_instance; | |
| … | … | ||
| 59 | 59 | guint (*get_min_zoom_level) (ChamplainMapSource *map_source); | |
| 60 | 60 | guint (*get_max_zoom_level) (ChamplainMapSource *map_source); | |
| 61 | 61 | guint (*get_tile_size) (ChamplainMapSource *map_source); | |
| 62 | ChamplainMapProjection (*get_projection) (ChamplainMapSource *map_source); | ||
| 62 | 63 | ||
| 63 | 64 | void (*fill_tile) (ChamplainMapSource *map_source, | |
| 64 | 65 | ChamplainTile *tile); | |
| … | … | ||
| 78 | 78 | guint champlain_map_source_get_min_zoom_level (ChamplainMapSource *map_source); | |
| 79 | 79 | guint champlain_map_source_get_max_zoom_level (ChamplainMapSource *map_source); | |
| 80 | 80 | guint champlain_map_source_get_tile_size (ChamplainMapSource *map_source); | |
| 81 | ChamplainMapProjection champlain_map_source_get_projection (ChamplainMapSource *map_source); | ||
| 81 | 82 | ||
| 82 | 83 | guint champlain_map_source_get_x (ChamplainMapSource *map_source, | |
| 83 | 84 | guint zoom_level, |
champlain/champlain-marker.c
(2 / 1)
|   | |||
| 718 | 718 | return FALSE; | |
| 719 | 719 | } | |
| 720 | 720 | ||
| 721 | /** champlain_marker_queue_redraw: | ||
| 721 | /** | ||
| 722 | * champlain_marker_queue_redraw: | ||
| 722 | 723 | * @marker: a #ChamplainMarker | |
| 723 | 724 | * | |
| 724 | 725 | * Queue a redraw of the marker as soon as possible. This function should not |
champlain/champlain-memphis-tile-source.c
(13 / 18)
|   | |||
| 35 | 35 | * (TODO: link to the specification) The default rules only show | |
| 36 | 36 | * highways as thin black lines. | |
| 37 | 37 | * Once loaded, rules can be queried and edited. | |
| 38 | * | ||
| 39 | * Rendered tiles are cached. The cache is deleted if the map data or rules | ||
| 40 | * are changed. This is the default behaviour, but it can be disabled with the | ||
| 41 | * #ChamplainMemphisTileSource:persistent-cache property. A persistent cache | ||
| 42 | * has to be managed by the client application. | ||
| 43 | 38 | */ | |
| 44 | 39 | ||
| 45 | 40 | #include "champlain-memphis-tile-source.h" | |
| … | … | ||
| 578 | 578 | ||
| 579 | 579 | /** | |
| 580 | 580 | * champlain_memphis_tile_source_get_map_data_source: | |
| 581 | * @map_source: a #ChamplainMemphisTileSource | ||
| 581 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 582 | 582 | * | |
| 583 | * Returns the #ChamplainMapDataSource. | ||
| 583 | * Returns: the #ChamplainMapDataSource. | ||
| 584 | 584 | * | |
| 585 | 585 | * Since: 0.6 | |
| 586 | 586 | */ | |
| … | … | ||
| 596 | 596 | ||
| 597 | 597 | /** | |
| 598 | 598 | * champlain_memphis_tile_source_get_background_color: | |
| 599 | * @map_source: a #ChamplainMemphisTileSource | ||
| 599 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 600 | 600 | * | |
| 601 | * Returns the background color of the map as a newly-allocated | ||
| 601 | * Returns: the background color of the map as a newly-allocated | ||
| 602 | 602 | * #ClutterColor. | |
| 603 | 603 | * | |
| 604 | 604 | * Since: 0.6 | |
| … | … | ||
| 625 | 625 | ||
| 626 | 626 | /** | |
| 627 | 627 | * champlain_memphis_tile_source_set_background_color: | |
| 628 | * @map_source: a #ChamplainMemphisTileSource | ||
| 628 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 629 | 629 | * @color: a #ClutterColor | |
| 630 | 630 | * | |
| 631 | 631 | * Sets the background color of the map from a #ClutterColor. | |
| … | … | ||
| 651 | 651 | ||
| 652 | 652 | /** | |
| 653 | 653 | * champlain_memphis_tile_source_set_rule: | |
| 654 | * @map_source: a #ChamplainMemphisTileSource | ||
| 654 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 655 | 655 | * @rule: a #MemphisRule | |
| 656 | 656 | * | |
| 657 | 657 | * Edits or adds a #MemphisRule to the rules-set. New rules are appended | |
| … | … | ||
| 661 | 661 | */ | |
| 662 | 662 | void | |
| 663 | 663 | champlain_memphis_tile_source_set_rule (ChamplainMemphisTileSource *tile_source, | |
| 664 | MemphisRule *rule) | ||
| 664 | MemphisRule *rule) | ||
| 665 | 665 | { | |
| 666 | 666 | g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source) && | |
| 667 | 667 | MEMPHIS_RULE (rule)); | |
| … | … | ||
| 677 | 677 | ||
| 678 | 678 | /** | |
| 679 | 679 | * champlain_memphis_tile_source_get_rule: | |
| 680 | * @map_source: a #ChamplainMemphisTileSource | ||
| 680 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 681 | 681 | * @id: an id string | |
| 682 | 682 | * | |
| 683 | * Returns the requested #MemphisRule or NULL if none is found. | ||
| 683 | * Returns: the requested #MemphisRule or NULL if none is found. | ||
| 684 | 684 | * | |
| 685 | 685 | * Since: 0.6 | |
| 686 | 686 | */ | |
| 687 | 687 | MemphisRule * | |
| 688 | 688 | champlain_memphis_tile_source_get_rule (ChamplainMemphisTileSource *tile_source, | |
| 689 | const gchar *id) | ||
| 689 | const gchar *id) | ||
| 690 | 690 | { | |
| 691 | 691 | g_return_val_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source) && | |
| 692 | 692 | id != NULL, NULL); | |
| … | … | ||
| 703 | 703 | ||
| 704 | 704 | /** | |
| 705 | 705 | * champlain_memphis_tile_source_get_rule_ids: | |
| 706 | * @map_source: a #ChamplainMemphisTileSource | ||
| 706 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 707 | 707 | * | |
| 708 | * Returns a #GList of id strings of the form: | ||
| 708 | * Returns: a #GList of id strings of the form: | ||
| 709 | 709 | * key1|key2|...|keyN:value1|value2|...|valueM | |
| 710 | 710 | * | |
| 711 | 711 | * Example: "waterway:river|stream|canal" | |
| … | … | ||
| 729 | 729 | ||
| 730 | 730 | /** | |
| 731 | 731 | * champlain_memphis_tile_source_remove_rule: | |
| 732 | * @map_source: a #ChamplainMemphisTileSource | ||
| 732 | * @tile_source: a #ChamplainMemphisTileSource | ||
| 733 | 733 | * @id: an id string | |
| 734 | 734 | * | |
| 735 | 735 | * Removes the rule with the given id. |
champlain/champlain-network-map-data-source.c
(3 / 3)
|   | |||
| 221 | 221 | /** | |
| 222 | 222 | * champlain_network_map_data_source_new: | |
| 223 | 223 | * | |
| 224 | * Returns a new #ChamplainNetworkMapDataSource | ||
| 224 | * Returns: a new #ChamplainNetworkMapDataSource | ||
| 225 | 225 | * | |
| 226 | 226 | * Since: 0.6 | |
| 227 | 227 | */ | |
| … | … | ||
| 235 | 235 | load_map_data_cb (SoupSession *session, SoupMessage *msg, | |
| 236 | 236 | gpointer user_data) | |
| 237 | 237 | { | |
| 238 | ChamplainNetworkMapDataSource *self = | ||
| 238 | ChamplainNetworkMapDataSource *self = | ||
| 239 | 239 | CHAMPLAIN_NETWORK_MAP_DATA_SOURCE (user_data); | |
| 240 | 240 | ChamplainNetworkMapDataSourcePrivate *priv = GET_PRIVATE (self); | |
| 241 | 241 | ChamplainBoundingBox *bbox; | |
| … | … | ||
| 340 | 340 | * champlain_network_map_data_source_get_api_uri: | |
| 341 | 341 | * @map_data_source: a #ChamplainNetworkMapDataSource | |
| 342 | 342 | * | |
| 343 | * Returns the URI of the API server. | ||
| 343 | * Returns: the URI of the API server. | ||
| 344 | 344 | * | |
| 345 | 345 | * Since: 0.6 | |
| 346 | 346 | */ |
champlain/champlain-network-tile-source.c
(117 / 0)
|   | |||
| 17 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 18 | 18 | */ | |
| 19 | 19 | ||
| 20 | /** | ||
| 21 | * SECTION:champlain-network-tile-source | ||
| 22 | * @short_description: A map source that downloads tiles from a web server | ||
| 23 | * | ||
| 24 | * This object is specialized for map tiles that can be downloaded | ||
| 25 | * from a web server. This includes all web based map services such as | ||
| 26 | * OpenStreetMap, Google Maps, Yahoo Maps and more. This object contains | ||
| 27 | * all mechanisms necessary to download tiles. | ||
| 28 | * | ||
| 29 | * Some preconfigured network map sources are built-in this library, | ||
| 30 | * see #ChamplainMapSourceFactory. | ||
| 31 | * | ||
| 32 | */ | ||
| 33 | |||
| 20 | 34 | #include "config.h" | |
| 21 | 35 | ||
| 22 | 36 | #include "champlain-network-tile-source.h" | |
| … | … | ||
| 191 | 191 | ||
| 192 | 192 | map_source_class->fill_tile = fill_tile; | |
| 193 | 193 | ||
| 194 | /** | ||
| 195 | * ChamplainNetworkTileSource:uri-format | ||
| 196 | * | ||
| 197 | * The uri format of the tile source, see #champlain_network_tile_source_set_uri_format | ||
| 198 | * | ||
| 199 | * Since: 0.4 | ||
| 200 | */ | ||
| 194 | 201 | pspec = g_param_spec_string ("uri-format", | |
| 195 | 202 | "URI Format", | |
| 196 | 203 | "The URI format", | |
| … | … | ||
| 205 | 205 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 206 | 206 | g_object_class_install_property (object_class, PROP_URI_FORMAT, pspec); | |
| 207 | 207 | ||
| 208 | /** | ||
| 209 | * ChamplainNetworkTileSource:offline | ||
| 210 | * | ||
| 211 | * Specifies whether the network tile source can access network | ||
| 212 | * | ||
| 213 | * Since: 0.4 | ||
| 214 | */ | ||
| 208 | 215 | pspec = g_param_spec_boolean ("offline", | |
| 209 | 216 | "Offline", | |
| 210 | 217 | "Offline", | |
| … | … | ||
| 219 | 219 | G_PARAM_READWRITE); | |
| 220 | 220 | g_object_class_install_property (object_class, PROP_OFFLINE, pspec); | |
| 221 | 221 | ||
| 222 | /** | ||
| 223 | * ChamplainNetworkTileSource:proxy-uri | ||
| 224 | * | ||
| 225 | * The proxy uri used to access network | ||
| 226 | * | ||
| 227 | * Since: 0.4 | ||
| 228 | */ | ||
| 222 | 229 | pspec = g_param_spec_string ("proxy-uri", | |
| 223 | 230 | "Proxy URI", | |
| 224 | 231 | "The proxy URI to use to access network", | |
| … | … | ||
| 255 | 255 | ||
| 256 | 256 | } | |
| 257 | 257 | ||
| 258 | /** | ||
| 259 | * champlain_network_tile_source_new_full: | ||
| 260 | * @id: the map source's id | ||
| 261 | * @name: the map source's name | ||
| 262 | * @license: the map source's license | ||
| 263 | * @license_uri: the map source's license URI | ||
| 264 | * @min_zoom: the map source's minimum zoom level | ||
| 265 | * @max_zoom: the map source's maximum zoom level | ||
| 266 | * @tile_size: the map source's tile size (in pixels) | ||
| 267 | * @projection: the map source's projection | ||
| 268 | * @uri_format: the URI to fetch the tiles from, see #champlain_network_tile_source_set_uri_format | ||
| 269 | * | ||
| 270 | * Constructor of #ChamplainNetworkTileSource. | ||
| 271 | * | ||
| 272 | * Returns: a constructed #ChamplainNetworkTileSource | ||
| 273 | * | ||
| 274 | * Since: 0.4 | ||
| 275 | */ | ||
| 258 | 276 | ChamplainNetworkTileSource* | |
| 259 | 277 | champlain_network_tile_source_new_full (const gchar *id, | |
| 260 | 278 | const gchar *name, | |
| … | … | ||
| 293 | 293 | return source; | |
| 294 | 294 | } | |
| 295 | 295 | ||
| 296 | /** | ||
| 297 | * champlain_network_tile_source_get_uri_format: | ||
| 298 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 299 | * | ||
| 300 | * Default constructor of #ChamplainNetworkTileSource. | ||
| 301 | * | ||
| 302 | * Returns: A URI format used for URI creation when downloading tiles. See | ||
| 303 | * champlain_network_tile_source_set_uri_format() for more information. | ||
| 304 | * | ||
| 305 | * Since: 0.6 | ||
| 306 | */ | ||
| 296 | 307 | const gchar * | |
| 297 | 308 | champlain_network_tile_source_get_uri_format (ChamplainNetworkTileSource *tile_source) | |
| 298 | 309 | { | |
| … | … | ||
| 313 | 313 | return priv->uri_format; | |
| 314 | 314 | } | |
| 315 | 315 | ||
| 316 | /** | ||
| 317 | * champlain_network_tile_source_set_uri_format: | ||
| 318 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 319 | * @uri_format: the URI format | ||
| 320 | * | ||
| 321 | * A URI format is a URI where x, y and zoom level information have been | ||
| 322 | * marked for parsing and insertion. There can be an unlimited number of | ||
| 323 | * marked items in a URI format. They are delimited by "#" before and after | ||
| 324 | * the variable name. There are 3 defined variable names: X, Y, and Z. | ||
| 325 | * | ||
| 326 | * For example, this is the OpenStreetMap URI format: | ||
| 327 | * "http://tile.openstreetmap.org/\#Z\#/\#X\#/\#Y\#.png" | ||
| 328 | * | ||
| 329 | * Since: 0.4 | ||
| 330 | */ | ||
| 316 | 331 | void | |
| 317 | 332 | champlain_network_tile_source_set_uri_format (ChamplainNetworkTileSource *tile_source, | |
| 318 | 333 | const gchar *uri_format) | |
| … | … | ||
| 342 | 342 | g_object_notify (G_OBJECT (tile_source), "uri-format"); | |
| 343 | 343 | } | |
| 344 | 344 | ||
| 345 | /** | ||
| 346 | * champlain_network_tile_source_get_proxy_uri: | ||
| 347 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 348 | * | ||
| 349 | * Gets the proxy uri used to access network. | ||
| 350 | * | ||
| 351 | * Returns: the proxy uri | ||
| 352 | * | ||
| 353 | * Since: 0.6 | ||
| 354 | */ | ||
| 345 | 355 | const gchar * | |
| 346 | 356 | champlain_network_tile_source_get_proxy_uri (ChamplainNetworkTileSource *tile_source) | |
| 347 | 357 | { | |
| … | … | ||
| 361 | 361 | return priv->proxy_uri; | |
| 362 | 362 | } | |
| 363 | 363 | ||
| 364 | /** | ||
| 365 | * champlain_network_tile_source_set_proxy_uri: | ||
| 366 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 367 | * @proxy_uri: the proxy uri used to access network | ||
| 368 | * | ||
| 369 | * Sets the proxy uri used to access network. | ||
| 370 | * | ||
| 371 | * Since: 0.6 | ||
| 372 | */ | ||
| 364 | 373 | void | |
| 365 | 374 | champlain_network_tile_source_set_proxy_uri (ChamplainNetworkTileSource *tile_source, | |
| 366 | 375 | const gchar *proxy_uri) | |
| … | … | ||
| 396 | 396 | g_object_notify (G_OBJECT (tile_source), "proxy-uri"); | |
| 397 | 397 | } | |
| 398 | 398 | ||
| 399 | /** | ||
| 400 | * champlain_network_tile_source_get_offline: | ||
| 401 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 402 | * | ||
| 403 | * Gets offline status. | ||
| 404 | * | ||
| 405 | * Returns: TRUE when the tile source is set to be offline; FALSE otherwise. | ||
| 406 | * | ||
| 407 | * Since: 0.6 | ||
| 408 | */ | ||
| 399 | 409 | gboolean | |
| 400 | 410 | champlain_network_tile_source_get_offline (ChamplainNetworkTileSource *tile_source) | |
| 401 | 411 | { | |
| … | … | ||
| 415 | 415 | return priv->offline; | |
| 416 | 416 | } | |
| 417 | 417 | ||
| 418 | /** | ||
| 419 | * champlain_network_tile_source_set_offline: | ||
| 420 | * @tile_source: the #ChamplainNetworkTileSource | ||
| 421 | * @offline: TRUE when the tile source should be offline; FALSE otherwise | ||
| 422 | * | ||
| 423 | * Sets offline status. | ||
| 424 | * | ||
| 425 | * Since: 0.6 | ||
| 426 | */ | ||
| 418 | 427 | void | |
| 419 | 428 | champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_source, | |
| 420 | 429 | gboolean offline) |
champlain/champlain-network-tile-source.h
(6 / 6)
|   | |||
| 61 | 61 | ChamplainMapProjection projection, | |
| 62 | 62 | const gchar *uri_format); | |
| 63 | 63 | ||
| 64 | const gchar * champlain_network_tile_source_get_uri_format (ChamplainNetworkTileSource *source); | ||
| 65 | void champlain_network_tile_source_set_uri_format (ChamplainNetworkTileSource *source, | ||
| 64 | const gchar * champlain_network_tile_source_get_uri_format (ChamplainNetworkTileSource *tile_source); | ||
| 65 | void champlain_network_tile_source_set_uri_format (ChamplainNetworkTileSource *tile_source, | ||
| 66 | 66 | const gchar *uri_format); | |
| 67 | 67 | ||
| 68 | gboolean champlain_network_tile_source_get_offline (ChamplainNetworkTileSource *source); | ||
| 69 | void champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *source, | ||
| 68 | gboolean champlain_network_tile_source_get_offline (ChamplainNetworkTileSource *tile_source); | ||
| 69 | void champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_source, | ||
| 70 | 70 | gboolean offline); | |
| 71 | 71 | ||
| 72 | const gchar * champlain_network_tile_source_get_proxy_uri (ChamplainNetworkTileSource *source); | ||
| 73 | void champlain_network_tile_source_set_proxy_uri (ChamplainNetworkTileSource *source, | ||
| 72 | const gchar * champlain_network_tile_source_get_proxy_uri (ChamplainNetworkTileSource *tile_source); | ||
| 73 | void champlain_network_tile_source_set_proxy_uri (ChamplainNetworkTileSource *tile_source, | ||
| 74 | 74 | const gchar *proxy_uri); | |
| 75 | 75 | ||
| 76 | 76 | G_END_DECLS |
champlain/champlain-tile-cache.c
(86 / 1)
|   | |||
| 16 | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 17 | 17 | */ | |
| 18 | 18 | ||
| 19 | /** | ||
| 20 | * SECTION:champlain-tile-cache | ||
| 21 | * @short_description: A base class of tile caches | ||
| 22 | * | ||
| 23 | * This class defines properties and methods common to all caches (that is, map | ||
| 24 | * sources that permit storage and retrieval of tiles). Tiles are typically | ||
| 25 | * stored by #ChamplainTileSource objects. | ||
| 26 | */ | ||
| 27 | |||
| 19 | 28 | #include "champlain-tile-cache.h" | |
| 20 | 29 | ||
| 21 | 30 | G_DEFINE_TYPE (ChamplainTileCache, champlain_tile_cache, CHAMPLAIN_TYPE_MAP_SOURCE); | |
| … | … | ||
| 51 | 51 | static guint get_min_zoom_level (ChamplainMapSource *map_source); | |
| 52 | 52 | static guint get_max_zoom_level (ChamplainMapSource *map_source); | |
| 53 | 53 | static guint get_tile_size (ChamplainMapSource *map_source); | |
| 54 | static ChamplainMapProjection get_projection (ChamplainMapSource *map_source); | ||
| 54 | 55 | ||
| 55 | 56 | static void | |
| 56 | 57 | champlain_tile_cache_get_property (GObject *object, | |
| … | … | ||
| 130 | 130 | map_source_class->get_min_zoom_level = get_min_zoom_level; | |
| 131 | 131 | map_source_class->get_max_zoom_level = get_max_zoom_level; | |
| 132 | 132 | map_source_class->get_tile_size = get_tile_size; | |
| 133 | map_source_class->get_projection = get_projection; | ||
| 133 | 134 | ||
| 134 | 135 | map_source_class->fill_tile = NULL; | |
| 135 | 136 | ||
| … | … | ||
| 139 | 139 | tile_cache_class->store_tile = NULL; | |
| 140 | 140 | tile_cache_class->clean = NULL; | |
| 141 | 141 | ||
| 142 | /** | ||
| 143 | * ChamplainTileCache:persistent-cache | ||
| 144 | * | ||
| 145 | * Determines whether the cache is persistent or temporary (cleaned upon | ||
| 146 | * destruction) | ||
| 147 | * | ||
| 148 | * Since: 0.6 | ||
| 149 | */ | ||
| 142 | 150 | pspec = g_param_spec_boolean ("persistent-cache", | |
| 143 | 151 | "Persistent Cache", | |
| 144 | 152 | "Specifies whether the cache is persistent", | |
| 145 | FALSE, | ||
| 153 | TRUE, | ||
| 146 | 154 | G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE); | |
| 147 | 155 | g_object_class_install_property (object_class, PROP_PERSISTENT_CACHE, pspec); | |
| 148 | 156 | } | |
| … | … | ||
| 163 | 163 | priv->persistent = FALSE; | |
| 164 | 164 | } | |
| 165 | 165 | ||
| 166 | /** | ||
| 167 | * champlain_tile_cache_get_persistent: | ||
| 168 | * @tile_cache: a #ChamplainTileCache | ||
| 169 | * | ||
| 170 | * Gets cache persistency information. | ||
| 171 | * | ||
| 172 | * Returns: TRUE when the cache is persistent; FALSE otherwise. | ||
| 173 | * | ||
| 174 | * Since: 0.6 | ||
| 175 | */ | ||
| 166 | 176 | gboolean | |
| 167 | 177 | champlain_tile_cache_get_persistent (ChamplainTileCache *tile_cache) | |
| 168 | 178 | { | |
| … | … | ||
| 182 | 182 | return priv->persistent; | |
| 183 | 183 | } | |
| 184 | 184 | ||
| 185 | /** | ||
| 186 | * champlain_tile_cache_store_tile: | ||
| 187 | * @tile_cache: a #ChamplainTileCache | ||
| 188 | * @tile: a #ChamplainTile | ||
| 189 | * @contents: the tile contents that should be stored | ||
| 190 | * @size: size of the contents in bytes | ||
| 191 | * | ||
| 192 | * Stores the tile including the metadata into the cache. | ||
| 193 | * | ||
| 194 | * Since: 0.6 | ||
| 195 | */ | ||
| 185 | 196 | void | |
| 186 | 197 | champlain_tile_cache_store_tile (ChamplainTileCache *tile_cache, | |
| 187 | 198 | ChamplainTile *tile, | |
| … | … | ||
| 204 | 204 | return CHAMPLAIN_TILE_CACHE_GET_CLASS (tile_cache)->store_tile (tile_cache, tile, contents, size); | |
| 205 | 205 | } | |
| 206 | 206 | ||
| 207 | /** | ||
| 208 | * champlain_tile_cache_refresh_tile_time: | ||
| 209 | * @tile_cache: a #ChamplainTileCache | ||
| 210 | * @tile: a #ChamplainTile | ||
| 211 | * | ||
| 212 | * Refreshes the tile access time in the cache. | ||
| 213 | * | ||
| 214 | * Since: 0.6 | ||
| 215 | */ | ||
| 207 | 216 | void | |
| 208 | 217 | champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile) | |
| 209 | 218 | { | |
| … | … | ||
| 221 | 221 | return CHAMPLAIN_TILE_CACHE_GET_CLASS (tile_cache)->refresh_tile_time (tile_cache, tile); | |
| 222 | 222 | } | |
| 223 | 223 | ||
| 224 | /** | ||
| 225 | * champlain_tile_cache_on_tile_filled: | ||
| 226 | * @tile_cache: a #ChamplainTileCache | ||
| 227 | * @tile: a #ChamplainTile | ||
| 228 | * | ||
| 229 | * When a cache fills a tile and the next source in the chain is a tile cache, | ||
| 230 | * it should call this function on the next source. This way all the caches | ||
| 231 | * preceding a tile source in the chain get informed that the tile was used and | ||
| 232 | * can modify their metadata accordingly in the implementation of this function. | ||
| 233 | * In addition, the call of this function should be chained so within the | ||
| 234 | * implementation of this function it should be called on the next source | ||
| 235 | * in the chain when next source is a tile cache. | ||
| 236 | * | ||
| 237 | * Since: 0.6 | ||
| 238 | */ | ||
| 224 | 239 | void | |
| 225 | 240 | champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile) | |
| 226 | 241 | { | |
| … | … | ||
| 244 | 244 | return CHAMPLAIN_TILE_CACHE_GET_CLASS (tile_cache)->on_tile_filled (tile_cache, tile); | |
| 245 | 245 | } | |
| 246 | 246 | ||
| 247 | /** | ||
| 248 | * champlain_tile_cache_clean: | ||
| 249 | * @tile_cache: a #ChamplainTileCache | ||
| 250 | * | ||
| 251 | * Erases the contents of the cache. This function will fail when the cache is | ||
| 252 | * not temporary. | ||
| 253 | * | ||
| 254 | * Since: 0.6 | ||
| 255 | */ | ||
| 247 | 256 | void | |
| 248 | 257 | champlain_tile_cache_clean (ChamplainTileCache *tile_cache) | |
| 249 | 258 | { | |
| … | … | ||
| 343 | 343 | g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (next_source), 0); | |
| 344 | 344 | ||
| 345 | 345 | return champlain_map_source_get_tile_size (next_source); | |
| 346 | } | ||
| 347 | |||
| 348 | static ChamplainMapProjection | ||
| 349 | get_projection (ChamplainMapSource *map_source) | ||
| 350 | { | ||
| 351 | g_return_val_if_fail (CHAMPLAIN_IS_TILE_CACHE (map_source), CHAMPLAIN_MAP_PROJECTION_MERCATOR); | ||
| 352 | |||
| 353 | ChamplainMapSource *next_source = champlain_map_source_get_next_source (map_source); | ||
| 354 | |||
| 355 | g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (next_source), CHAMPLAIN_MAP_PROJECTION_MERCATOR); | ||
| 356 | |||
| 357 | return champlain_map_source_get_projection (next_source); | ||
| 346 | 358 | } |
champlain/champlain-tile-source.c
(186 / 21)
|   | |||
| 17 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 18 | 18 | */ | |
| 19 | 19 | ||
| 20 | /** | ||
| 21 | * SECTION:champlain-tile-source | ||
| 22 | * @short_description: A base class of tile sources | ||
| 23 | * | ||
| 24 | * This class defines properties common to all tile sources (that is, map | ||
| 25 | * sources that are not caches). | ||
| 26 | */ | ||
| 27 | |||
| 20 | 28 | #include "champlain-tile-source.h" | |
| 21 | 29 | #include "champlain-enum-types.h" | |
| 22 | 30 | ||
| … | … | ||
| 68 | 68 | static guint get_min_zoom_level (ChamplainMapSource *map_source); | |
| 69 | 69 | static guint get_max_zoom_level (ChamplainMapSource *map_source); | |
| 70 | 70 | static guint get_tile_size (ChamplainMapSource *map_source); | |
| 71 | static ChamplainMapProjection get_projection (ChamplainMapSource *map_source); | ||
| 71 | 72 | ||
| 72 | 73 | static void | |
| 73 | 74 | champlain_tile_source_get_property (GObject *object, | |
| … | … | ||
| 218 | 218 | map_source_class->get_min_zoom_level = get_min_zoom_level; | |
| 219 | 219 | map_source_class->get_max_zoom_level = get_max_zoom_level; | |
| 220 | 220 | map_source_class->get_tile_size = get_tile_size; | |
| 221 | map_source_class->get_projection = get_projection; | ||
| 221 | 222 | ||
| 222 | 223 | map_source_class->fill_tile = NULL; | |
| 223 | 224 | ||
| 225 | /** | ||
| 226 | * ChamplainTileSource:id: | ||
| 227 | * | ||
| 228 | * The name of the tile source | ||
| 229 | * | ||
| 230 | * Since: 0.4 | ||
| 231 | */ | ||
| 224 | 232 | pspec = g_param_spec_string ("id", | |
| 225 | 233 | "Id", | |
| 226 | 234 | "The id of the tile source", | |
| … | … | ||
| 236 | 236 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 237 | 237 | g_object_class_install_property (object_class, PROP_ID, pspec); | |
| 238 | 238 | ||
| 239 | /** | ||
| 240 | * ChamplainTileSource:name: | ||
| 241 | * | ||
| 242 | * The name of the tile source | ||
| 243 | * | ||
| 244 | * Since: 0.4 | ||
| 245 | */ | ||
| 239 | 246 | pspec = g_param_spec_string ("name", | |
| 240 | 247 | "Name", | |
| 241 | 248 | "The name of the tile source", | |
| … | … | ||
| 250 | 250 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 251 | 251 | g_object_class_install_property (object_class, PROP_NAME, pspec); | |
| 252 | 252 | ||
| 253 | /** | ||
| 254 | * ChamplainTileSource:license: | ||
| 255 | * | ||
| 256 | * The usage license of the tile source | ||
| 257 | * | ||
| 258 | * Since: 0.4 | ||
| 259 | */ | ||
| 253 | 260 | pspec = g_param_spec_string ("license", | |
| 254 | 261 | "License", | |
| 255 | 262 | "The usage license of the tile source", | |
| … | … | ||
| 264 | 264 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 265 | 265 | g_object_class_install_property (object_class, PROP_LICENSE, pspec); | |
| 266 | 266 | ||
| 267 | /** | ||
| 268 | * ChamplainTileSource:license-uri: | ||
| 269 | * | ||
| 270 | * The usage license's uri for more information | ||
| 271 | * | ||
| 272 | * Since: 0.4 | ||
| 273 | */ | ||
| 267 | 274 | pspec = g_param_spec_string ("license-uri", | |
| 268 | 275 | "License-uri", | |
| 269 | 276 | "The usage license's uri for more information", | |
| … | … | ||
| 278 | 278 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 279 | 279 | g_object_class_install_property (object_class, PROP_LICENSE_URI, pspec); | |
| 280 | 280 | ||
| 281 | /** | ||
| 282 | * ChamplainTileSource:min-zoom-level: | ||
| 283 | * | ||
| 284 | * The minimum zoom level | ||
| 285 | * | ||
| 286 | * Since: 0.4 | ||
| 287 | */ | ||
| 281 | 288 | pspec = g_param_spec_uint ("min-zoom-level", | |
| 282 | 289 | "Minimum Zoom Level", | |
| 283 | 290 | "The minimum zoom level", | |
| … | … | ||
| 294 | 294 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 295 | 295 | g_object_class_install_property (object_class, PROP_MIN_ZOOM_LEVEL, pspec); | |
| 296 | 296 | ||
| 297 | /** | ||
| 298 | * ChamplainTileSource:max-zoom-level: | ||
| 299 | * | ||
| 300 | * The maximum zoom level | ||
| 301 | * | ||
| 302 | * Since: 0.4 | ||
| 303 | */ | ||
| 297 | 304 | pspec = g_param_spec_uint ("max-zoom-level", | |
| 298 | 305 | "Maximum Zoom Level", | |
| 299 | 306 | "The maximum zoom level", | |
| … | … | ||
| 310 | 310 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 311 | 311 | g_object_class_install_property (object_class, PROP_MAX_ZOOM_LEVEL, pspec); | |
| 312 | 312 | ||
| 313 | /** | ||
| 314 | * ChamplainTileSource:tile-size: | ||
| 315 | * | ||
| 316 | * The tile size of the tile source | ||
| 317 | * | ||
| 318 | * Since: 0.4 | ||
| 319 | */ | ||
| 313 | 320 | pspec = g_param_spec_uint ("tile-size", | |
| 314 | 321 | "Tile Size", | |
| 315 | 322 | "The tile size", | |
| … | … | ||
| 326 | 326 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 327 | 327 | g_object_class_install_property (object_class, PROP_TILE_SIZE, pspec); | |
| 328 | 328 | ||
| 329 | /** | ||
| 330 | * ChamplainTileSource:projection | ||
| 331 | * | ||
| 332 | * The map projection of the tile source | ||
| 333 | * | ||
| 334 | * Since: 0.4 | ||
| 335 | */ | ||
| 329 | 336 | pspec = g_param_spec_enum ("projection", | |
| 330 | 337 | "Projection", | |
| 331 | 338 | "The map projection", | |
| … | … | ||
| 341 | 341 | (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); | |
| 342 | 342 | g_object_class_install_property (object_class, PROP_MAP_PROJECTION, pspec); | |
| 343 | 343 | ||
| 344 | /** | ||
| 345 | * ChamplainTileSource:cache | ||
| 346 | * | ||
| 347 | * The cache used for tile storage | ||
| 348 | * | ||
| 349 | * Since: 0.6 | ||
| 350 | */ | ||
| 344 | 351 | pspec = g_param_spec_object ("cache", | |
| 345 | 352 | "Cache", | |
| 346 | 353 | "Cache used for tile sorage", | |
| … | … | ||
| 371 | 371 | priv->map_projection = CHAMPLAIN_MAP_PROJECTION_MERCATOR; | |
| 372 | 372 | } | |
| 373 | 373 | ||
| 374 | ChamplainMapProjection | ||
| 375 | champlain_tile_source_get_projection (ChamplainTileSource *tile_source) | ||
| 376 | { | ||
| 377 | g_return_val_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source), 0); | ||
| 378 | |||
| 379 | ChamplainTileSourcePrivate *priv = GET_PRIVATE(tile_source); | ||
| 380 | return priv->map_projection; | ||
| 381 | } | ||
| 382 | |||
| 374 | /** | ||
| 375 | * champlain_tile_source_get_cache: | ||
| 376 | * @tile_source: a #ChamplainTileSource | ||
| 377 | * | ||
| 378 | * Gets the cache used for storing tiles by this tile source. | ||
| 379 | * | ||
| 380 | * Returns: the cache | ||
| 381 | * | ||
| 382 | * Since: 0.6 | ||
| 383 | */ | ||
| 383 | 384 | ChamplainTileCache * | |
| 384 | 385 | champlain_tile_source_get_cache (ChamplainTileSource *tile_source) | |
| 385 | 386 | { | |
| … | … | ||
| 390 | 390 | return priv->cache; | |
| 391 | 391 | } | |
| 392 | 392 | ||
| 393 | /** | ||
| 394 | * champlain_tile_source_set_cache: | ||
| 395 | * @tile_source: a #ChamplainTileSource | ||
| 396 | * @cache: a #ChamplainTileCache | ||
| 397 | * | ||
| 398 | * Sets the map source's cache used for storing tiles. | ||
| 399 | * | ||
| 400 | * Since: 0.6 | ||
| 401 | */ | ||
| 393 | 402 | void | |
| 394 | champlain_tile_source_set_projection (ChamplainTileSource *tile_source, | ||
| 395 | ChamplainMapProjection projection) | ||
| 396 | { | ||
| 397 | g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source)); | ||
| 398 | |||
| 399 | ChamplainTileSourcePrivate *priv = GET_PRIVATE(tile_source); | ||
| 400 | |||
| 401 | priv->map_projection = projection; | ||
| 402 | g_object_notify (G_OBJECT (tile_source), "projection"); | ||
| 403 | } | ||
| 404 | |||
| 405 | void | ||
| 406 | 403 | champlain_tile_source_set_cache (ChamplainTileSource *tile_source, | |
| 407 | 404 | ChamplainTileCache *cache) | |
| 408 | 405 | { | |
| … | … | ||
| 485 | 485 | return priv->tile_size; | |
| 486 | 486 | } | |
| 487 | 487 | ||
| 488 | static ChamplainMapProjection | ||
| 489 | get_projection (ChamplainMapSource *map_source) | ||
| 490 | { | ||
| 491 | g_return_val_if_fail (CHAMPLAIN_IS_TILE_SOURCE (map_source), 0); | ||
| 492 | |||
| 493 | ChamplainTileSourcePrivate *priv = GET_PRIVATE(map_source); | ||
| 494 | return priv->map_projection; | ||
| 495 | } | ||
| 496 | |||
| 497 | /** | ||
| 498 | * champlain_tile_source_set_id: | ||
| 499 | * @tile_source: a #ChamplainTileSource | ||
| 500 | * @id: an id | ||
| 501 | * | ||
| 502 | * Sets the tile source's id. | ||
| 503 | * | ||
| 504 | * Since: 0.4 | ||
| 505 | */ | ||
| 488 | 506 | void | |
| 489 | 507 | champlain_tile_source_set_id (ChamplainTileSource *tile_source, | |
| 490 | 508 | const gchar *id) | |
| … | … | ||
| 517 | 517 | g_object_notify (G_OBJECT (tile_source), "id"); | |
| 518 | 518 | } | |
| 519 | 519 | ||
| 520 | /** | ||
| 521 | * champlain_tile_source_set_name: | ||
| 522 | * @tile_source: a #ChamplainTileSource | ||
| 523 | * @name: a name | ||
| 524 | * | ||
| 525 | * Sets the tile source's name. | ||
| 526 | * | ||
| 527 | * Since: 0.4 | ||
| 528 | */ | ||
| 520 | 529 | void | |
| 521 | 530 | champlain_tile_source_set_name (ChamplainTileSource *tile_source, | |
| 522 | 531 | const gchar *name) | |
| … | … | ||
| 540 | 540 | g_object_notify (G_OBJECT (tile_source), "name"); | |
| 541 | 541 | } | |
| 542 | 542 | ||
| 543 | /** | ||
| 544 | * champlain_tile_source_set_license: | ||
| 545 | * @tile_source: a #ChamplainTileSource | ||
| 546 | * @license: the licence | ||
| 547 | * | ||
| 548 | * Sets the tile source's license. | ||
| 549 | * | ||
| 550 | * Since: 0.4 | ||
| 551 | */ | ||
| 543 | 552 | void | |
| 544 | 553 | champlain_tile_source_set_license (ChamplainTileSource *tile_source, | |
| 545 | 554 | const gchar *license) | |
| … | … | ||
| 563 | 563 | g_object_notify (G_OBJECT (tile_source), "license"); | |
| 564 | 564 | } | |
| 565 | 565 | ||
| 566 | /** | ||
| 567 | * champlain_tile_source_set_license_uri: | ||
| 568 | * @tile_source: a #ChamplainTileSource | ||
| 569 | * @license_uri: the licence URI | ||
| 570 | * | ||
| 571 | * Sets the tile source's license URI. | ||
| 572 | * | ||
| 573 | * Since: 0.4 | ||
| 574 | */ | ||
| 566 | 575 | void | |
| 567 | 576 | champlain_tile_source_set_license_uri (ChamplainTileSource *tile_source, | |
| 568 | 577 | const gchar *license_uri) | |
| … | … | ||
| 586 | 586 | g_object_notify (G_OBJECT (tile_source), "license-uri"); | |
| 587 | 587 | } | |
| 588 | 588 | ||
| 589 | /** | ||
| 590 | * champlain_tile_source_set_min_zoom_level: | ||
| 591 | * @tile_source: a #ChamplainTileSource | ||
| 592 | * @zoom_level: the minimal zoom level | ||
| 593 | * | ||
| 594 | * Sets the tile source's minimal zoom level. | ||
| 595 | * | ||
| 596 | * Since: 0.6 | ||
| 597 | */ | ||
| 589 | 598 | void | |
| 590 | 599 | champlain_tile_source_set_min_zoom_level (ChamplainTileSource *tile_source, | |
| 591 | 600 | guint zoom_level) | |
| … | … | ||
| 608 | 608 | g_object_notify (G_OBJECT (tile_source), "min-zoom-level"); | |
| 609 | 609 | } | |
| 610 | 610 | ||
| 611 | /** | ||
| 612 | * champlain_tile_source_set_max_zoom_level: | ||
| 613 | * @tile_source: a #ChamplainTileSource | ||
| 614 | * @zoom_level: the maximal zoom level | ||
| 615 | * | ||
| 616 | * Sets the tile source's maximal zoom level. | ||
| 617 | * | ||
| 618 | * Since: 0.6 | ||
| 619 | */ | ||
| 611 | 620 | void | |
| 612 | 621 | champlain_tile_source_set_max_zoom_level (ChamplainTileSource *tile_source, | |
| 613 | 622 | guint zoom_level) | |
| … | … | ||
| 630 | 630 | g_object_notify (G_OBJECT (tile_source), "max-zoom-level"); | |
| 631 | 631 | } | |
| 632 | 632 | ||
| 633 | /** | ||
| 634 | * champlain_tile_source_set_tile_size: | ||
| 635 | * @tile_source: a #ChamplainTileSource | ||
| 636 | * @tile_size: the tile size | ||
| 637 | * | ||
| 638 | * Sets the tile source's tile size. | ||
| 639 | * | ||
| 640 | * Since: 0.6 | ||
| 641 | */ | ||
| 633 | 642 | void | |
| 634 | 643 | champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source, | |
| 635 | 644 | guint tile_size) | |
| … | … | ||
| 650 | 650 | priv->tile_size = tile_size; | |
| 651 | 651 | ||
| 652 | 652 | g_object_notify (G_OBJECT (tile_source), "tile-size"); | |
| 653 | } | ||
| 654 | |||
| 655 | /** | ||
| 656 | * champlain_tile_source_set_projection: | ||
| 657 | * @tile_source: a #ChamplainTileSource | ||
| 658 | * @projection: a #ChamplainMapProjection | ||
| 659 | * | ||
| 660 | * Sets the tile source's projection. | ||
| 661 | * | ||
| 662 | * Since: 0.4 | ||
| 663 | */ | ||
| 664 | void | ||
| 665 | champlain_tile_source_set_projection (ChamplainTileSource *tile_source, | ||
| 666 | ChamplainMapProjection projection) | ||
| 667 | { | ||
| 668 | g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source)); | ||
| 669 | |||
| 670 | ChamplainTileSourcePrivate *priv = GET_PRIVATE(tile_source); | ||
| 671 | |||
| 672 | priv->map_projection = projection; | ||
| 673 | |||
| 674 | g_object_notify (G_OBJECT (tile_source), "projection"); | ||
| 653 | 675 | } |
champlain/champlain-tile-source.h
(3 / 10)
|   | |||
| 40 | 40 | typedef struct _ChamplainTileSource ChamplainTileSource; | |
| 41 | 41 | typedef struct _ChamplainTileSourceClass ChamplainTileSourceClass; | |
| 42 | 42 | ||
| 43 | typedef enum | ||
| 44 | { | ||
| 45 | CHAMPLAIN_MAP_PROJECTION_MERCATOR | ||
| 46 | } ChamplainMapProjection; | ||
| 47 | |||
| 48 | 43 | struct _ChamplainTileSource | |
| 49 | 44 | { | |
| 50 | 45 | ChamplainMapSource parent_instance; | |
| … | … | ||
| 52 | 52 | ||
| 53 | 53 | GType champlain_tile_source_get_type (void); | |
| 54 | 54 | ||
| 55 | ChamplainMapProjection champlain_tile_source_get_projection (ChamplainTileSource *tile_source); | ||
| 56 | void champlain_tile_source_set_projection (ChamplainTileSource *tile_source, | ||
| 57 | ChamplainMapProjection projection); | ||
| 58 | |||
| 59 | 55 | ChamplainTileCache *champlain_tile_source_get_cache (ChamplainTileSource *tile_source); | |
| 60 | 56 | void champlain_tile_source_set_cache (ChamplainTileSource *tile_source, | |
| 61 | 57 | ChamplainTileCache *cache); | |
| … | … | ||
| 70 | 70 | void champlain_tile_source_set_max_zoom_level (ChamplainTileSource *tile_source, | |
| 71 | 71 | guint zoom_level); | |
| 72 | 72 | void champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source, | |
| 73 | guint zoom_level); | ||
| 73 | guint tile_size); | ||
| 74 | void champlain_tile_source_set_projection (ChamplainTileSource *tile_source, | ||
| 75 | ChamplainMapProjection projection); | ||
| 74 | 76 | ||
| 75 | 77 | G_END_DECLS | |
| 76 | 78 |
champlain/champlain-tile.c
(1 / 0)
|   | |||
| 755 | 755 | ||
| 756 | 756 | /** | |
| 757 | 757 | * champlain_tile_get_content: | |
| 758 | * @self: the #ChamplainTile | ||
| 758 | 759 | * | |
| 759 | 760 | * Returns: the tile's content, this actor will change each time the tile's content changes. | |
| 760 | 761 | * You should not unref this content, it is owned by the tile. |
docs/reference/libchamplain-docs.sgml
(7 / 3)
|   | |||
| 52 | 52 | <title>II. Map Source API Reference</title> | |
| 53 | 53 | <xi:include href="xml/champlain-map-source-factory.xml"/> | |
| 54 | 54 | <xi:include href="xml/champlain-map-source.xml"/> | |
| 55 | <xi:include href="xml/champlain-network-map-source.xml"/> | ||
| 56 | <xi:include href="xml/champlain-memphis-map-source.xml"/> | ||
| 57 | 55 | <xi:include href="xml/champlain-tile.xml"/> | |
| 58 | <xi:include href="xml/champlain-cache.xml"/> | ||
| 56 | <xi:include href="xml/champlain-map-source-chain.xml"/> | ||
| 57 | <xi:include href="xml/champlain-tile-source.xml"/> | ||
| 58 | <xi:include href="xml/champlain-tile-cache.xml"/> | ||
| 59 | <xi:include href="xml/champlain-network-tile-source.xml"/> | ||
| 60 | <xi:include href="xml/champlain-memphis-tile-source.xml"/> | ||
| 61 | <xi:include href="xml/champlain-error-tile-source.xml"/> | ||
| 62 | <xi:include href="xml/champlain-file-cache.xml"/> | ||
| 59 | 63 | </chapter> | |
| 60 | 64 | <chapter> | |
| 61 | 65 | <title>III. Map Data Source API Reference</title> |
docs/reference/libchamplain-sections.txt
(190 / 82)
|   | |||
| 2 | 2 | <FILE>champlain-map-source</FILE> | |
| 3 | 3 | <TITLE>ChamplainMapSource</TITLE> | |
| 4 | 4 | ChamplainMapProjection | |
| 5 | ChamplainMapSource | ||
| 5 | champlain_map_source_get_id | ||
| 6 | champlain_map_source_get_name | ||
| 7 | champlain_map_source_get_license | ||
| 8 | champlain_map_source_get_license_uri | ||
| 6 | 9 | champlain_map_source_get_min_zoom_level | |
| 7 | 10 | champlain_map_source_get_max_zoom_level | |
| 8 | 11 | champlain_map_source_get_tile_size | |
| 12 | champlain_map_source_get_projection | ||
| 9 | 13 | champlain_map_source_get_x | |
| 10 | 14 | champlain_map_source_get_y | |
| 11 | 15 | champlain_map_source_get_longitude | |
| 12 | 16 | champlain_map_source_get_latitude | |
| 13 | 17 | champlain_map_source_get_row_count | |
| 14 | 18 | champlain_map_source_get_column_count | |
| 19 | champlain_map_source_get_meters_per_pixel | ||
| 15 | 20 | champlain_map_source_fill_tile | |
| 16 | champlain_map_source_set_name | ||
| 17 | champlain_map_source_get_name | ||
| 18 | champlain_map_source_set_license | ||
| 19 | champlain_map_source_get_license | ||
| 20 | champlain_map_source_set_license_uri | ||
| 21 | champlain_map_source_get_license_uri | ||
| 22 | champlain_map_source_set_projection | ||
| 23 | champlain_map_source_get_projection | ||
| 24 | champlain_map_source_get_id | ||
| 25 | champlain_map_source_set_id | ||
| 21 | champlain_map_source_get_next_source | ||
| 22 | champlain_map_source_set_next_source | ||
| 26 | 23 | <SUBSECTION Standard> | |
| 27 | 24 | CHAMPLAIN_MAP_SOURCE | |
| 28 | 25 | CHAMPLAIN_IS_MAP_SOURCE | |
| … | … | ||
| 30 | 30 | CHAMPLAIN_MAP_SOURCE_GET_CLASS | |
| 31 | 31 | <SUBSECTION Private> | |
| 32 | 32 | ChamplainMapSourceClass | |
| 33 | ChamplainMapSourcePrivate | ||
| 33 | ChamplainMapSource | ||
| 34 | 34 | </SECTION> | |
| 35 | 35 | ||
| 36 | 36 | <SECTION> | |
| 37 | 37 | <FILE>champlain-marker</FILE> | |
| 38 | 38 | <TITLE>ChamplainMarker</TITLE> | |
| 39 | ChamplainMarker | ||
| 40 | 39 | champlain_marker_set_highlight_color | |
| 41 | 40 | champlain_marker_new | |
| 42 | 41 | champlain_marker_new_with_text | |
| … | … | ||
| 78 | 78 | <SUBSECTION Private> | |
| 79 | 79 | ChamplainMarkerClass | |
| 80 | 80 | ChamplainMarkerPrivate | |
| 81 | ChamplainMarker | ||
| 81 | 82 | </SECTION> | |
| 82 | 83 | ||
| 83 | 84 | <SECTION> | |
| … | … | ||
| 167 | 167 | champlain_view_get_zoom_level | |
| 168 | 168 | champlain_view_set_zoom_on_double_click | |
| 169 | 169 | champlain_view_get_zoom_on_double_click | |
| 170 | champlain_view_set_license_text | ||
| 171 | champlain_view_get_license_text | ||
| 172 | champlain_view_set_max_scale_width | ||
| 173 | champlain_view_get_max_scale_width | ||
| 174 | champlain_view_set_scale_unit | ||
| 175 | champlain_view_get_scale_unit | ||
| 176 | champlain_view_set_show_scale | ||
| 177 | champlain_view_get_show_scale | ||
| 170 | 178 | champlain_view_add_layer | |
| 171 | 179 | champlain_view_remove_layer | |
| 172 | 180 | champlain_view_get_coords_from_event | |
| … | … | ||
| 194 | 194 | </SECTION> | |
| 195 | 195 | ||
| 196 | 196 | <SECTION> | |
| 197 | <FILE>champlain-network-map-source</FILE> | ||
| 198 | <TITLE>ChamplainNetworkMapSource</TITLE> | ||
| 199 | ChamplainNetworkMapSource | ||
| 200 | champlain_network_map_source_new_full | ||
| 201 | champlain_network_map_source_get_tile_uri | ||
| 202 | champlain_network_map_source_set_uri_format | ||
| 203 | champlain_network_map_source_fill_tile | ||
| 197 | <FILE>champlain-network-tile-source</FILE> | ||
| 198 | <TITLE>ChamplainNetworkTileSource</TITLE> | ||
| 199 | ChamplainNetworkTileSource | ||
| 200 | champlain_network_tile_source_new_full | ||
| 201 | champlain_network_tile_source_set_uri_format | ||
| 202 | champlain_network_tile_source_get_uri_format | ||
| 203 | champlain_network_tile_source_set_offline | ||
| 204 | champlain_network_tile_source_get_offline | ||
| 205 | champlain_network_tile_source_set_proxy_uri | ||
| 206 | champlain_network_tile_source_get_proxy_uri | ||
| 204 | 207 | <SUBSECTION Standard> | |
| 205 | CHAMPLAIN_NETWORK_MAP_SOURCE | ||
| 206 | CHAMPLAIN_IS_NETWORK_MAP_SOURCE | ||
| 207 | CHAMPLAIN_TYPE_NETWORK_MAP_SOURCE | ||
| 208 | champlain_network_map_source_get_type | ||
| 209 | CHAMPLAIN_NETWORK_MAP_SOURCE_CLASS | ||
| 210 | CHAMPLAIN_IS_NETWORK_MAP_SOURCE_CLASS | ||
| 211 | CHAMPLAIN_NETWORK_MAP_SOURCE_GET_CLASS | ||
| 208 | CHAMPLAIN_NETWORK_TILE_SOURCE | ||
| 209 | CHAMPLAIN_IS_NETWORK_TILE_SOURCE | ||
| 210 | CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE | ||
| 211 | champlain_network_tile_source_get_type | ||
| 212 | CHAMPLAIN_NETWORK_TILE_SOURCE_CLASS | ||
| 213 | CHAMPLAIN_IS_NETWORK_TILE_SOURCE_CLASS | ||
| 214 | CHAMPLAIN_NETWORK_TILE_SOURCE_GET_CLASS | ||
| 215 | <SUBSECTION Private> | ||
| 216 | ChamplainNetworkTileSourceClass | ||
| 212 | 217 | </SECTION> | |
| 213 | 218 | ||
| 214 | 219 | <SECTION> | |
| … | … | ||
| 227 | 227 | champlain_tile_get_zoom_level | |
| 228 | 228 | champlain_tile_get_size | |
| 229 | 229 | champlain_tile_get_state | |
| 230 | champlain_tile_get_uri | ||
| 231 | champlain_tile_get_filename | ||
| 232 | 230 | champlain_tile_get_actor | |
| 233 | 231 | champlain_tile_set_x | |
| 234 | 232 | champlain_tile_set_y | |
| 235 | 233 | champlain_tile_set_zoom_level | |
| 236 | 234 | champlain_tile_set_size | |
| 237 | 235 | champlain_tile_set_state | |
| 238 | champlain_tile_set_uri | ||
| 239 | champlain_tile_set_filename | ||
| 240 | 236 | champlain_tile_get_content | |
| 241 | 237 | champlain_tile_get_etag | |
| 242 | 238 | champlain_tile_get_modified_time | |
| … | … | ||
| 248 | 248 | CHAMPLAIN_TILE_CLASS | |
| 249 | 249 | CHAMPLAIN_IS_TILE_CLASS | |
| 250 | 250 | CHAMPLAIN_TILE_GET_CLASS | |
| 251 | <SUBSECTION Private> | ||
| 252 | ChamplainTileClass | ||
| 253 | ChamplainTilePrivate | ||
| 251 | 254 | </SECTION> | |
| 252 | 255 | ||
| 253 | 256 | <SECTION> | |
| … | … | ||
| 274 | 274 | CHAMPLAIN_LAYER_CLASS | |
| 275 | 275 | CHAMPLAIN_IS_LAYER_CLASS | |
| 276 | 276 | CHAMPLAIN_LAYER_GET_CLASS | |
| 277 | <SUBSECTION Private> | ||
| 278 | ChamplainLayerClass | ||
| 277 | 279 | </SECTION> | |
| 278 | 280 | ||
| 279 | 281 | <SECTION> | |
| … | … | ||
| 370 | 370 | </SECTION> | |
| 371 | 371 | ||
| 372 | 372 | <SECTION> | |
| 373 | <FILE>champlain-cache</FILE> | ||
| 374 | <TITLE>ChamplainCache</TITLE> | ||
| 375 | ChamplainCache | ||
| 376 | ChamplainCacheClass | ||
| 377 | champlain_cache_dup_default | ||
| 378 | champlain_cache_fill_tile | ||
| 379 | champlain_cache_dup_default | ||
| 380 | champlain_cache_get_size_limit | ||
| 381 | champlain_cache_purge | ||
| 382 | champlain_cache_purge_on_idle | ||
| 383 | champlain_cache_set_size_limit | ||
| 384 | champlain_cache_tile_is_expired | ||
| 385 | champlain_cache_update_tile | ||
| 386 | champlain_cache_update_tile_with_session | ||
| 387 | champlain_cache_delete_session | ||
| 388 | champlain_cache_get_filename | ||
| 373 | <FILE>champlain-tile-cache</FILE> | ||
| 374 | <TITLE>ChamplainTileCache</TITLE> | ||
| 375 | ChamplainTileCache | ||
| 376 | champlain_tile_cache_get_persistent | ||
| 377 | champlain_tile_cache_store_tile | ||
| 378 | champlain_tile_cache_refresh_tile_time | ||
| 379 | champlain_tile_cache_on_tile_filled | ||
| 380 | champlain_tile_cache_clean | ||
| 389 | 381 | <SUBSECTION Standard> | |
| 390 | CHAMPLAIN_CACHE | ||
| 391 | CHAMPLAIN_IS_CACHE | ||
| 392 | CHAMPLAIN_TYPE_CACHE | ||
| 393 | champlain_cache_get_type | ||
| 394 | CHAMPLAIN_CACHE_CLASS | ||
| 395 | CHAMPLAIN_IS_CACHE_CLASS | ||
| 396 | CHAMPLAIN_CACHE_GET_CLASS | ||
| 382 | CHAMPLAIN_TILE_CACHE | ||
| 383 | CHAMPLAIN_IS_TILE_CACHE | ||
| 384 | CHAMPLAIN_TYPE_TILE_CACHE | ||
| 385 | champlain_tile_cache_get_type | ||
| 386 | CHAMPLAIN_TILE_CACHE_CLASS | ||
| 387 | CHAMPLAIN_IS_TILE_CACHE_CLASS | ||
| 388 | CHAMPLAIN_TILE_CACHE_GET_CLASS | ||
| 389 | <SUBSECTION Private> | ||
| 390 | ChamplainTileCacheClass | ||
| 397 | 391 | </SECTION> | |
| 398 | 392 | ||
| 399 | 393 | <SECTION> | |
| … | … | ||
| 399 | 399 | champlain_map_source_factory_dup_default | |
| 400 | 400 | champlain_map_source_factory_dup_list | |
| 401 | 401 | champlain_map_source_factory_create | |
| 402 | champlain_map_source_factory_create_cached_source | ||
| 402 | 403 | champlain_map_source_factory_register | |
| 403 | champlain_map_source_desc_copy | ||
| 404 | champlain_map_source_desc_free | ||
| 405 | champlain_map_source_desc_get_type | ||
| 406 | champlain_map_source_desc_new | ||
| 407 | champlain_map_source_factory_get_list | ||
| 404 | CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK | ||
| 405 | CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER | ||
| 406 | CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP | ||
| 407 | CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP | ||
| 408 | CHAMPLAIN_MAP_SOURCE_OAM | ||
| 409 | CHAMPLAIN_MAP_SOURCE_MFF_RELIEF | ||
| 410 | CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL | ||
| 411 | CHAMPLAIN_MAP_SOURCE_MEMPHIS_NETWORK | ||
| 408 | 412 | <SUBSECTION Standard> | |
| 409 | 413 | CHAMPLAIN_MAP_SOURCE_FACTORY | |
| 410 | 414 | CHAMPLAIN_IS_MAP_SOURCE_FACTORY | |
| … | … | ||
| 417 | 417 | CHAMPLAIN_MAP_SOURCE_FACTORY_CLASS | |
| 418 | 418 | CHAMPLAIN_IS_MAP_SOURCE_FACTORY_CLASS | |
| 419 | 419 | CHAMPLAIN_MAP_SOURCE_FACTORY_GET_CLASS | |
| 420 | <SUBSECTION Private> | ||
| 421 | ChamplainMapSourceFactoryClass | ||
| 422 | ChamplainMapSourceFactoryPrivate | ||
| 420 | 423 | </SECTION> | |
| 421 | 424 | ||
| 422 | 425 | <SECTION> | |
| … | … | ||
| 451 | 451 | CHAMPLAIN_POLYGON_CLASS | |
| 452 | 452 | CHAMPLAIN_IS_POLYGON_CLASS | |
| 453 | 453 | CHAMPLAIN_POLYGON_GET_CLASS | |
| 454 | <SUBSECTION Private> | ||
| 455 | ChamplainPolygonClass | ||
| 456 | ChamplainPolygonPrivate | ||
| 454 | 457 | </SECTION> | |
| 455 | 458 | ||
| 456 | 459 | <SECTION> | |
| … | … | ||
| 480 | 480 | CHAMPLAIN_SELECTION_LAYER_GET_CLASS | |
| 481 | 481 | CHAMPLAIN_TYPE_SELECTION_LAYER | |
| 482 | 482 | champlain_selection_layer_get_type | |
| 483 | <SUBSECTION Private> | ||
| 484 | ChamplainSelectionLayerClass | ||
| 485 | ChamplainSelectionLayerPrivate | ||
| 483 | 486 | </SECTION> | |
| 484 | 487 | ||
| 485 | 488 | <SECTION> | |
| 486 | <FILE>champlain-memphis-map-source</FILE> | ||
| 487 | <TITLE>ChamplainMemphisMapSource</TITLE> | ||
| 488 | ChamplainMemphisMapSource | ||
| 489 | champlain_memphis_map_source_new_full | ||
| 490 | champlain_memphis_map_source_load_rules | ||
| 491 | champlain_memphis_map_source_set_background_color | ||
| 492 | champlain_memphis_map_source_get_background_color | ||
| 493 | champlain_memphis_map_source_set_map_data_source | ||
| 494 | champlain_memphis_map_source_get_map_data_source | ||
| 495 | champlain_memphis_map_source_set_rule | ||
| 496 | champlain_memphis_map_source_get_rule | ||
| 497 | champlain_memphis_map_source_remove_rule | ||
| 498 | champlain_memphis_map_source_get_rule_ids | ||
| 499 | champlain_memphis_map_source_set_session_id | ||
| 500 | champlain_memphis_map_source_get_session_id | ||
| 501 | champlain_memphis_map_source_delete_session_cache | ||
| 489 | <FILE>champlain-memphis-tile-source</FILE> | ||
| 490 | <TITLE>ChamplainMemphisTileSource</TITLE> | ||
| 491 | ChamplainMemphisTileSource | ||
| 492 | champlain_memphis_tile_source_new_full | ||
| 493 | champlain_memphis_tile_source_load_rules | ||
| 494 | champlain_memphis_tile_source_set_background_color | ||
| 495 | champlain_memphis_tile_source_get_background_color | ||
| 496 | champlain_memphis_tile_source_set_map_data_source | ||
| 497 | champlain_memphis_tile_source_get_map_data_source | ||
| 498 | champlain_memphis_tile_source_set_rule | ||
| 499 | champlain_memphis_tile_source_get_rule | ||
| 500 | champlain_memphis_tile_source_remove_rule | ||
| 501 | champlain_memphis_tile_source_get_rule_ids | ||
| 502 | 502 | <SUBSECTION Standard> | |
| 503 | CHAMPLAIN_MEMPHIS_MAP_SOURCE | ||
| 504 | CHAMPLAIN_IS_MEMPHIS_MAP_SOURCE | ||
| 505 | CHAMPLAIN_TYPE_MEMPHIS_MAP_SOURCE | ||
| 506 | champlain_memphis_map_source_get_type | ||
| 507 | CHAMPLAIN_MEMPHIS_MAP_SOURCE_CLASS | ||
| 508 | CHAMPLAIN_IS_MEMPHIS_MAP_SOURCE_CLASS | ||
| 509 | CHAMPLAIN_MEMPHIS_MAP_SOURCE_GET_CLASS | ||
| 503 | CHAMPLAIN_MEMPHIS_TILE_SOURCE | ||
| 504 | CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE | ||
| 505 | CHAMPLAIN_TYPE_MEMPHIS_TILE_SOURCE | ||
| 506 | champlain_memphis_tile_source_get_type | ||
| 507 | CHAMPLAIN_MEMPHIS_TILE_SOURCE_CLASS | ||
| 508 | CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE_CLASS | ||
| 509 | CHAMPLAIN_MEMPHIS_TILE_SOURCE_GET_CLASS | ||
| 510 | <SUBSECTION Private> | ||
| 511 | ChamplainMemphisTileSourceClass | ||
| 510 | 512 | </SECTION> | |
| 511 | 513 | ||
| 512 | 514 | <SECTION> | |
| … | … | ||
| 524 | 524 | CHAMPLAIN_MAP_DATA_SOURCE_CLASS | |
| 525 | 525 | CHAMPLAIN_IS_MAP_DATA_SOURCE_CLASS | |
| 526 | 526 | CHAMPLAIN_MAP_DATA_SOURCE_GET_CLASS | |
| 527 | <SUBSECTION Private> | ||
| 528 | ChamplainMapDataSourceClass | ||
| 527 | 529 | </SECTION> | |
| 528 | 530 | ||
| 529 | 531 | <SECTION> | |
| … | … | ||
| 542 | 542 | CHAMPLAIN_LOCAL_MAP_DATA_SOURCE_CLASS | |
| 543 | 543 | CHAMPLAIN_IS_LOCAL_MAP_DATA_SOURCE_CLASS | |
| 544 | 544 | CHAMPLAIN_LOCAL_MAP_DATA_SOURCE_GET_CLASS | |
| 545 | <SUBSECTION Private> | ||
| 546 | ChamplainLocalMapDataSourceClass | ||
| 545 | 547 | </SECTION> | |
| 546 | 548 | ||
| 547 | 549 | <SECTION> | |
| … | … | ||
| 562 | 562 | CHAMPLAIN_NETWORK_MAP_DATA_SOURCE_CLASS | |
| 563 | 563 | CHAMPLAIN_IS_NETWORK_MAP_DATA_SOURCE_CLASS | |
| 564 | 564 | CHAMPLAIN_NETWORK_MAP_DATA_SOURCE_GET_CLASS | |
| 565 | <SUBSECTION Private> | ||
| 566 | ChamplainNetworkMapDataSourceClass | ||
| 565 | 567 | </SECTION> | |
| 566 | 568 | ||
| 567 | 569 | <SECTION> | |
| … | … | ||
| 578 | 578 | CHAMPLAIN_BOUNDING_BOX | |
| 579 | 579 | CHAMPLAIN_TYPE_BOUNDING_BOX | |
| 580 | 580 | champlain_bounding_box_get_type | |
| 581 | </SECTION> | ||
| 582 | |||
| 583 | <SECTION> | ||
| 584 | <FILE>champlain-map-source-chain</FILE> | ||
| 585 | <TITLE>ChamplainMapSourceChain</TITLE> | ||
| 586 | ChamplainMapSourceChain | ||
| 587 | champlain_map_source_chain_new | ||
| 588 | champlain_map_source_chain_push | ||
| 589 | champlain_map_source_chain_pop | ||
| 590 | <SUBSECTION Standard> | ||
| 591 | CHAMPLAIN_MAP_SOURCE_CHAIN | ||
| 592 | CHAMPLAIN_IS_MAP_SOURCE_CHAIN | ||
| 593 | CHAMPLAIN_TYPE_MAP_SOURCE_CHAIN | ||
| 594 | champlain_map_source_chain_get_type | ||
| 595 | CHAMPLAIN_MAP_SOURCE_CHAIN_CLASS | ||
| 596 | CHAMPLAIN_IS_MAP_SOURCE_CHAIN_CLASS | ||
| 597 | CHAMPLAIN_MAP_SOURCE_CHAIN_GET_CLASS | ||
| 598 | <SUBSECTION Private> | ||
| 599 | ChamplainMapSourceChainClass | ||
| 600 | </SECTION> | ||
| 601 | |||
| 602 | <SECTION> | ||
| 603 | <FILE>champlain-tile-source</FILE> | ||
| 604 | <TITLE>ChamplainTileSource</TITLE> | ||
| 605 | ChamplainTileSource | ||
| 606 | champlain_tile_source_set_cache | ||
| 607 | champlain_tile_source_get_cache | ||
| 608 | champlain_tile_source_set_id | ||
| 609 | champlain_tile_source_set_name | ||
| 610 | champlain_tile_source_set_license | ||
| 611 | champlain_tile_source_set_license_uri | ||
| 612 | champlain_tile_source_set_min_zoom_level | ||
| 613 | champlain_tile_source_set_max_zoom_level | ||
| 614 | champlain_tile_source_set_tile_size | ||
| 615 | champlain_tile_source_set_projection | ||
| 616 | <SUBSECTION Standard> | ||
| 617 | CHAMPLAIN_TILE_SOURCE | ||
| 618 | CHAMPLAIN_IS_TILE_SOURCE | ||
| 619 | CHAMPLAIN_TYPE_TILE_SOURCE | ||
| 620 | champlain_tile_source_get_type | ||
| 621 | CHAMPLAIN_TILE_SOURCE_CLASS | ||
| 622 | CHAMPLAIN_IS_TILE_SOURCE_CLASS | ||
| 623 | CHAMPLAIN_TILE_SOURCE_GET_CLASS | ||
| 624 | <SUBSECTION Private> | ||
| 625 | ChamplainTileSourceClass | ||
| 626 | </SECTION> | ||
| 627 | |||
| 628 | <SECTION> | ||
| 629 | <FILE>champlain-error-tile-source</FILE> | ||
| 630 | <TITLE>ChamplainErrorTileSource</TITLE> | ||
| 631 | ChamplainErrorTileSource | ||
| 632 | champlain_error_tile_source_new_full | ||
| 633 | <SUBSECTION Standard> | ||
| 634 | CHAMPLAIN_ERROR_TILE_SOURCE | ||
| 635 | CHAMPLAIN_IS_ERROR_TILE_SOURCE | ||
| 636 | CHAMPLAIN_TYPE_ERROR_TILE_SOURCE | ||
| 637 | champlain_error_tile_source_get_type | ||
| 638 | CHAMPLAIN_ERROR_TILE_SOURCE_CLASS | ||
| 639 | CHAMPLAIN_IS_ERROR_TILE_SOURCE_CLASS | ||
| 640 | CHAMPLAIN_ERROR_TILE_SOURCE_GET_CLASS | ||
| 641 | <SUBSECTION Private> | ||
| 642 | ChamplainErrorTileSourceClass | ||
| 643 | </SECTION> | ||
| 644 | |||
| 645 | <SECTION> | ||
| 646 | <FILE>champlain-file-cache</FILE> | ||
| 647 | <TITLE>ChamplainFileCache</TITLE> | ||
| 648 | ChamplainFileCache | ||
| 649 | champlain_file_cache_new | ||
| 650 | champlain_file_cache_new_full | ||
| 651 | champlain_file_cache_set_size_limit | ||
| 652 | champlain_file_cache_get_size_limit | ||
| 653 | champlain_file_cache_get_cache_dir | ||
| 654 | champlain_file_cache_purge | ||
| 655 | champlain_file_cache_purge_on_idle | ||
| 656 | <SUBSECTION Standard> | ||
| 657 | CHAMPLAIN_FILE_CACHE | ||
| 658 | CHAMPLAIN_IS_FILE_CACHE | ||
| 659 | CHAMPLAIN_TYPE_FILE_CACHE | ||
| 660 | champlain_file_cache_get_type | ||
| 661 | CHAMPLAIN_FILE_CACHE_CLASS | ||
| 662 | CHAMPLAIN_IS_FILE_CACHE_CLASS | ||
| 663 | CHAMPLAIN_FILE_CACHE_GET_CLASS | ||
| 664 | <SUBSECTION Private> | ||
| 665 | ChamplainFileCacheClass | ||
| 581 | 666 | </SECTION> |
docs/reference/libchamplain.types
(7 / 0)
|   | |||
| 6 | 6 | champlain_layer_get_type | |
| 7 | 7 | champlain_selection_layer_get_type | |
| 8 | 8 | champlain_map_source_get_type | |
| 9 | champlain_map_source_chain_get_type | ||
| 10 | champlain_tile_source_get_type | ||
| 11 | champlain_tile_cache_get_type | ||
| 12 | champlain_network_tile_source_get_type | ||
| 13 | champlain_error_tile_source_get_type | ||
| 14 | champlain_file_cache_get_type | ||
| 9 | 15 | champlain_tile_get_type | |
| 10 | 16 | champlain_map_source_factory_get_type | |
| 11 | 17 | champlain_polygon_get_type | |
| 12 | 18 | champlain_point_get_type | |
| 19 | champlain_memphis_tile_source_get_type | ||
| 13 | 20 | champlain_map_data_source_get_type | |
| 14 | 21 | champlain_local_map_data_source_get_type | |
| 15 | 22 | champlain_network_map_data_source_get_type |
Comments
Add your comment
Please log in to comment



Add a new comment:
Login or create an account to post a comment