VikMapSource

VikMapSource — the base class to describe map source

Functions

Object Hierarchy

    GObject
    ╰── VikMapSource
        ├── VikMapSourceDefault
        ╰── VikMapType

Description

The VikMapSource class is both the interface and the base class for the hierarchie of map source.

Functions

vik_map_source_get_copyright ()

void
vik_map_source_get_copyright (VikMapSource *self,
                              LatLonBBox bbox,
                              gdouble zoom,
                              void (*fct) (VikViewport*,const gchar*),
                              void *data);

Retrieve copyright(s) for the corresponding bounding box and zoom level.

Parameters

self

the VikMapSource of interest.

 

bbox

bounding box of interest.

 

zoom

the zoom level of interest.

 

fct

the callback function to use to return matching copyrights.

 

data

the user data to use to call the callbaack function.

 

vik_map_source_get_license ()

const gchar *
vik_map_source_get_license (VikMapSource *self);

vik_map_source_get_license_url ()

const gchar *
vik_map_source_get_license_url (VikMapSource *self);

vik_map_source_get_logo ()

const GdkPixbuf *
vik_map_source_get_logo (VikMapSource *self);

vik_map_source_get_name ()

const gchar *
vik_map_source_get_name (VikMapSource *self);

vik_map_source_get_uniq_id ()

guint16
vik_map_source_get_uniq_id (VikMapSource *self);

vik_map_source_get_label ()

const gchar *
vik_map_source_get_label (VikMapSource *self);

vik_map_source_get_tilesize_x ()

guint16
vik_map_source_get_tilesize_x (VikMapSource *self);

vik_map_source_get_tilesize_y ()

guint16
vik_map_source_get_tilesize_y (VikMapSource *self);

vik_map_source_get_drawmode ()

VikViewportDrawMode
vik_map_source_get_drawmode (VikMapSource *self);

vik_map_source_is_direct_file_access ()

gboolean
vik_map_source_is_direct_file_access (VikMapSource *self);

Return true when we can bypass all this download malarky Treat the files as a pre generated data set in OSM tile server layout: tiledir/d/d/d.png

Parameters

self

the VikMapSource of interest.

 

vik_map_source_is_mbtiles ()

gboolean
vik_map_source_is_mbtiles (VikMapSource *self);

Return true when the map is in an MB Tiles format. See http://github.com/mapbox/mbtiles-spec (Read Only ATM)

Parameters

self

the VikMapSource of interest.

 

vik_map_source_is_osm_meta_tiles ()

gboolean
vik_map_source_is_osm_meta_tiles (VikMapSource *self);

Treat the files as a pre generated data set directly by tirex or renderd tiledir/Z/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy].meta

Parameters

self

the VikMapSource of interest.

 

vik_map_source_supports_download_only_new ()

gboolean
vik_map_source_supports_download_only_new
                               (VikMapSource *self);

vik_map_source_get_zoom_min ()

guint8
vik_map_source_get_zoom_min (VikMapSource *self);

vik_map_source_get_zoom_max ()

guint8
vik_map_source_get_zoom_max (VikMapSource *self);

vik_map_source_get_lat_min ()

gdouble
vik_map_source_get_lat_min (VikMapSource *self);

vik_map_source_get_lat_max ()

gdouble
vik_map_source_get_lat_max (VikMapSource *self);

vik_map_source_get_lon_min ()

gdouble
vik_map_source_get_lon_min (VikMapSource *self);

vik_map_source_get_lon_max ()

gdouble
vik_map_source_get_lon_max (VikMapSource *self);

vik_map_source_get_file_extension ()

const gchar *
vik_map_source_get_file_extension (VikMapSource *self);

Returns the file extension of files held on disk. Typically .png but may be .jpg or whatever the user defines

Parameters

self

the VikMapSource of interest.

 

vik_map_source_coord_to_mapcoord ()

gboolean
vik_map_source_coord_to_mapcoord (VikMapSource *self,
                                  const VikCoord *src,
                                  gdouble xzoom,
                                  gdouble yzoom,
                                  MapCoord *dest);

vik_map_source_mapcoord_to_center_coord ()

void
vik_map_source_mapcoord_to_center_coord
                               (VikMapSource *self,
                                MapCoord *src,
                                VikCoord *dest);

vik_map_source_download ()

int
vik_map_source_download (VikMapSource *self,
                         MapCoord *src,
                         const gchar *dest_fn,
                         void *handle);

Parameters

self

The VikMapSource of interest.

 

src

The map location to download

 

dest_fn

The filename to save the result in

 

handle

Potential reusable Curl Handle (may be NULL)

 

Returns

How successful the download was as per the type DownloadResult_t


vik_map_source_download_handle_init ()

void *
vik_map_source_download_handle_init (VikMapSource *self);

vik_map_source_download_handle_cleanup ()

void
vik_map_source_download_handle_cleanup
                               (VikMapSource *self,
                                void *handle);