MapSource
Object Hierarchy:
Description:
[ CCode ( type_id = "shumate_map_source_get_type ()" ) ]
public abstract class MapSource : Object
The base class for all map sources.
Map sources fill [class@Tile] objects with images from various sources: a web API, for example, or a test pattern generated on demand.
The most common map source is [class@RasterRenderer], which fetches tiles using a [class@TileDownloader].
Content:
Properties:
- public string id { get; set construct; }
The id of the map source
- public string license { get; set construct; }
The usage license of the map source
- public string license_uri { get; set construct; }
The usage license's uri for more information
- public uint max_zoom_level { get; set construct; }
The maximum zoom level
- public uint min_zoom_level { get; set construct; }
The minimum zoom level
- public string name { get; set construct; }
The name of the map source
- public MapProjection projection { get; set construct; }
The map projection of the map source
- public uint tile_size { get; set construct; }
The tile size of the map source
Creation methods:
Methods:
- public virtual async bool fill_tile_async (Tile tile, Cancellable? cancellable) throws Error
Asynchronous version of shumate_map_source_fill_tile
.
- public uint get_column_count (uint zoom_level)
Gets the number of tiles in a column at this zoom level for this map
source.
- public unowned string get_id ()
Gets map source's id.
- public double get_latitude (double zoom_level, double y)
Gets the latitude corresponding to this y position in the map source's
projection.
- public unowned string get_license ()
Gets map source's license.
- public unowned string get_license_uri ()
Gets map source's license URI.
- public double get_longitude (double zoom_level, double x)
Gets the longitude corresponding to this x position in the map
source's projection.
- public uint get_max_zoom_level ()
Gets map source's maximum zoom level.
- public double get_meters_per_pixel (double zoom_level, double latitude, double longitude)
Gets meters per pixel at the position on the map using this map
source's projection.
- public uint get_min_zoom_level ()
Gets map source's minimum zoom level.
- public unowned string get_name ()
Gets map source's name.
- public MapProjection get_projection ()
Gets map source's projection.
- public uint get_row_count (uint zoom_level)
Gets the number of tiles in a row at this zoom level for this map
source.
- public uint get_tile_size ()
Gets map source's tile size.
- public double get_tile_size_at_zoom (double zoom_level)
Gets the apparent size of the map tiles at the given fractional zoom
level.
- public double get_x (double zoom_level, double longitude)
Gets the x position on the map using this map source's projection.
- public double get_y (double zoom_level, double latitude)
Gets the y position on the map using this map source's projection.
- public void set_id (string id)
Sets the map source's id.
- public void set_license (string license)
Sets the map source's license.
- public void set_license_uri (string license_uri)
Sets the map source's license URI.
- public void set_max_zoom_level (uint zoom_level)
Sets the map source's maximum zoom level.
- public void set_min_zoom_level (uint zoom_level)
Sets the map source's minimal zoom level.
- public void set_name (string name)
Sets the map source's name.
- public void set_projection (MapProjection projection)
Sets the map source's projection.
- public void set_tile_size (uint tile_size)
Sets the map source's tile size.
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref