This file includes functions related with map generation. More...
Go to the source code of this file.
Typedefs | |
typedef bool(* | ast_get_map_url_func_t) (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Function prototype of getting map url. More... | |
Enumerations | |
enum | ast_map_zoom_t { AST_MAP_ZOOM_OVERVIEW, AST_MAP_ZOOM_DETAIL } |
Functions | |
void | ast_reg_callback_get_map_url (ast_get_map_url_func_t callback) |
Register callback function of ast_get_map_url_func_t. More... | |
bool | ast_get_map_url_google (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Map service use Google Maps. More... | |
bool | ast_get_map_url_googlechina (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Map service use Google Maps China. More... | |
bool | ast_get_map_url_osm (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Map service use Open Street Map. More... | |
bool | ast_get_map_url_tencent (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Map service use Tencent Map. More... | |
bool | ast_get_map_url_baidu (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Map service use Baidu Map. More... | |
bool | ast_get_map_url_nomap (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Null Map service. More... | |
This file includes functions related with map generation.
typedef bool(* ast_get_map_url_func_t) (char *url, const size_t url_size, const int width, const int height, const ast_map_zoom_t zoom, const double latitude, const double longitude) |
Function prototype of getting map url.
url | Buffer to save return url |
url_size | Url buffer size |
width | Perfered image width |
height | Perfered image width |
zoom | Map zoom level |
latitude | Latitude of map center |
longitude | Longitude of map center |
If return true, the url shall be filled with URL of the map image like http://maps.example.com/image.png.
enum ast_map_zoom_t |
bool ast_get_map_url_baidu | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Map service use Baidu Map.
The text in map are in Simplified Chinese.
bool ast_get_map_url_google | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Map service use Google Maps.
bool ast_get_map_url_googlechina | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Map service use Google Maps China.
bool ast_get_map_url_nomap | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Null Map service.
This is a fake map service which will always return false. No embeded map will be generated if this map service is selected.
bool ast_get_map_url_osm | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Map service use Open Street Map.
bool ast_get_map_url_tencent | ( | char * | url, |
const size_t | url_size, | ||
const int | width, | ||
const int | height, | ||
const ast_map_zoom_t | zoom, | ||
const double | latitude, | ||
const double | longitude | ||
) |
Map service use Tencent Map.
The Tencent Map service covers only China, Google Maps will be called if map center is out of coverage.
void ast_reg_callback_get_map_url | ( | ast_get_map_url_func_t | callback | ) |
Register callback function of ast_get_map_url_func_t.