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, const maps_coordinates_h coord, int *x, int *y);
62 here_error_e getMinZoomLevel(maps_view_h view, int *zoom);
63 here_error_e getMaxZoomLevel(maps_view_h view, int *zoom);
64 here_error_e onViewObject(maps_view_h view, const maps_view_object_h object, maps_view_object_operation_e operation);
67 here_error_e initOpenGL();
68 here_error_e initOpenGLSurface(maps_view_h view);
69 here_error_e initMap(maps_view_h view, maps_plugin_map_view_ready_cb callback);
70 void setMapType(maps_view_h view);
71 static void __readyMapCb(maps_view_h view);
72 static Eina_Bool __idlerCb(void *data);
73 static void __renderingCb(void *data);
74 static void __pixelGetCb(void *data, Evas_Object *obj);
75 static void __processViewObject(maps_view_h view, const maps_view_object_h object, maps_view_object_operation_e operation);
78 Here::Maps::GeoTiledMap *__map;
81 Evas_GL_Context *__ctx;
82 Evas_GL_Surface *__sfc;
83 Evas_GL_Config *__cfg;
89 int __x, __y, __w, __h;
90 double __lat, __lng, __zoom, __angle;
92 HereViewObjects __visualObjects;
93 PendingObjects __pendingObjects;
97 maps_plugin_map_view_ready_cb __readyCb;
100 HERE_PLUGIN_END_NAMESPACE