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 hView, maps_plugin_map_view_ready_cb pCbFunc);
53 here_error_e Close(maps_view_h hView);
54 here_error_e RenderMap(maps_view_h hView, const maps_coordinates_h mapsCoord, double dZoom, double dAngle);
55 here_error_e RenderMapByArea(maps_view_h hView, const maps_area_h hArea, double dZoom, double dAngle);
56 here_error_e DrawMap(maps_view_h hView, Evas* pCanvas, int x, int y, int nWidth, int nHeight);
57 here_error_e MoveCenter(maps_view_h hView, int delta_x, int delta_y);
58 here_error_e GetCenter(maps_view_h hView, maps_coordinates_h *center);
59 here_error_e SetScalebar(maps_view_h hView, bool enable);
60 here_error_e GetScalebar(maps_view_h hView, bool *enabled);
61 here_error_e ScreenToGeolocation(maps_view_h hView, int x, int y, maps_coordinates_h *mapsCoord);
62 here_error_e GeolocationToScreen(maps_view_h hView, const maps_coordinates_h mapsCoord, int *x, int *y);
64 here_error_e GetMinZoomLevel(maps_view_h hView, int *nMinZoomLevel);
65 here_error_e GetMaxZoomLevel(maps_view_h hView, int *nMaxZoomLevel);
66 here_error_e OnViewObject(maps_view_h hView, const maps_view_object_h object, maps_view_object_operation_e operation);
69 here_error_e __initOpenGL();
70 here_error_e __initOpenGLSurface(maps_view_h hView);
71 here_error_e __initMap(maps_view_h hView, maps_plugin_map_view_ready_cb pCbFunc);
72 static void __readyMapCb(maps_view_h hView);
73 static Eina_Bool __idlerCb(void *data);
74 static void __renderingCb(void *data);
75 static void __pixelGetCb(void *data, Evas_Object *obj);
76 static void __processViewObject(maps_view_h hView, const maps_view_object_h object, maps_view_object_operation_e operation);
77 void __setMapType(maps_view_h hView);
80 Here::Maps::GeoTiledMap *__map;
83 Evas_GL_Context *__ctx;
84 Evas_GL_Surface *__sfc;
85 Evas_GL_Config *__cfg;
91 int __x, __y, __w, __h;
92 double __lat, __lng, __zoom, __angle;
94 HereViewObjects __visualObjects;
95 PendingObjects __pendingObjects;
99 maps_plugin_map_view_ready_cb __readyCb;
102 HERE_PLUGIN_END_NAMESPACE