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.
18 #include "here_types.h"
19 #include "here_geocode.h"
20 #include "here_revgeocode.h"
21 #include "here_multirevgeocode.h"
22 #include "here_place.h"
23 #include "here_route.h"
24 #include "here_view.h"
25 #include <common/HereConfig.h>
27 using namespace HERE_PLUGIN_NAMESPACE_PREFIX;
29 int HerePluginInit(maps_plugin_h *hPlugin, const char *module)
32 return HERE_ERROR_INVALID_PARAMETER;
34 here_error_e error = HereManager::CheckAgreement();
35 if (error != HERE_ERROR_NONE)
38 HereManager::Create();
40 if (!HereManager::GetHandler())
41 return HERE_ERROR_INVALID_OPERATION;
43 HereManager::GetHandler()->SetProxyAddress();
45 return HERE_ERROR_NONE;
48 int HerePluginShutdown(maps_plugin_h hPlugin)
51 return HERE_ERROR_INVALID_PARAMETER;
53 if (HereManager::GetHandler())
54 HereManager::GetHandler()->Close();
56 return HERE_ERROR_NONE;
59 int HerePluginSetProviderKey(const char* szKey)
62 return HERE_ERROR_INVALID_PARAMETER;
64 if (!HereManager::GetHandler())
65 return HERE_ERROR_INVALID_OPERATION;
67 return HereManager::GetHandler()->SetCredentials(szKey);
70 int HerePluginGetProviderKey(char** szKey)
73 return HERE_ERROR_INVALID_PARAMETER;
75 if (!HereManager::GetHandler())
76 return HERE_ERROR_INVALID_OPERATION;
78 return HereManager::GetHandler()->GetCredentials(szKey);
81 int HerePluginSetPreference(maps_preference_h hPref)
84 return HERE_ERROR_INVALID_PARAMETER;
86 if (!HereManager::GetHandler())
87 return HERE_ERROR_INVALID_OPERATION;
89 return HereManager::GetHandler()->SetPreference(hPref);
92 int HerePluginGetPreference(maps_preference_h *hPref)
95 return HERE_ERROR_INVALID_PARAMETER;
97 if (!HereManager::GetHandler())
98 return HERE_ERROR_INVALID_OPERATION;
100 return HereManager::GetHandler()->GetPreference(hPref);
103 int HerePluginGeocode(const char* szAddr,
104 maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
105 void *pUserData, int *nReqId)
107 /* checking parmaters */
108 if (!szAddr || (szAddr && *szAddr == '\0') || !pCbFunc || !nReqId)
109 return HERE_ERROR_INVALID_PARAMETER;
111 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
112 return HERE_ERROR_PERMISSION_DENIED;
114 if (!HereManager::GetHandler())
115 return HERE_ERROR_INVALID_OPERATION;
117 /* creating instance */
118 HereGeocode *pGeocode =
119 (HereGeocode*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_GEOCODE,
120 (void*)pCbFunc, pUserData, nReqId));
123 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
125 /* sending request */
126 here_error_e error = HERE_ERROR_NONE;
129 error = pGeocode->PrepareQuery();
130 if (error != HERE_ERROR_NONE) break;
132 error = pGeocode->PreparePreference(hPref);
133 if (error != HERE_ERROR_NONE) break;
135 error = pGeocode->StartGeocode(szAddr);
139 if(error != HERE_ERROR_NONE)
140 pGeocode->TerminateService();
145 int HerePluginGeocodeByStructuredAddress(const maps_address_h hAddr,
146 maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
147 void *pUserData, int *nReqId)
149 /* checking parmaters */
150 if (!hAddr || !pCbFunc || !nReqId)
151 return HERE_ERROR_INVALID_PARAMETER;
153 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
154 return HERE_ERROR_PERMISSION_DENIED;
156 if (!HereManager::GetHandler())
157 return HERE_ERROR_INVALID_OPERATION;
159 /* creating instance */
160 HereGeocode *pGeocode =
161 (HereGeocode*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_GEOCODE,
162 (void*)pCbFunc, pUserData, nReqId));
165 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
167 /* sending request */
168 here_error_e error = HERE_ERROR_NONE;
171 error = pGeocode->PrepareQuery();
172 if (error != HERE_ERROR_NONE) break;
174 error = pGeocode->PreparePreference(hPref);
175 if (error != HERE_ERROR_NONE) break;
177 error = pGeocode->StartGeocodeByStructuredAddress(hAddr);
181 if(error != HERE_ERROR_NONE)
182 pGeocode->TerminateService();
187 int HerePluginGeocodeInsideArea(const char* szAddr, maps_area_h hArea,
188 maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
189 void *pUserData, int *nReqId)
191 /* checking parmaters */
192 if (!szAddr || (szAddr && *szAddr == '\0') || !pCbFunc || !nReqId)
193 return HERE_ERROR_INVALID_PARAMETER;
195 if (!hArea || !HereUtils::IsValid(*(maps_area_s*)hArea))
196 return HERE_ERROR_INVALID_PARAMETER;
198 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
199 return HERE_ERROR_PERMISSION_DENIED;
201 if (!HereManager::GetHandler())
202 return HERE_ERROR_INVALID_OPERATION;
204 /* creating instance */
205 HereGeocode *pGeocode =
206 (HereGeocode*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_GEOCODE,
207 (void*)pCbFunc, pUserData, nReqId));
210 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
212 /* sending request */
213 here_error_e error = HERE_ERROR_NONE;
216 error = pGeocode->PrepareQuery();
217 if (error != HERE_ERROR_NONE) break;
219 error = pGeocode->PreparePreference(hPref);
220 if (error != HERE_ERROR_NONE) break;
222 error = pGeocode->StartGeocodeInsideArea(szAddr, hArea);
226 if(error != HERE_ERROR_NONE)
227 pGeocode->TerminateService();
232 int HerePluginReverseGeocode(double dLatitude, double dLongitude,
233 maps_item_hashtable_h hPref, maps_service_reverse_geocode_cb pCbFunc,
234 void *pUserData, int *nReqId)
236 /* checking parmaters */
237 if (!HereUtils::IsValidCoord(dLatitude, dLongitude))
238 return HERE_ERROR_INVALID_PARAMETER;
240 if (!pCbFunc || !nReqId)
241 return HERE_ERROR_INVALID_PARAMETER;
243 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
244 return HERE_ERROR_PERMISSION_DENIED;
246 if (!HereManager::GetHandler())
247 return HERE_ERROR_INVALID_OPERATION;
249 /* creating instance */
250 HereRevGeocode *pRevGeocode =
251 (HereRevGeocode*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_REV_GEOCODE,
252 (void*)pCbFunc, pUserData, nReqId));
255 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
257 /* sending request */
258 here_error_e error = HERE_ERROR_UNKNOWN;
261 error = pRevGeocode->PrepareQuery();
262 if (error != HERE_ERROR_NONE) break;
264 error = pRevGeocode->PreparePreference(hPref);
265 if (error != HERE_ERROR_NONE) break;
267 error = pRevGeocode->PreparePosition(dLatitude, dLongitude);
268 if (error != HERE_ERROR_NONE) break;
270 error = pRevGeocode->StartRevGeocode(hPref);
274 if(error != HERE_ERROR_NONE)
275 pRevGeocode->TerminateService();
280 int HerePluginMultiReverseGeocode(const maps_coordinates_list_h hGeocodeList,
281 maps_item_hashtable_h hPref, maps_service_multi_reverse_geocode_cb pCbFunc,
282 void *pUserData, int *nReqId)
284 /* checking parmaters */
285 if (!hGeocodeList || !pCbFunc || !nReqId)
286 return HERE_ERROR_INVALID_PARAMETER;
288 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
289 return HERE_ERROR_PERMISSION_DENIED;
291 if (!HereManager::GetHandler())
292 return HERE_ERROR_INVALID_OPERATION;
294 /* creating instance */
295 HereMultiRevGeocode *pMultiRevGeocode =
296 (HereMultiRevGeocode*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_MULTI_REV_GEOCODE,
297 (void*)pCbFunc, pUserData, nReqId));
299 if(!pMultiRevGeocode)
300 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
302 /* sending request */
303 here_error_e error = HERE_ERROR_UNKNOWN;
306 error = pMultiRevGeocode->PrepareQuery();
307 if (error != HERE_ERROR_NONE) break;
309 error = pMultiRevGeocode->PreparePositionList(hGeocodeList);
310 if (error != HERE_ERROR_NONE) break;
312 error = pMultiRevGeocode->StartMultiReverse(hPref);
316 if(error != HERE_ERROR_NONE)
317 pMultiRevGeocode->TerminateService();
322 int HerePluginSearchPlace(maps_coordinates_h hPos, int nDistance,
323 maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
324 void *pUserData, int *nReqId)
326 /* checking parmaters */
327 if (!hPos || !HereUtils::IsValid(*(maps_coordinates_s*)hPos) || nDistance <= 0)
328 return HERE_ERROR_INVALID_PARAMETER;
330 if (!hFilter || !pCbFunc || !nReqId)
331 return HERE_ERROR_INVALID_PARAMETER;
333 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
334 return HERE_ERROR_PERMISSION_DENIED;
336 if (!HereManager::GetHandler())
337 return HERE_ERROR_INVALID_OPERATION;
339 /* creating instance */
341 (HerePlace*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_PLACE,
342 (void*)pCbFunc, pUserData, nReqId));
345 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
347 /* sending request */
348 here_error_e error = HERE_ERROR_NONE;
351 error = pPlace->PrepareDiscoveryQuery();
352 if (error != HERE_ERROR_NONE) break;
354 error = pPlace->PrepareDiscoveryPreference(hPref);
355 if (error != HERE_ERROR_NONE) break;
357 error = pPlace->PrepareDiscoveryFilter(hFilter);
358 if (error != HERE_ERROR_NONE) break;
360 error = pPlace->StartDiscoveryPlace(hPos, nDistance);
364 if(error != HERE_ERROR_NONE)
365 pPlace->TerminateService();
370 int HerePluginSearchPlaceByArea(maps_area_h hArea,
371 maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
372 void *pUserData, int *nReqId)
374 /* checking parmaters */
375 if (!hArea || !HereUtils::IsValid(*(maps_area_s*)hArea))
376 return HERE_ERROR_INVALID_PARAMETER;
378 if (!hFilter || !pCbFunc || !nReqId)
379 return HERE_ERROR_INVALID_PARAMETER;
381 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
382 return HERE_ERROR_PERMISSION_DENIED;
384 if (!HereManager::GetHandler())
385 return HERE_ERROR_INVALID_OPERATION;
387 /* creating instance */
389 (HerePlace*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_PLACE,
390 (void*)pCbFunc, pUserData, nReqId));
393 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
395 /* sending request */
396 here_error_e error = HERE_ERROR_NONE;
399 error = pPlace->PrepareDiscoveryQuery();
400 if (error != HERE_ERROR_NONE) break;
402 error = pPlace->PrepareDiscoveryPreference(hPref);
403 if (error != HERE_ERROR_NONE) break;
405 error = pPlace->PrepareDiscoveryFilter(hFilter);
406 if (error != HERE_ERROR_NONE) break;
408 error = pPlace->StartDiscoveryPlace(hArea);
412 if(error != HERE_ERROR_NONE)
413 pPlace->TerminateService();
418 int HerePluginSearchPlaceByAddress(const char* szAddr, maps_area_h hArea,
419 maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
420 void * pUserData, int *nReqId)
422 /* checking parmaters */
423 if (!szAddr || (szAddr && *szAddr == '\0') || !hFilter || !pCbFunc || !nReqId)
424 return HERE_ERROR_INVALID_PARAMETER;
426 if (!hArea || !HereUtils::IsValid(*(maps_area_s*)hArea))
427 return HERE_ERROR_INVALID_PARAMETER;
429 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
430 return HERE_ERROR_PERMISSION_DENIED;
432 if (!HereManager::GetHandler())
433 return HERE_ERROR_INVALID_OPERATION;
435 /* creating instance */
437 (HerePlace*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_PLACE,
438 (void*)pCbFunc, pUserData, nReqId));
441 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
443 /* sending request */
444 here_error_e error = HERE_ERROR_NONE;
447 error = pPlace->PrepareDiscoveryQuery();
448 if (error != HERE_ERROR_NONE) break;
450 error = pPlace->PrepareDiscoveryPreference(hPref);
451 if (error != HERE_ERROR_NONE) break;
453 error = pPlace->PrepareDiscoveryFilter(hFilter);
454 if (error != HERE_ERROR_NONE) break;
456 error = pPlace->StartDiscoveryPlace(hArea, szAddr);
460 if(error != HERE_ERROR_NONE)
461 pPlace->TerminateService();
466 int HerePluginSearchPlaceList(maps_area_h hArea, maps_item_hashtable_h hPref,
467 maps_place_filter_h hFilter, maps_service_search_place_list_cb pCbFunc,
468 void *pUserData, int *nReqId)
470 /* checking parmaters */
471 if (!hFilter || !pCbFunc || !nReqId)
472 return HERE_ERROR_INVALID_PARAMETER;
474 if (!hArea || !HereUtils::IsValid(*(maps_area_s*)hArea))
475 return HERE_ERROR_INVALID_PARAMETER;
477 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
478 return HERE_ERROR_PERMISSION_DENIED;
480 if (!HereManager::GetHandler())
481 return HERE_ERROR_INVALID_OPERATION;
483 /* creating instance */
485 (HerePlace*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_PLACE,
486 (void*)pCbFunc, pUserData, nReqId));
489 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
491 /* sending request */
492 here_error_e error = HERE_ERROR_NONE;
495 error = pPlace->PrepareDiscoveryQuery();
496 if (error != HERE_ERROR_NONE) break;
498 error = pPlace->PrepareDiscoveryPreference(hPref);
499 if (error != HERE_ERROR_NONE) break;
501 error = pPlace->PrepareDiscoveryFilter(hFilter);
502 if (error != HERE_ERROR_NONE) break;
504 error = pPlace->StartDiscoveryPlaceList(hArea);
508 if(error != HERE_ERROR_NONE)
509 pPlace->TerminateService();
514 int HerePluginSearchPlaceDetails(const char* szUrl,
515 maps_service_get_place_details_cb pCbFunc,
516 void *pUserData, int *nReqId)
518 /* checking parmaters */
519 if (!szUrl || (szUrl && *szUrl == '\0') || !pCbFunc || !nReqId)
520 return HERE_ERROR_INVALID_PARAMETER;
522 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
523 return HERE_ERROR_PERMISSION_DENIED;
525 if (!HereManager::GetHandler())
526 return HERE_ERROR_INVALID_OPERATION;
528 /* creating instance */
530 (HerePlace*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_PLACE,
531 (void*)pCbFunc, pUserData, nReqId));
534 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
536 /* sending request */
537 here_error_e error = HERE_ERROR_NONE;
540 error = pPlace->PreparePlaceDetailsQuery();
541 if (error != HERE_ERROR_NONE) break;
543 error = pPlace->StartPlaceDetails(szUrl);
547 if(error != HERE_ERROR_NONE)
548 pPlace->TerminateService();
553 int HerePluginSearchRoute(maps_coordinates_h hOrigin, maps_coordinates_h hDestination,
554 maps_item_hashtable_h hPref, maps_service_search_route_cb pCbFunc,
555 void *pUserData, int *nReqId)
557 /* checking parmaters */
558 if (!hOrigin || !hDestination || !pCbFunc || !nReqId)
559 return HERE_ERROR_INVALID_PARAMETER;
561 if (!HereUtils::IsValid(*(maps_coordinates_s*)hOrigin) ||
562 !HereUtils::IsValid(*(maps_coordinates_s*)hDestination))
563 return HERE_ERROR_INVALID_PARAMETER;
565 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
566 return HERE_ERROR_PERMISSION_DENIED;
568 if (!HereManager::GetHandler())
569 return HERE_ERROR_INVALID_OPERATION;
571 /* creating instance */
573 (HereRoute*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_ROUTE,
574 (void*)pCbFunc, pUserData, nReqId));
577 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
579 /* sending request */
580 here_error_e error = HERE_ERROR_NONE;
583 error = pRoute->PrepareQuery();
584 if (error != HERE_ERROR_NONE) break;
586 error = pRoute->PreparePreference(hPref);
587 if (error != HERE_ERROR_NONE) break;
589 error = pRoute->PrepareWaypoint(hOrigin, hDestination);
590 if (error != HERE_ERROR_NONE) break;
592 error = pRoute->StartRoute();
596 if(error != HERE_ERROR_NONE)
597 pRoute->TerminateService();
602 int HerePluginSearchRouteWaypoints(const maps_coordinates_h* hWaypointList, int nWaypointNum,
603 maps_item_hashtable_h hPref, maps_service_search_route_cb pCbFunc,
604 void* pUserData, int *nReqId)
606 /* checking parmaters */
607 if (!hWaypointList || nWaypointNum < 2 || !pCbFunc || !nReqId)
608 return HERE_ERROR_INVALID_PARAMETER;
610 for (int i=0; i<nWaypointNum; i++)
612 if (!HereUtils::IsValid(*(maps_coordinates_s*)hWaypointList[i]))
613 return HERE_ERROR_INVALID_PARAMETER;
616 if (HereManager::CheckAgreement() != HERE_ERROR_NONE)
617 return HERE_ERROR_PERMISSION_DENIED;
619 if (!HereManager::GetHandler())
620 return HERE_ERROR_INVALID_OPERATION;
622 /* creating instance */
624 (HereRoute*)(HereManager::GetHandler()->CreateInstance(HereManager::HERE_SVC_ROUTE,
625 (void*)pCbFunc, pUserData, nReqId));
628 return HERE_ERROR_SERVICE_NOT_AVAILABLE;
630 /* sending request */
631 here_error_e error = HERE_ERROR_NONE;
634 error = pRoute->PrepareQuery();
635 if (error != HERE_ERROR_NONE) break;
637 error = pRoute->PrepareWaypoint(hWaypointList, nWaypointNum);
638 if (error != HERE_ERROR_NONE) break;
640 error = pRoute->PreparePreference(hPref);
641 if (error != HERE_ERROR_NONE) break;
643 error = pRoute->StartRoute();
647 if(error != HERE_ERROR_NONE)
648 pRoute->TerminateService();
653 int HerePluginCancelRequest(int nReqId)
656 return HERE_ERROR_INVALID_PARAMETER;
658 if (!HereManager::GetHandler())
659 return HERE_ERROR_INVALID_OPERATION;
661 return (HereManager::GetHandler()->CancelInstance(nReqId));
664 /*****************************************************************************/
668 /*****************************************************************************/
670 int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCbFunc)
672 HereView *vh = NULL, *ovh = NULL;
674 if (!vh) return HERE_ERROR_OUT_OF_MEMORY;
675 maps_view_get_maps_plugin_view_handle(hView, (void**)&ovh);
676 maps_view_set_maps_plugin_view_handle(hView, vh);
679 return vh->Init(hView, pCbFunc);
682 int HerePluginDestroyMapView(maps_view_h hView)
685 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
686 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
687 if (error == HERE_ERROR_NONE && vh) {
688 maps_view_set_maps_plugin_view_handle(hView, NULL);
689 error = vh->Close(hView);
695 int HerePluginRenderMap(maps_view_h hView, const maps_coordinates_h mapsCoord, double dZoom, double dAngle)
698 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
699 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
700 if (error == HERE_ERROR_NONE && vh)
701 error = vh->RenderMap(hView, mapsCoord, dZoom, dAngle);
705 int HerePluginMoveCenter(maps_view_h hView, int delta_x, int delta_y)
708 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
709 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
710 if (error == HERE_ERROR_NONE && vh)
711 error = vh->MoveCenter(hView, delta_x, delta_y);
715 int HerePluginSetScalebar(maps_view_h hView, bool enable)
718 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
719 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
720 if (error == HERE_ERROR_NONE && vh)
721 error = vh->SetScalebar(hView, enable);
725 int HerePluginGetScalebar(maps_view_h hView, bool *enabled)
728 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
729 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
730 if (error == HERE_ERROR_NONE && vh)
731 error = vh->GetScalebar(hView, enabled);
735 int HerePluginDrawMap(maps_view_h hView, Evas* pCanvas, int x, int y, int w, int h)
737 return HERE_ERROR_NONE;
740 int HerePluginGetCenter(maps_view_h hView, maps_coordinates_h *center)
743 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
744 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
745 if (error == HERE_ERROR_NONE && vh)
746 error = vh->GetCenter(hView, center);
750 int HerePluginScreenToGeography(maps_view_h hView, int x, int y, maps_coordinates_h *mapsCoord)
753 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
754 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
755 if (error == HERE_ERROR_NONE && vh)
756 error = vh->ScreenToGeolocation(hView, x, y, mapsCoord);
760 int HerePluginGeographyToScreen(maps_view_h hView, const maps_coordinates_h mapsCoord, int *x, int *y)
763 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
764 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
765 if (error == HERE_ERROR_NONE && vh)
766 error = vh->GeolocationToScreen(hView, mapsCoord, x, y);
770 int HerePluginGetMinZoomLevel(maps_view_h hView, int *nMinZoomLevel)
773 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
774 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
775 if (error == HERE_ERROR_NONE && vh)
776 error = vh->GetMinZoomLevel(hView, nMinZoomLevel);
780 int HerePluginGetMaxZoomLevel(maps_view_h hView, int *nMaxZoomLevel)
783 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
784 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
785 if (error == HERE_ERROR_NONE && vh)
786 error = vh->GetMaxZoomLevel(hView, nMaxZoomLevel);
790 int HerePluginOnViewObject(maps_view_h hView, const maps_view_object_h object, maps_view_object_operation_e operation)
793 int maps_error = maps_view_get_maps_plugin_view_handle(hView, (void**)&vh);
794 here_error_e error = (here_error_e)ConvertToHereError(maps_error);
795 if (error == HERE_ERROR_NONE && vh)
796 error = vh->OnViewObject(hView, object, operation);