2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 #include "here_manager.h"
24 #include "here_base.h"
25 #include "here_view_objects.h"
28 #include <maps_service.h>
29 #include <maps_view.h>
30 #include <maps_view_plugin.h>
33 #include <maps/GeoTiledMap.h>
35 #include <Ecore_Evas.h>
36 #include <graphic/Grp_Util.h>
37 #include <maps/GeoMapObjectMarker.h>
38 #include <maps/GeoMapObjectPolygon.h>
39 #include <maps/GeoMapObjectPolyline.h>
41 HERE_PLUGIN_BEGIN_NAMESPACE
43 using namespace HERE_MAPS_NAMESPACE_PREFIX;
52 here_error_e init(maps_view_h view, maps_plugin_map_view_ready_cb callback);
53 here_error_e close(maps_view_h view);
54 here_error_e renderMap(maps_view_h view, const maps_coordinates_h coord, double zoom, double angle);
55 here_error_e moveCenter(maps_view_h view, int delta_x, int delta_y);
56 here_error_e getCenter(maps_view_h view, maps_coordinates_h *center);
57 here_error_e setScalebarEnabled(maps_view_h view, bool enable);
58 here_error_e getScalebarEnabled(maps_view_h view, bool *enabled);
59 here_error_e convertScreenToGeolocation(maps_view_h view, int x, int y, maps_coordinates_h *coord);
60 here_error_e convertGeolocationToScreen(maps_view_h view,
61 const maps_coordinates_h coord, int *x, int *y);
62 here_error_e captureSnapshot(maps_view_h view, void **data, int *width, int *height,
63 maps_view_colorspace_type_e *cs);
65 here_error_e getMinZoomLevel(maps_view_h view, int *zoom);
66 here_error_e getMaxZoomLevel(maps_view_h view, int *zoom);
67 here_error_e onViewObject(maps_view_h view, const maps_view_object_h object,
68 maps_view_object_operation_e operation);
69 here_error_e getViewScale(maps_view_h view, double *scale);
70 here_error_e setViewScale(maps_view_h view, double scale);
73 here_error_e initOpenGL();
74 here_error_e initOpenGLSurface(maps_view_h view);
75 here_error_e initMap(maps_view_h view, maps_plugin_map_view_ready_cb callback);
76 void setMapType(maps_view_h view);
77 static void __readyMapCb(maps_view_h view);
78 static Eina_Bool __idlerCb(void *data);
79 static void __renderingCb(void *data);
80 static void __pixelGetCb(void *data, Evas_Object *obj);
81 static void __processViewObject(maps_view_h view, const maps_view_object_h object,
82 maps_view_object_operation_e operation);
85 Here::Maps::GeoTiledMap *__map;
88 Evas_GL_Context *__ctx;
89 Evas_GL_Surface *__sfc;
90 Evas_GL_Config *__cfg;
96 int __x, __y, __w, __h;
98 HereViewObjects __visualObjects;
99 PendingObjects __pendingObjects;
100 Ecore_Idler *__idler;
103 maps_plugin_map_view_ready_cb __readyCb;
106 HERE_PLUGIN_END_NAMESPACE