DRIVING_STYLE_AGGRESSIVE
} route_driving_style;
+typedef enum {
+ TANGRAM_VIEW_NORMAL = 0,
+ TANGRAM_VIEW_TERRAIN,
+ TANGRAM_VIEW_SATELLITE,
+ TANGRAM_VIEW_HYBRID,
+ TANGRAM_VIEW_NOT_SUPPORTED
+} tangram_view_type;
+
typedef struct {
gdouble latitude;
gdouble longitude;
#include "mapzen_util.h"
#include "mapzen_debug.h"
+#include <maps_error.h>
+#include <maps_view.h>
#include <math.h>
#define PI 3.14159265359
}
}
+int convert_maps_error_to_mapzen_error(int error)
+{
+ switch (error) {
+ case MAPS_ERROR_NONE: return MAPZEN_ERROR_NONE;
+ case MAPS_ERROR_PERMISSION_DENIED: return MAPZEN_ERROR_PERMISSION_DENIED;
+ case MAPS_ERROR_OUT_OF_MEMORY: return MAPZEN_ERROR_OUT_OF_MEMORY;
+ case MAPS_ERROR_INVALID_PARAMETER: return MAPZEN_ERROR_INVALID_PARAMETER;
+ case MAPS_ERROR_NOT_SUPPORTED: return MAPZEN_ERROR_NOT_SUPPORTED;
+ case MAPS_ERROR_CONNECTION_TIME_OUT: return MAPZEN_ERROR_CONNECTION_TIMED_OUT;
+ case MAPS_ERROR_NETWORK_UNREACHABLE: return MAPZEN_ERROR_NETWORK_UNREACHABLE;
+ case MAPS_ERROR_INVALID_OPERATION: return MAPZEN_ERROR_INVALID_OPERATION;
+ case MAPS_ERROR_KEY_NOT_AVAILABLE: return MAPZEN_ERROR_KEY_NOT_AVAILABLE;
+ case MAPS_ERROR_RESOURCE_BUSY: return MAPZEN_ERROR_RESOURCE_BUSY;
+ case MAPS_ERROR_CANCELED: return MAPZEN_ERROR_CANCELED;
+ case MAPS_ERROR_UNKNOWN: return MAPZEN_ERROR_UNKNOWN;
+ case MAPS_ERROR_SERVICE_NOT_AVAILABLE: return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ case MAPS_ERROR_NOT_FOUND: return MAPZEN_ERROR_NOT_FOUND;
+ default: return MAPZEN_ERROR_UNKNOWN;
+ }
+}
+
+int convert_mapzen_error_to_maps_error(int error)
+{
+ switch (error) {
+ case MAPZEN_ERROR_NONE: return MAPS_ERROR_NONE;
+ case MAPZEN_ERROR_PERMISSION_DENIED: return MAPS_ERROR_PERMISSION_DENIED;
+ case MAPZEN_ERROR_OUT_OF_MEMORY: return MAPS_ERROR_OUT_OF_MEMORY;
+ case MAPZEN_ERROR_INVALID_PARAMETER: return MAPS_ERROR_INVALID_PARAMETER;
+ case MAPZEN_ERROR_NOT_SUPPORTED: return MAPS_ERROR_NOT_SUPPORTED;
+ case MAPZEN_ERROR_CONNECTION_TIMED_OUT: return MAPS_ERROR_CONNECTION_TIME_OUT;
+ case MAPZEN_ERROR_NETWORK_UNREACHABLE: return MAPS_ERROR_NETWORK_UNREACHABLE;
+ case MAPZEN_ERROR_INVALID_OPERATION: return MAPS_ERROR_INVALID_OPERATION;
+ case MAPZEN_ERROR_KEY_NOT_AVAILABLE: return MAPS_ERROR_KEY_NOT_AVAILABLE;
+ case MAPZEN_ERROR_RESOURCE_BUSY: return MAPS_ERROR_RESOURCE_BUSY;
+ case MAPZEN_ERROR_CANCELED: return MAPS_ERROR_CANCELED;
+ case MAPZEN_ERROR_UNKNOWN: return MAPS_ERROR_UNKNOWN;
+ case MAPZEN_ERROR_SERVICE_NOT_AVAILABLE: return MAPS_ERROR_SERVICE_NOT_AVAILABLE;
+ case MAPZEN_ERROR_NOT_FOUND: return MAPS_ERROR_NOT_FOUND;
+ default: return MAPS_ERROR_UNKNOWN;
+ }
+}
+
+int convert_tangram_view_type_to_maps_view_type(int maps_view_type)
+{
+ switch (maps_view_type) {
+ case TANGRAM_VIEW_NORMAL: return MAPS_VIEW_TYPE_NORMAL;
+ case TANGRAM_VIEW_TERRAIN: return MAPS_VIEW_TYPE_TERRAIN;
+ case TANGRAM_VIEW_SATELLITE: /*NOT SUPPORTED BY TANGRAM*/
+ case TANGRAM_VIEW_HYBRID: /*NOT SUPPORTED BY TANGRAM*/
+ default: return MAPS_VIEW_TYPE_NORMAL;
+ }
+}
+
+int convert_maps_view_type_to_tangram_view_type(int maps_view_type)
+{
+ switch (maps_view_type) {
+ case MAPS_VIEW_TYPE_NORMAL: return TANGRAM_VIEW_NORMAL;
+ case MAPS_VIEW_TYPE_SATELLITE: return TANGRAM_VIEW_NOT_SUPPORTED;
+ case MAPS_VIEW_TYPE_TERRAIN: return TANGRAM_VIEW_TERRAIN;
+ case MAPS_VIEW_TYPE_HYBRID: return TANGRAM_VIEW_NOT_SUPPORTED;
+ default: return TANGRAM_VIEW_NORMAL;
+ }
+}
void calculate_point(gdouble Lat1, gdouble Lon1, int dBearing, gdouble dist, coords_s **coord);
+int convert_maps_error_to_mapzen_error(int error);
+int convert_mapzen_error_to_maps_error(int error);
+int convert_tangram_view_type_to_maps_view_type(int maps_view_type);
+int convert_maps_view_type_to_tangram_view_type(int maps_view_type);
+
#endif /* _MAPZEN_UTIL_H_ */
* limitations under the License.
*/
- #include "tangram_view.hpp"
- #include "tangram/tangram.h"
+#include "mapzen_util.h"
+#include "mapzen_plugin_internal.h"
+#include "tangram_view.hpp"
+#include "tangram/tangram.h"
TangramView::TangramView()
{
mapzen_error_e TangramView::create(maps_view_h view, maps_plugin_map_view_ready_cb callback)
{
- // TODO
- return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ if (!view) {
+ return MAPZEN_ERROR_INVALID_PARAMETER;
+ }
+
+ int maps_error = MAPS_ERROR_NONE;
+ maps_error = maps_view_get_viewport(view, &m_image);
+ if (maps_error != MAPS_ERROR_NONE) {
+ return (mapzen_error_e)convert_maps_error_to_mapzen_error(maps_error);
+ }
+
+ maps_error = maps_view_get_screen_location(view, &m_x, &m_y, &m_w, &m_h);
+ if (maps_error == MAPS_ERROR_NONE) {
+ return (mapzen_error_e)convert_maps_error_to_mapzen_error(maps_error);
+ }
+
+ // Create an OpenGL context.
+ {
+ m_config = evas_gl_config_new();
+ if (!m_config) {
+ MAPS_LOGE("evas_gl_config_new() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+
+ m_config->color_format = EVAS_GL_RGBA_8888;
+ m_config->depth_bits = EVAS_GL_DEPTH_BIT_24;
+ m_config->stencil_bits = EVAS_GL_STENCIL_NONE;
+ m_config->options_bits = EVAS_GL_OPTIONS_DIRECT;
+
+ m_gl = evas_gl_new(evas_object_evas_get(m_image));
+ if (!m_gl) {
+ MAPS_LOGE("evas_gl_new() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+
+ m_api = evas_gl_api_get(m_gl);
+ if (!m_api) {
+ MAPS_LOGE("evas_gl_api_get() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+
+ m_context = evas_gl_context_create(m_gl, nullptr);
+ if (!m_context) {
+ MAPS_LOGE("evas_gl_context_create() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+ }
+
+ // Set up rendering surface.
+ auto error = setupOpenGlSurface(view);
+ if (error != MAPZEN_ERROR_NONE) {
+ return error;
+ }
+
+ // Set up the tangram map.
+ // TODO: Decide where scene file will be stored and how it will be configurable.
+ Tangram::initialize("scene.yaml");
+ Tangram::setupGL();
+ Tangram::resize(m_w, m_h);
+
+ m_isInitialized = true;
+
+ return MAPZEN_ERROR_NONE;
+}
+
+mapzen_error_e TangramView::setupOpenGlSurface(maps_view_h view)
+{
+ if (!view || !m_gl || !m_config || !m_image || !m_context) {
+ return MAPZEN_ERROR_INVALID_PARAMETER;
+ }
+
+ // Remove any previous pixel callback on the image.
+ evas_object_image_pixels_get_callback_set(m_image, nullptr, nullptr);
+
+ if (m_surface) {
+ // Destroy the old surface.
+ evas_object_image_native_surface_set(m_image, nullptr);
+ evas_gl_surface_destroy(m_gl, m_surface);
+ }
+
+ m_w = MAX(m_w, 1);
+ m_h = MAX(m_h, 1);
+
+ evas_object_image_size_set(m_image, m_w, m_h);
+
+ Evas_Native_Surface native_surface;
+ m_surface = evas_gl_surface_create(m_gl, m_config, m_w, m_h);
+ if (!m_surface) {
+ MAPS_LOGE("evas_gl_surface_create() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+
+ if (!evas_gl_native_surface_get(m_gl, m_surface, &native_surface)) {
+ // Could not get the native surface information, so destroy the surface and exit.
+ evas_gl_make_current(m_gl, nullptr, nullptr);
+ evas_gl_surface_destroy(m_gl, m_surface);
+ m_surface = nullptr;
+ MAPS_LOGE("evas_gl_native_surface_get() failed");
+ return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ }
+
+ // Set the native surface information and pixel callback on the image.
+ evas_object_image_native_surface_set(m_image, &native_surface);
+ evas_object_image_pixels_get_callback_set(m_image, pixelGetCb, view);
+
+ return MAPZEN_ERROR_NONE;
}
mapzen_error_e TangramView::destroy(maps_view_h view)
{
- // TODO
- return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
+ if (!view) {
+ return MAPZEN_ERROR_INVALID_PARAMETER;
+ }
+
+ m_isInitialized = false;
+
+ if (m_image) {
+ evas_object_image_pixels_get_callback_set(m_image, nullptr, nullptr);
+ }
+
+ if (m_gl) {
+ if (m_surface && m_context) {
+ evas_gl_make_current(m_gl, m_surface, m_context);
+ }
+ if (m_surface) {
+ evas_object_image_native_surface_set(m_image, nullptr);
+ evas_gl_surface_destroy(m_gl, m_surface);
+ }
+ if (m_context) {
+ evas_gl_context_destroy(m_gl, m_context);
+ }
+ evas_gl_free(m_gl);
+ m_gl = nullptr;
+ }
+
+ if (m_config) {
+ evas_gl_config_free(m_config);
+ }
+
+ return MAPZEN_ERROR_NONE;
}
mapzen_error_e TangramView::render(maps_view_h view, const maps_coordinates_h coord, double zoom, double angle)
return MAPZEN_ERROR_INVALID_PARAMETER;
}
- if (!isInitialized) {
+ if (!m_isInitialized) {
return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
}
// The delta_x and delta_y values are in pixels, so we need to determine the equivalent displacement in
// longitude and latitude to set the new center position.
- double x = 0.5 * w + (double)delta_x;
- double y = 0.5 * h + (double)delta_y; // TODO: Check whether sign of delta_y needs to be flipped.
+ double x = 0.5 * m_w + (double)delta_x;
+ double y = 0.5 * m_h + (double)delta_y; // TODO: Check whether sign of delta_y needs to be flipped.
Tangram::screenToWorldCoordinates(x, y);
Tangram::setPosition(x, y);
return MAPZEN_ERROR_INVALID_PARAMETER;
}
- if (!isInitialized) {
+ if (!m_isInitialized) {
return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
}
return MAPZEN_ERROR_INVALID_PARAMETER;
}
- if (!isInitialized) {
+ if (!m_isInitialized) {
return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
}
return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
}
-mapzen_error_e TangramView::initOpenGL()
-{
- // TODO
- return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
-}
-
-mapzen_error_e TangramView::initOpenGLSurface(maps_view_h view)
-{
- // TODO
- return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
-}
-
-mapzen_error_e TangramView::initMap(maps_view_h view, maps_plugin_map_view_ready_cb callback)
-{
- // TODO
- return MAPZEN_ERROR_SERVICE_NOT_AVAILABLE;
-}
-
void TangramView::setMapType(maps_view_h view)
{
// TODO
mapzen_error_e onViewObject(maps_view_h view, const maps_view_object_h object, maps_view_object_operation_e operation);
private:
- mapzen_error_e initOpenGL();
- mapzen_error_e initOpenGLSurface(maps_view_h view);
- mapzen_error_e initMap(maps_view_h view, maps_plugin_map_view_ready_cb callback);
+ mapzen_error_e setupOpenGlSurface(maps_view_h view);
void setMapType(maps_view_h view);
static Eina_Bool idlerCb(void *data);
static void readyMapCb(maps_view_h view);
private:
- Evas_Object *image = nullptr;
- Evas_GL_Context *context = nullptr;
- Evas_GL_Surface *surface = nullptr;
- Evas_GL_Config *config = nullptr;
- Evas_GL *gl = nullptr;
- Evas_GL_API *api = nullptr;
+ Evas_Object *m_image = nullptr;
+ Evas_GL_Context *m_context = nullptr;
+ Evas_GL_Surface *m_surface = nullptr;
+ Evas_GL_Config *m_config = nullptr;
+ Evas_GL *m_gl = nullptr;
+ Evas_GL_API *m_api = nullptr;
- bool isInitialized = false;
+ bool m_isInitialized = false;
- int x = 0, y = 0, w = 0, h = 0;
- double lat = 0., lng = 0., zoom = 0., angle = 0.;
+ int m_x = 0;
+ int m_y = 0;
+ int m_w = 0;
+ int m_h = 0;
+ double m_lat = 0.;
+ double m_lng = 0.;
+ double m_zoom = 0.;
+ double m_angle = 0.;
- Ecore_Idler *idler = nullptr;
- bool redraw = false;
+ bool m_redraw = false;
- maps_plugin_map_view_ready_cb readyCb = nullptr;
+ maps_plugin_map_view_ready_cb m_readyCb = nullptr;
};
int __maps_service_instance_count = 0;
-static int __convert_to_maps_error(int ret)
-{
- switch (ret) {
- case MAPZEN_ERROR_NONE:
- return MAPS_ERROR_NONE;
- case MAPZEN_ERROR_PERMISSION_DENIED:
- return MAPS_ERROR_PERMISSION_DENIED;
- case MAPZEN_ERROR_OUT_OF_MEMORY:
- return MAPS_ERROR_OUT_OF_MEMORY;
- case MAPZEN_ERROR_INVALID_PARAMETER:
- return MAPS_ERROR_INVALID_PARAMETER;
- case MAPZEN_ERROR_NOT_SUPPORTED:
- return MAPS_ERROR_NOT_SUPPORTED;
- case MAPZEN_ERROR_CONNECTION_TIMED_OUT:
- return MAPS_ERROR_CONNECTION_TIME_OUT;
- case MAPZEN_ERROR_NETWORK_UNREACHABLE:
- return MAPS_ERROR_NETWORK_UNREACHABLE;
- case MAPZEN_ERROR_INVALID_OPERATION:
- return MAPS_ERROR_INVALID_OPERATION;
- case MAPZEN_ERROR_KEY_NOT_AVAILABLE:
- return MAPS_ERROR_KEY_NOT_AVAILABLE;
- case MAPZEN_ERROR_RESOURCE_BUSY:
- return MAPS_ERROR_RESOURCE_BUSY;
- case MAPZEN_ERROR_CANCELED:
- return MAPS_ERROR_CANCELED;
- case MAPZEN_ERROR_UNKNOWN:
- return MAPS_ERROR_UNKNOWN;
- case MAPZEN_ERROR_SERVICE_NOT_AVAILABLE:
- return MAPS_ERROR_SERVICE_NOT_AVAILABLE;
- case MAPZEN_ERROR_NOT_FOUND:
- return MAPS_ERROR_NOT_FOUND;
- default:
- return MAPS_ERROR_UNKNOWN;
- }
-}
/*
static maps_route_turn_type_e __convert_route_turn_type(int index)
{
__plugin = plugin;
}
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_init(maps_plugin_h *plugin)
__plugin = NULL;
}
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_is_service_supported(maps_service_e service, bool *supported)
if ((result != MAPZEN_ERROR_NONE) || (co_ordinates == NULL)) {
MAPS_LOGD(">>>>> Invalid GEOCODE result <<<<<");
- calldata_geocode->callback((maps_error_e)__convert_to_maps_error(result), calldata_geocode->reqID, 0, 0, NULL, calldata_geocode->data);
+ calldata_geocode->callback((maps_error_e)convert_mapzen_error_to_maps_error(result), calldata_geocode->reqID, 0, 0, NULL, calldata_geocode->data);
} else {
int total_count = (int) g_list_length(co_ordinates);
int index = 0;
int ret = mapzen_geocode(geocode_req, __mapzen_geocode_cb, __request_id, (void *) calldata_geocode);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_geocode_inside_area(const char *address, const maps_area_h bounds, const maps_preference_h preference, maps_service_geocode_cb callback, void *user_data, int *request_id)
int ret = mapzen_geocode(geocode_req, __mapzen_geocode_cb, __request_id, (void *) calldata_geocode);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_geocode_by_structured_address(const maps_address_h address, const maps_preference_h preference, maps_service_geocode_cb callback, void *user_data, int *request_id)
int ret = mapzen_geocode(geocode_req, __mapzen_geocode_cb, __request_id, (void *) calldata_geocode);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
static void __mapzen_reverse_geocode_cb(mapzen_error_e result, int request_id, mapzen_address_resp_s *address, void *user_data)
MAPS_LOGD("Got REV GEOCODE callback from ENGINE");
callback_info_reverse_geocode *calldata_reverse_geocode = (callback_info_reverse_geocode *) user_data;
if (result != MAPZEN_ERROR_NONE || address == NULL) {
- calldata_reverse_geocode->callback((maps_error_e) __convert_to_maps_error(result), calldata_reverse_geocode->reqID, 0, 0, NULL, calldata_reverse_geocode->data);
+ calldata_reverse_geocode->callback((maps_error_e) convert_mapzen_error_to_maps_error(result), calldata_reverse_geocode->reqID, 0, 0, NULL, calldata_reverse_geocode->data);
} else {
int total_count = 1;
int index = 0;
int ret = mapzen_reverse_geocode(reverse_geocode_req, __mapzen_reverse_geocode_cb, __request_id, (void *) calldata_reverse_geocode);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
static void __mapzen_route_cb(mapzen_error_e result, int request_id, mapzen_route_resp_s *route_info, void *user_data)
maps_route_set_path(route, path_list);
maps_item_list_destroy(path_list);
- bool b = calldata_route->callback((maps_error_e)__convert_to_maps_error(result), calldata_route->reqID, 0, 1, route, calldata_route->data);
+ bool b = calldata_route->callback((maps_error_e)convert_mapzen_error_to_maps_error(result), calldata_route->reqID, 0, 1, route, calldata_route->data);
if (!b)
return;
} else {
- calldata_route->callback((maps_error_e)__convert_to_maps_error(result), calldata_route->reqID, 0, 0, NULL, calldata_route->data);
+ calldata_route->callback((maps_error_e)convert_mapzen_error_to_maps_error(result), calldata_route->reqID, 0, 0, NULL, calldata_route->data);
}
}
int ret = mapzen_start_route(route_req, __mapzen_route_cb, __request_id, (void *)calldata_route);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_search_route_waypoints(const maps_coordinates_h *waypoint_list, int waypoint_num, maps_preference_h preference, maps_service_search_route_cb callback, void *user_data, int *request_id)
int ret = mapzen_start_route(route_req, __mapzen_route_cb, __request_id, (void *)calldata_route);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
static void __mapzen_place_search_cb(mapzen_error_e result, int request_id, GList *places, void *user_data)
if (result != MAPZEN_ERROR_NONE || places == NULL) {
MAPS_LOGD("Got places result from ENGINE...result is NULL");
- calldata_place->callback((maps_error_e) __convert_to_maps_error(result), calldata_place->reqID, 0, 0, NULL, calldata_place->data);
+ calldata_place->callback((maps_error_e) convert_mapzen_error_to_maps_error(result), calldata_place->reqID, 0, 0, NULL, calldata_place->data);
} else {
guint total_count = 0;
int index = 0;
/*maps_item_list_remove_all(image_list, maps_place_image_destroy); */
/*maps_item_list_destroy(image_list); */
- bool b = calldata_place->callback((maps_error_e)__convert_to_maps_error(result), calldata_place->reqID, index, total_count, place, calldata_place->data);
+ bool b = calldata_place->callback((maps_error_e)convert_mapzen_error_to_maps_error(result), calldata_place->reqID, index, total_count, place, calldata_place->data);
if (!b)
return;
temp_place = temp_place->next;
}
} else {
- calldata_place->callback((maps_error_e)__convert_to_maps_error(result), calldata_place->reqID, index, total_count, NULL, calldata_place->data);
+ calldata_place->callback((maps_error_e)convert_mapzen_error_to_maps_error(result), calldata_place->reqID, index, total_count, NULL, calldata_place->data);
}
}
}
int ret = mapzen_search_place(place_req, __mapzen_place_search_cb, __request_id, (void *) calldata_place);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_search_place_by_area(const maps_area_h boundary, const maps_place_filter_h filter, const maps_preference_h preference, maps_service_search_place_cb callback, void *user_data, int *request_id)
int ret = mapzen_search_place(place_req, __mapzen_place_search_cb, __request_id, (void *) calldata_place);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_search_place_list(const maps_area_h boundary, const maps_place_filter_h filter, const maps_preference_h preference, maps_service_search_place_list_cb callback, void *user_data, int *request_id)
int ret = mapzen_search_place(place_req, __mapzen_place_search_cb, __request_id, (void *) calldata_place);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}
EXPORT_API int maps_plugin_cancel_request(int request_id)
int ret = mapzen_cancel_request(request_id);
- return __convert_to_maps_error(ret);
+ return convert_mapzen_error_to_maps_error(ret);
}