summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-07-23 11:22:02 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-07-23 11:27:34 +0900
commit3747d4b148807a45d17c13e7fcc36723156370c5 (patch)
tree3f092d1e1f259f6b88fda3a13d6e5e6538f1c904
parent409cd8723d666de72ddcefdb68ef678b54891286 (diff)
map: fix header split to actually be a split !
-rw-r--r--src/lib/elm_map.h2067
-rw-r--r--src/lib/elm_map_eo.h1
-rw-r--r--src/lib/elm_map_legacy.h12
3 files changed, 18 insertions, 2062 deletions
diff --git a/src/lib/elm_map.h b/src/lib/elm_map.h
index a898a5724..8f2bfdc11 100644
--- a/src/lib/elm_map.h
+++ b/src/lib/elm_map.h
@@ -70,2068 +70,13 @@
70 * @li @ref map_example_03 70 * @li @ref map_example_03
71 */ 71 */
72 72
73#define ELM_OBJ_MAP_PAN_CLASS elm_obj_map_pan_class_get() 73#include "elm_map_common.h"
74 74#ifdef EFL_EO_API_SUPPORT
75const Eo_Class *elm_obj_map_pan_class_get(void) EINA_CONST; 75#include "elm_map_eo.h"
76 76#endif
77#define ELM_OBJ_MAP_CLASS elm_obj_map_class_get() 77#ifndef EFL_NOLEGACY_API_SUPPORT
78 78#include "elm_map_legacy.h"
79const Eo_Class *elm_obj_map_class_get(void) EINA_CONST;
80
81extern EAPI Eo_Op ELM_OBJ_MAP_BASE_ID;
82
83enum
84{
85 ELM_OBJ_MAP_SUB_ID_ZOOM_SET,
86 ELM_OBJ_MAP_SUB_ID_ZOOM_GET,
87 ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_SET,
88 ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_GET,
89 ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_SET,
90 ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_GET,
91 ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_SET,
92 ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_GET,
93 ELM_OBJ_MAP_SUB_ID_REGION_BRING_IN,
94 ELM_OBJ_MAP_SUB_ID_REGION_SHOW,
95 ELM_OBJ_MAP_SUB_ID_REGION_GET,
96 ELM_OBJ_MAP_SUB_ID_PAUSED_SET,
97 ELM_OBJ_MAP_SUB_ID_PAUSED_GET,
98 ELM_OBJ_MAP_SUB_ID_ROTATE_SET,
99 ELM_OBJ_MAP_SUB_ID_ROTATE_GET,
100 ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_SET,
101 ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_GET,
102 ELM_OBJ_MAP_SUB_ID_TILE_LOAD_STATUS_GET,
103 ELM_OBJ_MAP_SUB_ID_CANVAS_TO_REGION_CONVERT,
104 ELM_OBJ_MAP_SUB_ID_REGION_TO_CANVAS_CONVERT,
105 ELM_OBJ_MAP_SUB_ID_USER_AGENT_SET,
106 ELM_OBJ_MAP_SUB_ID_USER_AGENT_GET,
107 ELM_OBJ_MAP_SUB_ID_SOURCE_SET,
108 ELM_OBJ_MAP_SUB_ID_SOURCE_GET,
109 ELM_OBJ_MAP_SUB_ID_SOURCES_GET,
110 ELM_OBJ_MAP_SUB_ID_ROUTE_ADD,
111 ELM_OBJ_MAP_SUB_ID_NAME_ADD,
112 ELM_OBJ_MAP_SUB_ID_OVERLAY_ADD,
113 ELM_OBJ_MAP_SUB_ID_OVERLAYS_GET,
114 ELM_OBJ_MAP_SUB_ID_OVERLAY_CLASS_ADD,
115 ELM_OBJ_MAP_SUB_ID_OVERLAY_BUBBLE_ADD,
116 ELM_OBJ_MAP_SUB_ID_OVERLAY_ROUTE_ADD,
117 ELM_OBJ_MAP_SUB_ID_OVERLAY_LINE_ADD,
118 ELM_OBJ_MAP_SUB_ID_OVERLAY_POLYGON_ADD,
119 ELM_OBJ_MAP_SUB_ID_OVERLAY_CIRCLE_ADD,
120 ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD,
121 ELM_OBJ_MAP_SUB_ID_TRACK_ADD,
122 ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE,
123 ELM_OBJ_MAP_SUB_ID_LAST
124};
125
126#define ELM_OBJ_MAP_ID(sub_id) (ELM_OBJ_MAP_BASE_ID + sub_id)
127
128
129/**
130 * @def elm_obj_map_zoom_set
131 * @since 1.8
132 *
133 * Set the zoom level of the map.
134 *
135 * @param[in] zoom
136 *
137 * @see elm_map_zoom_set
138 */
139#define elm_obj_map_zoom_set(zoom) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_SET), EO_TYPECHECK(int, zoom)
140
141/**
142 * @def elm_obj_map_zoom_get
143 * @since 1.8
144 *
145 * Get the zoom level of the map.
146 *
147 * @param[out] ret
148 *
149 * @see elm_map_zoom_get
150 */
151#define elm_obj_map_zoom_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_GET), EO_TYPECHECK(int *, ret)
152
153/**
154 * @def elm_obj_map_zoom_mode_set
155 * @since 1.8
156 *
157 * Set the zoom mode used by the map object.
158 *
159 * @param[in] mode
160 *
161 * @see elm_map_zoom_mode_set
162 */
163#define elm_obj_map_zoom_mode_set(mode) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_SET), EO_TYPECHECK(Elm_Map_Zoom_Mode, mode)
164
165/**
166 * @def elm_obj_map_zoom_mode_get
167 * @since 1.8
168 *
169 * Get the zoom mode used by the map object.
170 *
171 * @param[out] ret
172 *
173 * @see elm_map_zoom_mode_get
174 */
175#define elm_obj_map_zoom_mode_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MODE_GET), EO_TYPECHECK(Elm_Map_Zoom_Mode *, ret)
176
177/**
178 * @def elm_obj_map_zoom_max_set
179 * @since 1.8
180 *
181 * Set the maximum zoom of the source.
182 *
183 * @param[in] zoom
184 *
185 * @see elm_map_zoom_max_set
186 */
187#define elm_obj_map_zoom_max_set(zoom) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_SET), EO_TYPECHECK(int, zoom)
188
189/**
190 * @def elm_obj_map_zoom_max_get
191 * @since 1.8
192 *
193 * Get the maximum zoom of the source.
194 *
195 * @param[out] ret
196 *
197 * @see elm_map_zoom_max_get
198 */
199#define elm_obj_map_zoom_max_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MAX_GET), EO_TYPECHECK(int *, ret)
200
201/**
202 * @def elm_obj_map_zoom_min_set
203 * @since 1.8
204 *
205 * Set the minimum zoom of the source.
206 *
207 * @param[in] zoom
208 *
209 * @see elm_map_zoom_min_set
210 */
211#define elm_obj_map_zoom_min_set(zoom) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_SET), EO_TYPECHECK(int, zoom)
212
213/**
214 * @def elm_obj_map_zoom_min_get
215 * @since 1.8
216 *
217 * Get the minimum zoom of the source.
218 *
219 * @param[out] ret
220 *
221 * @see elm_map_zoom_min_get
222 */
223#define elm_obj_map_zoom_min_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ZOOM_MIN_GET), EO_TYPECHECK(int *, ret)
224
225/**
226 * @def elm_obj_map_region_bring_in
227 * @since 1.8
228 *
229 * Animatedly bring in given coordinates to the center of the map.
230 *
231 * @param[in] lon
232 * @param[in] lat
233 *
234 * @see elm_map_region_bring_in
235 */
236#define elm_obj_map_region_bring_in(lon, lat) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_BRING_IN), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat)
237
238/**
239 * @def elm_obj_map_region_show
240 * @since 1.8
241 *
242 * Show the given coordinates at the center of the map, immediately.
243 *
244 * @param[in] lon
245 * @param[in] lat
246 *
247 * @see elm_map_region_show
248 */
249#define elm_obj_map_region_show(lon, lat) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_SHOW), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat)
250
251/**
252 * @def elm_obj_map_region_get
253 * @since 1.8
254 *
255 * Get the current geographic coordinates of the map.
256 *
257 * @param[out] lon
258 * @param[out] lat
259 *
260 * @see elm_map_region_get
261 */
262#define elm_obj_map_region_get(lon, lat) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_GET), EO_TYPECHECK(double *, lon), EO_TYPECHECK(double *, lat)
263
264/**
265 * @def elm_obj_map_paused_set
266 * @since 1.8
267 *
268 * Pause or unpause the map.
269 *
270 * @param[in] paused
271 *
272 * @see elm_map_paused_set
273 */
274#define elm_obj_map_paused_set(paused) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_PAUSED_SET), EO_TYPECHECK(Eina_Bool, paused)
275
276/**
277 * @def elm_obj_map_paused_get
278 * @since 1.8
279 *
280 * Get a value whether map is paused or not.
281 *
282 * @param[out] ret
283 *
284 * @see elm_map_paused_get
285 */
286#define elm_obj_map_paused_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_PAUSED_GET), EO_TYPECHECK(Eina_Bool *, ret)
287
288/**
289 * @def elm_obj_map_rotate_set
290 * @since 1.8
291 *
292 * Rotate the map.
293 *
294 * @param[in] degree
295 * @param[in] cx
296 * @param[in] cy
297 *
298 * @see elm_map_rotate_set
299 */
300#define elm_obj_map_rotate_set(degree, cx, cy) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROTATE_SET), EO_TYPECHECK(double, degree), EO_TYPECHECK(Evas_Coord, cx), EO_TYPECHECK(Evas_Coord, cy)
301
302/**
303 * @def elm_obj_map_rotate_get
304 * @since 1.8
305 *
306 * Get the rotate degree of the map
307 *
308 * @param[out] degree
309 * @param[out] cx
310 * @param[out] cy
311 *
312 * @see elm_map_rotate_get
313 */
314#define elm_obj_map_rotate_get(degree, cx, cy) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROTATE_GET), EO_TYPECHECK(double *, degree), EO_TYPECHECK(Evas_Coord *, cx), EO_TYPECHECK(Evas_Coord *, cy)
315
316/**
317 * @def elm_obj_map_wheel_disabled_set
318 * @since 1.8
319 *
320 * Enable or disable mouse wheel to be used to zoom in / out the map.
321 *
322 * @param[in] disabled
323 *
324 * @see elm_map_wheel_disabled_set
325 */
326#define elm_obj_map_wheel_disabled_set(disabled) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_SET), EO_TYPECHECK(Eina_Bool, disabled)
327
328/**
329 * @def elm_obj_map_wheel_disabled_get
330 * @since 1.8
331 *
332 * Get a value whether mouse wheel is enabled or not.
333 *
334 * @param[out] ret
335 *
336 * @see elm_map_wheel_disabled_get
337 */
338#define elm_obj_map_wheel_disabled_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_WHEEL_DISABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
339
340/**
341 * @def elm_obj_map_tile_load_status_get
342 * @since 1.8
343 *
344 * Get the information of tile load status.
345 *
346 * @param[out] try_num
347 * @param[out] finish_num
348 *
349 * @see elm_map_tile_load_status_get
350 */
351#define elm_obj_map_tile_load_status_get(try_num, finish_num) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TILE_LOAD_STATUS_GET), EO_TYPECHECK(int *, try_num), EO_TYPECHECK(int *, finish_num)
352
353/**
354 * @def elm_obj_map_canvas_to_region_convert
355 * @since 1.8
356 *
357 * Convert canvas coordinates into geographic coordinates
358 *
359 * @param[in] x
360 * @param[in] y
361 * @param[out] lon
362 * @param[out] lat
363 *
364 * @see elm_map_canvas_to_region_convert
365 */
366#define elm_obj_map_canvas_to_region_convert(x, y, lon, lat) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_CANVAS_TO_REGION_CONVERT), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(double *, lon), EO_TYPECHECK(double *, lat)
367
368/**
369 * @def elm_obj_map_region_to_canvas_convert
370 * @since 1.8
371 *
372 * Convert geographic coordinates (longitude, latitude)
373 *
374 * @param[in] lon
375 * @param[in] lat
376 * @param[out] x
377 * @param[out] y
378 *
379 * @see elm_map_region_to_canvas_convert
380 */
381#define elm_obj_map_region_to_canvas_convert(lon, lat, x, y) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_REGION_TO_CANVAS_CONVERT), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y)
382
383/**
384 * @def elm_obj_map_user_agent_set
385 * @since 1.8
386 *
387 * Set the user agent used by the map object to access routing services.
388 *
389 * @param[in] user_agent
390 *
391 * @see elm_map_user_agent_set
392 */
393#define elm_obj_map_user_agent_set(user_agent) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_USER_AGENT_SET), EO_TYPECHECK(const char *, user_agent)
394
395/**
396 * @def elm_obj_map_user_agent_get
397 * @since 1.8
398 *
399 * Get the user agent used by the map object.
400 *
401 * @param[out] ret
402 *
403 * @see elm_map_user_agent_get
404 */
405#define elm_obj_map_user_agent_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_USER_AGENT_GET), EO_TYPECHECK(const char **, ret)
406
407/**
408 * @def elm_obj_map_source_set
409 * @since 1.8
410 *
411 * Set the current source of the map for a specific type.
412 *
413 * @param[in] type
414 * @param[in] source_name
415 *
416 * @see elm_map_source_set
417 */
418#define elm_obj_map_source_set(type, source_name) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCE_SET), EO_TYPECHECK(Elm_Map_Source_Type, type), EO_TYPECHECK(const char *, source_name)
419
420/**
421 * @def elm_obj_map_source_get
422 * @since 1.8
423 *
424 * Get the name of currently used source for a specific type.
425 *
426 * @param[in] type
427 * @param[out] ret
428 *
429 * @see elm_map_source_get
430 */
431#define elm_obj_map_source_get(type, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCE_GET), EO_TYPECHECK(Elm_Map_Source_Type, type), EO_TYPECHECK(const char **, ret)
432
433/**
434 * @def elm_obj_map_sources_get
435 * @since 1.8
436 *
437 * Get the names of available sources for a specific type.
438 *
439 * @param[in] type
440 * @param[out] ret
441 *
442 * @see elm_map_sources_get
443 */
444#define elm_obj_map_sources_get(type, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_SOURCES_GET), EO_TYPECHECK(Elm_Map_Source_Type, type), EO_TYPECHECK(const char ***, ret)
445
446/**
447 * @def elm_obj_map_route_add
448 * @since 1.8
449 *
450 * Add a new route to the map object.
451 *
452 * @param[in] type
453 * @param[in] method
454 * @param[in] flon
455 * @param[in] flat
456 * @param[in] tlon
457 * @param[in] tlat
458 * @param[in] route_cb
459 * @param[in] data
460 * @param[out] ret
461 *
462 * @see elm_map_route_add
463 */
464#define elm_obj_map_route_add(type, method, flon, flat, tlon, tlat, route_cb, data, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_ROUTE_ADD), EO_TYPECHECK(Elm_Map_Route_Type, type), EO_TYPECHECK(Elm_Map_Route_Method, method), EO_TYPECHECK(double, flon), EO_TYPECHECK(double, flat), EO_TYPECHECK(double, tlon), EO_TYPECHECK(double, tlat), EO_TYPECHECK(Elm_Map_Route_Cb, route_cb), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Map_Route **, ret)
465
466/**
467 * @def elm_obj_map_name_add
468 * @since 1.8
469 *
470 * Request a address or geographic coordinates(longitude, latitude)
471 *
472 * @param[in] address
473 * @param[in] lon
474 * @param[in] lat
475 * @param[in] name_cb
476 * @param[in] data
477 * @param[out] ret
478 *
479 * @see elm_map_name_add
480 */
481#define elm_obj_map_name_add(address, lon, lat, name_cb, data, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_NAME_ADD), EO_TYPECHECK(const char *, address), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat), EO_TYPECHECK(Elm_Map_Name_Cb, name_cb), EO_TYPECHECK(void *, data), EO_TYPECHECK(Elm_Map_Name **, ret)
482
483/**
484 * @def elm_obj_map_overlay_add
485 * @since 1.8
486 *
487 * Add a new overlay to the map object. This overlay has a default type.
488 *
489 * @param[in] lon
490 * @param[in] lat
491 * @param[out] ret
492 *
493 * @see elm_map_overlay_add
494 */
495#define elm_obj_map_overlay_add(lon, lat, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_ADD), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat), EO_TYPECHECK(Elm_Map_Overlay **, ret)
496
497/**
498 * @def elm_obj_map_overlays_get
499 * @since 1.8
500 *
501 * Return all overlays in the map object.
502 *
503 * @param[out] ret
504 *
505 * @see elm_map_overlays_get
506 */
507#define elm_obj_map_overlays_get(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAYS_GET), EO_TYPECHECK(Eina_List **, ret)
508
509/**
510 * @def elm_obj_map_overlay_class_add
511 * @since 1.8
512 *
513 * Add a new class overlay to the map object.
514 *
515 * @param[out] ret
516 *
517 * @see elm_map_overlay_class_add
518 */
519#define elm_obj_map_overlay_class_add(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_CLASS_ADD), EO_TYPECHECK(Elm_Map_Overlay **, ret)
520
521/**
522 * @def elm_obj_map_overlay_bubble_add
523 * @since 1.8
524 *
525 * Add a new bubble overlay to the map object.
526 *
527 * @param[out] ret
528 *
529 * @see elm_map_overlay_bubble_add
530 */
531#define elm_obj_map_overlay_bubble_add(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_BUBBLE_ADD), EO_TYPECHECK(Elm_Map_Overlay **, ret)
532
533/**
534 * @def elm_obj_map_overlay_route_add
535 * @since 1.8
536 *
537 * Add a new route overlay to the map object.
538 *
539 * @param[in] route
540 * @param[out] ret
541 *
542 * @see elm_map_overlay_route_add
543 */
544#define elm_obj_map_overlay_route_add(route, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_ROUTE_ADD), EO_TYPECHECK(const Elm_Map_Route *, route), EO_TYPECHECK(Elm_Map_Overlay **, ret)
545
546/**
547 * @def elm_obj_map_overlay_line_add
548 * @since 1.8
549 *
550 * Add a new line overlay to the map object.
551 *
552 * @param[in] flon
553 * @param[in] flat
554 * @param[in] tlon
555 * @param[in] tlat
556 * @param[out] ret
557 *
558 * @see elm_map_overlay_line_add
559 */
560#define elm_obj_map_overlay_line_add(flon, flat, tlon, tlat, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_LINE_ADD), EO_TYPECHECK(double, flon), EO_TYPECHECK(double, flat), EO_TYPECHECK(double, tlon), EO_TYPECHECK(double, tlat), EO_TYPECHECK(Elm_Map_Overlay **, ret)
561
562/**
563 * @def elm_obj_map_overlay_polygon_add
564 * @since 1.8
565 *
566 * Add a new polygon overlay to the map object.
567 *
568 * @param[out] ret
569 *
570 * @see elm_map_overlay_polygon_add
571 */
572#define elm_obj_map_overlay_polygon_add(ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_POLYGON_ADD), EO_TYPECHECK(Elm_Map_Overlay **, ret)
573
574/**
575 * @def elm_obj_map_overlay_circle_add
576 * @since 1.8
577 *
578 * Add a new circle overlay to the map object.
579 *
580 * @param[in] lon
581 * @param[in] lat
582 * @param[in] radius
583 * @param[out] ret
584 *
585 * @see elm_map_overlay_circle_add
586 */
587#define elm_obj_map_overlay_circle_add(lon, lat, radius, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_CIRCLE_ADD), EO_TYPECHECK(double, lon), EO_TYPECHECK(double, lat), EO_TYPECHECK(double, radius), EO_TYPECHECK(Elm_Map_Overlay **, ret)
588
589/**
590 * @def elm_obj_map_overlay_scale_add
591 * @since 1.8
592 *
593 * Add a new scale overlay to the map object.
594 *
595 * @param[in] x
596 * @param[in] y
597 * @param[out] ret
598 *
599 * @see elm_map_overlay_scale_add
600 */
601#define elm_obj_map_overlay_scale_add(x, y, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Elm_Map_Overlay **, ret)
602#ifdef ELM_EMAP
603
604/**
605 * @def elm_obj_map_track_add
606 * @since 1.8
607 *
608 * Add a track on the map
609 *
610 * @param[in] emap
611 * @param[out] ret
612 *
613 * @see elm_map_track_add
614 */
615#define elm_obj_map_track_add(emap, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_ADD), EO_TYPECHECK(void *, emap), EO_TYPECHECK(Evas_Object **, ret)
616
617/**
618 * @def elm_obj_map_track_remove
619 * @since 1.8
620 *
621 * Remove a track from the map
622 *
623 * @param[in] route
624 *
625 * @see elm_map_track_remove
626 */
627#define elm_obj_map_track_remove(route) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_TRACK_REMOVE), EO_TYPECHECK(Evas_Object *, route)
628#endif 79#endif
629
630/**
631 * @addtogroup Map
632 * @{
633 */
634
635/**
636 * Set map's zoom behavior. It can be set to manual or automatic.
637 *
638 * Default value is #ELM_MAP_ZOOM_MODE_MANUAL.
639 *
640 * Values <b> don't </b> work as bitmask, only one can be chosen.
641 *
642 * @note Valid sizes are 2^zoom, consequently the map may be smaller
643 * than the scroller view.
644 *
645 * @see elm_map_zoom_mode_set()
646 * @see elm_map_zoom_mode_get()
647 *
648 * @ingroup Map
649 */
650typedef enum
651{
652 ELM_MAP_ZOOM_MODE_MANUAL, /**< Zoom controlled manually by elm_map_zoom_set(). It's set by default. */
653 ELM_MAP_ZOOM_MODE_AUTO_FIT, /**< Zoom until map fits inside the scroll frame with no pixels outside this area. */
654 ELM_MAP_ZOOM_MODE_AUTO_FILL, /**< Zoom until map fills scroll, ensuring no pixels are left unfilled. */
655 ELM_MAP_ZOOM_MODE_LAST
656} Elm_Map_Zoom_Mode;
657
658/**
659 * Set type of a external source (provider).
660 *
661 * @see elm_map_sources_get()
662 * @see elm_map_source_get()
663 * @see elm_map_source_set()
664 *
665 * @ingroup Map
666 */
667typedef enum
668{
669 ELM_MAP_SOURCE_TYPE_TILE, /**< Map tile provider. */
670 ELM_MAP_SOURCE_TYPE_ROUTE, /**< Route service provider. */
671 ELM_MAP_SOURCE_TYPE_NAME, /**< Name service provider. */
672 ELM_MAP_SOURCE_TYPE_LAST
673} Elm_Map_Source_Type;
674
675/**
676 * Set type of transport used on route.
677 *
678 * @see elm_map_route_add()
679 *
680 * @ingroup Map
681 */
682typedef enum
683{
684 ELM_MAP_ROUTE_TYPE_MOTOCAR, /**< Route should consider an automobile will be used. */
685 ELM_MAP_ROUTE_TYPE_BICYCLE, /**< Route should consider a bicycle will be used by the user. */
686 ELM_MAP_ROUTE_TYPE_FOOT, /**< Route should consider user will be walking. */
687 ELM_MAP_ROUTE_TYPE_LAST
688} Elm_Map_Route_Type;
689
690/**
691 * Set the routing method, what should be prioritized, time or distance.
692 *
693 * @see elm_map_route_add()
694 *
695 * @ingroup Map
696 */
697typedef enum
698{
699 ELM_MAP_ROUTE_METHOD_FASTEST, /**< Route should prioritize time. */
700 ELM_MAP_ROUTE_METHOD_SHORTEST, /**< Route should prioritize distance. */
701 ELM_MAP_ROUTE_METHOD_LAST
702} Elm_Map_Route_Method;
703
704/**
705 * Set the name search method.
706 *
707 * This is for name module interface.
708 *
709 * @ingroup Map
710 */
711typedef enum
712{
713 ELM_MAP_NAME_METHOD_SEARCH,
714 ELM_MAP_NAME_METHOD_REVERSE,
715 ELM_MAP_NAME_METHOD_LAST
716} Elm_Map_Name_Method;
717
718/**
719 * Set overlay type to be used. This type is resolved
720 * when the overlay is created.
721 * You can get this value by elm_map_overlay_type_get().
722 *
723 * @see elm_map_overlay_type_get()
724 * @see elm_map_overlay_add()
725 * @see elm_map_overlay_class_add()
726 * @see elm_map_overlay_bubble_add()
727 *
728 * @ingroup Map
729 */
730typedef enum _Elm_Map_Overlay_Type
731{
732 ELM_MAP_OVERLAY_TYPE_NONE = 0,
733 ELM_MAP_OVERLAY_TYPE_DEFAULT,
734 ELM_MAP_OVERLAY_TYPE_CLASS,
735 ELM_MAP_OVERLAY_TYPE_GROUP,
736 ELM_MAP_OVERLAY_TYPE_BUBBLE,
737 ELM_MAP_OVERLAY_TYPE_ROUTE,
738 ELM_MAP_OVERLAY_TYPE_LINE,
739 ELM_MAP_OVERLAY_TYPE_POLYGON,
740 ELM_MAP_OVERLAY_TYPE_CIRCLE,
741 ELM_MAP_OVERLAY_TYPE_SCALE
742
743} Elm_Map_Overlay_Type;
744
745typedef struct _Elm_Map_Marker Elm_Map_Marker; /**< A marker to be shown in a specific point of the map. Can be created with elm_map_marker_add() and deleted with elm_map_marker_remove(). */
746typedef struct _Elm_Map_Marker_Class Elm_Map_Marker_Class; /**< Each marker must be associated to a class. It's required to add a mark. The class defines the style of the marker when a marker is displayed alone (not grouped). A new class can be created with elm_map_marker_class_new(). */
747typedef struct _Elm_Map_Group_Class Elm_Map_Group_Class; /**< Each marker must be associated to a group class. It's required to add a mark. The group class defines the style of the marker when a marker is grouped to other markers. Markers with the same group are grouped if they are close. A new group class can be created with elm_map_marker_group_class_new(). */
748typedef struct _Elm_Map_Route Elm_Map_Route; /**< A route to be shown in the map. Can be created with elm_map_route_add() and deleted with elm_map_route_del(). */
749typedef struct _Elm_Map_Name Elm_Map_Name; /**< A handle for specific coordinates. */
750typedef struct _Elm_Map_Overlay Elm_Map_Overlay; /**< A overlay to be shown in a specific point of the map. This can be created by elm_map_overlay_add() and similar functions and deleted by elm_map_overlay_del(). */
751
752typedef Evas_Object *(*Elm_Map_Marker_Get_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Bubble content fetching class function for marker classes. When the user click on a marker, a bubble is displayed with a content. */
753typedef void (*Elm_Map_Marker_Del_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data, Evas_Object *o); /**< Function to delete bubble content for marker classes. */
754typedef Evas_Object *(*Elm_Map_Marker_Icon_Get_Func)(Evas_Object *obj, Elm_Map_Marker *marker, void *data); /**< Icon fetching class function for marker classes. */
755typedef Evas_Object *(*Elm_Map_Group_Icon_Get_Func)(Evas_Object *obj, void *data); /**< Icon fetching class function for markers group classes. */
756
757typedef void (*Elm_Map_Overlay_Get_Cb)(void *data, Evas_Object *map, Elm_Map_Overlay *overlay); /**< Get callback function for the overlay. */
758typedef void (*Elm_Map_Overlay_Del_Cb)(void *data, Evas_Object *map, Elm_Map_Overlay *overlay); /**< Det callback function for the overlay. @since 1.7 */
759typedef void (*Elm_Map_Name_Cb)(void *data, Evas_Object *map, Elm_Map_Name *name); /**< Async-callback function for the name request. */
760typedef void (*Elm_Map_Name_List_Cb)(void *data, Evas_Object *map, Eina_List *name_list); /**< Async-callback function for the name list request. */
761typedef void (*Elm_Map_Route_Cb)(void *data, Evas_Object *map, Elm_Map_Route *route); /**< Async-callback function for the route request. */
762
763/**
764 * Add a new map widget to the given parent Elementary (container) object.
765 *
766 * @param parent The parent object.
767 * @return a new map widget handle or @c NULL, on errors.
768 *
769 * This function inserts a new map widget on the canvas.
770 *
771 * @ingroup Map
772 */
773EAPI Evas_Object *elm_map_add(Evas_Object *parent);
774
775/**
776 * Set the zoom level of the map.
777 *
778 * @param obj The map object.
779 * @param zoom The zoom level to set.
780 *
781 * This sets the zoom level.
782 *
783 * It will respect limits defined by elm_map_zoom_min_set() and
784 * elm_map_zoom_max_set().
785 *
786 * By default these values are 0 (world map) and 18 (maximum zoom).
787 *
788 * This function should be used when zoom mode is set to #ELM_MAP_ZOOM_MODE_MANUAL.
789 * This is the default mode, and can be set with elm_map_zoom_mode_set().
790 *
791 * @see elm_map_zoom_mode_set()
792 * @see elm_map_zoom_get()
793 *
794 * @ingroup Map
795 */
796EAPI void elm_map_zoom_set(Evas_Object *obj, int zoom);
797
798/**
799 * Get the zoom level of the map.
800 *
801 * @param obj The map object.
802 * @return The current zoom level.
803 *
804 * This returns the current zoom level of the map object.
805 *
806 * Note that if you set the fill mode to other than #ELM_MAP_ZOOM_MODE_MANUAL
807 * (which is the default), the zoom level may be changed at any time by the
808 * map object itself to account for map size and map viewport size.
809 *
810 * @see elm_map_zoom_set() for details.
811 *
812 * @ingroup Map
813 */
814EAPI int elm_map_zoom_get(const Evas_Object *obj);
815
816/**
817 * Set the zoom mode used by the map object.
818 *
819 * @param obj The map object.
820 * @param mode The zoom mode of the map, being it one of #ELM_MAP_ZOOM_MODE_MANUAL
821 * (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
822 *
823 * This sets the zoom mode to manual or one of the automatic levels.
824 * Manual (#ELM_MAP_ZOOM_MODE_MANUAL) means that zoom is set manually by
825 * elm_map_zoom_set() and will stay at that level until changed by code
826 * or until zoom mode is changed. This is the default mode.
827 *
828 * The Automatic modes will allow the map object to automatically
829 * adjust zoom mode based on properties. #ELM_MAP_ZOOM_MODE_AUTO_FIT will
830 * adjust zoom so the map fits inside the scroll frame with no pixels
831 * outside this area. #ELM_MAP_ZOOM_MODE_AUTO_FILL will be similar but
832 * ensure no pixels within the frame are left unfilled. Do not forget that
833 * the valid sizes are 2^zoom, consequently the map may be smaller than
834 * the scroller view.
835 *
836 * @see elm_map_zoom_set()
837 *
838 * @ingroup Map
839 */
840EAPI void elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode);
841
842/**
843 * Get the zoom mode used by the map object.
844 *
845 * @param obj The map object.
846 * @return The zoom mode of the map, being it one of #ELM_MAP_ZOOM_MODE_MANUAL
847 * (default), #ELM_MAP_ZOOM_MODE_AUTO_FIT, or #ELM_MAP_ZOOM_MODE_AUTO_FILL.
848 *
849 * This function returns the current zoom mode used by the map object.
850 *
851 * @see elm_map_zoom_mode_set() for more details.
852 *
853 * @ingroup Map
854 */
855EAPI Elm_Map_Zoom_Mode elm_map_zoom_mode_get(const Evas_Object *obj);
856
857/**
858 * Set the minimum zoom of the source.
859 *
860 * @param obj The map object.
861 * @param zoom New minimum zoom value to be used.
862 *
863 * @see elm_map_zoom_min_get() for details.
864 *
865 * @ingroup Map
866 */
867EAPI void elm_map_zoom_min_set(Evas_Object *obj, int zoom);
868
869/**
870 * Get the minimum zoom of the source.
871 *
872 * @param obj The map object.
873 * @return Returns the minimum zoom of the source.
874 *
875 * @see elm_map_zoom_min_set() for details.
876 *
877 * @ingroup Map
878 */
879EAPI int elm_map_zoom_min_get(const Evas_Object *obj);
880
881/**
882 * Set the maximum zoom of the source.
883 *
884 * @param obj The map object.
885 * @param zoom New maximum zoom value to be used.
886 *
887 * @see elm_map_zoom_max_get() for details.
888 *
889 * @ingroup Map
890 */
891EAPI void elm_map_zoom_max_set(Evas_Object *obj, int zoom);
892
893/**
894 * Get the maximum zoom of the source.
895 *
896 * @param obj The map object.
897 * @return Returns the maximum zoom of the source.
898 *
899 * @see elm_map_zoom_max_set() for details.
900 *
901 * @ingroup Map
902 */
903EAPI int elm_map_zoom_max_get(const Evas_Object *obj);
904
905/**
906 * Get the current geographic coordinates of the map.
907 *
908 * @param obj The map object.
909 * @param lon Pointer to store longitude.
910 * @param lat Pointer to store latitude.
911 *
912 * This gets the current center coordinates of the map object. It can be
913 * set by elm_map_region_bring_in() and elm_map_region_show().
914 *
915 * @see elm_map_region_bring_in()
916 * @see elm_map_region_show()
917 *
918 * @ingroup Map
919 */
920EAPI void elm_map_region_get(const Evas_Object *obj, double *lon, double *lat);
921
922/**
923 * Animatedly bring in given coordinates to the center of the map.
924 *
925 * @param obj The map object.
926 * @param lon Longitude to center at.
927 * @param lat Latitude to center at.
928 *
929 * This causes map to jump to the given @p lat and @p lon coordinates
930 * and show it (by scrolling) in the center of the viewport, if it is not
931 * already centered. This will use animation to do so and take a period
932 * of time to complete.
933 *
934 * @see elm_map_region_show() for a function to avoid animation.
935 * @see elm_map_region_get()
936 *
937 * @ingroup Map
938 */
939EAPI void elm_map_region_bring_in(Evas_Object *obj, double lon, double lat);
940
941/**
942 * Show the given coordinates at the center of the map, @b immediately.
943 *
944 * @param obj The map object.
945 * @param lon Longitude to center at.
946 * @param lat Latitude to center at.
947 *
948 * This causes map to @b redraw its viewport's contents to the
949 * region containing the given @p lat and @p lon, that will be moved to the
950 * center of the map.
951 *
952 * @see elm_map_region_bring_in() for a function to move with animation.
953 * @see elm_map_region_get()
954 *
955 * @ingroup Map
956 */
957EAPI void elm_map_region_show(Evas_Object *obj, double lon, double lat);
958
959/**
960 * Convert canvas coordinates into geographic coordinates
961 * (longitude, latitude).
962 *
963 * @param obj The map object.
964 * @param x horizontal coordinate of the point to convert.
965 * @param y vertical coordinate of the point to convert.
966 * @param lon A pointer to the longitude.
967 * @param lat A pointer to the latitude.
968 *
969 * This gets longitude and latitude from canvas x, y coordinates. The canvas
970 * coordinates mean x, y coordinate from current viewport.
971 *
972 * see elm_map_region_to_canvas_convert()
973 *
974 * @ingroup Map
975 */
976EAPI void elm_map_canvas_to_region_convert(const Evas_Object *obj, const Evas_Coord x, const Evas_Coord y, double *lon, double *lat);
977
978/**
979 * Convert geographic coordinates (longitude, latitude)
980 * into canvas coordinates.
981 *
982 * @param obj The map object.
983 * @param lon The longitude to convert.
984 * @param lat The latitude to convert.
985 * @param x A pointer to horizontal coordinate.
986 * @param y A pointer to vertical coordinate.
987 *
988 * This gets canvas x, y coordinates from longitude and latitude. The canvas
989 * coordinates mean x, y coordinate from current viewport.
990 *
991 * see elm_map_canvas_to_region_convert()
992 *
993 * @ingroup Map
994 */
995EAPI void elm_map_region_to_canvas_convert(const Evas_Object *obj, double lon, double lat, Evas_Coord *x, Evas_Coord *y);
996
997/**
998 * Pause or unpause the map.
999 *
1000 * @param obj The map object.
1001 * @param paused Use @c EINA_TRUE to pause the map @p obj or @c EINA_FALSE
1002 * to unpause it.
1003 *
1004 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
1005 * for map.
1006 *
1007 * The default is off.
1008 *
1009 * This will stop zooming using animation, changing zoom levels will
1010 * change instantly. This will stop any existing animations that are running.
1011 *
1012 * @see elm_map_paused_get()
1013 *
1014 * @ingroup Map
1015 */
1016EAPI void elm_map_paused_set(Evas_Object *obj, Eina_Bool paused);
1017
1018/**
1019 * Get a value whether map is paused or not.
1020 *
1021 * @param obj The map object.
1022 * @return @c EINA_TRUE means map is pause. @c EINA_FALSE indicates
1023 * it is not.
1024 *
1025 * This gets the current paused state for the map object.
1026 *
1027 * @see elm_map_paused_set() for details.
1028 *
1029 * @ingroup Map
1030 */
1031EAPI Eina_Bool elm_map_paused_get(const Evas_Object *obj);
1032
1033/**
1034 * Rotate the map.
1035 *
1036 * @param obj The map object.
1037 * @param degree Angle from 0.0 to 360.0 to rotate around Z axis.
1038 * @param cx Rotation's center horizontal position.
1039 * @param cy Rotation's center vertical position.
1040 *
1041 * @see elm_map_rotate_get()
1042 *
1043 * @ingroup Map
1044 */
1045EAPI void elm_map_rotate_set(Evas_Object *obj, double degree, Evas_Coord cx, Evas_Coord cy);
1046
1047/**
1048 * Get the rotate degree of the map
1049 *
1050 * @param obj The map object
1051 * @param degree Pointer to store degrees from 0.0 to 360.0
1052 * to rotate around Z axis.
1053 * @param cx Pointer to store rotation's center horizontal position.
1054 * @param cy Pointer to store rotation's center vertical position.
1055 *
1056 * @see elm_map_rotate_set() to set map rotation.
1057 *
1058 * @ingroup Map
1059 */
1060EAPI void elm_map_rotate_get(const Evas_Object *obj, double *degree, Evas_Coord *cx, Evas_Coord *cy);
1061
1062/**
1063 * Enable or disable mouse wheel to be used to zoom in / out the map.
1064 *
1065 * @param obj The map object.
1066 * @param disabled Use @c EINA_TRUE to disable mouse wheel or @c EINA_FALSE
1067 * to enable it.
1068 *
1069 * Mouse wheel can be used for the user to zoom in or zoom out the map.
1070 *
1071 * It's disabled by default.
1072 *
1073 * @see elm_map_wheel_disabled_get()
1074 *
1075 * @ingroup Map
1076 */
1077EAPI void elm_map_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
1078
1079/**
1080 * Get a value whether mouse wheel is enabled or not.
1081 *
1082 * @param obj The map object.
1083 * @return @c EINA_TRUE means map is disabled. @c EINA_FALSE indicates
1084 * it is enabled.
1085 *
1086 * Mouse wheel can be used for the user to zoom in or zoom out the map.
1087 *
1088 * @see elm_map_wheel_disabled_set() for details.
1089 *
1090 * @ingroup Map
1091 */
1092EAPI Eina_Bool elm_map_wheel_disabled_get(const Evas_Object *obj);
1093
1094/**
1095 * Set the user agent used by the map object to access routing services.
1096 *
1097 * @param obj The map object.
1098 * @param user_agent The user agent to be used by the map.
1099 *
1100 * User agent is a client application implementing a network protocol used
1101 * in communications within a client–server distributed computing system
1102 *
1103 * The @p user_agent identification string will transmitted in a header
1104 * field @c User-Agent.
1105 *
1106 * @see elm_map_user_agent_get()
1107 *
1108 * @ingroup Map
1109 */
1110EAPI void elm_map_user_agent_set(Evas_Object *obj, const char *user_agent);
1111
1112/**
1113 * Get the user agent used by the map object.
1114 *
1115 * @param obj The map object.
1116 * @return The user agent identification string used by the map.
1117 *
1118 * @see elm_map_user_agent_set() for details.
1119 *
1120 * @ingroup Map
1121 */
1122EAPI const char *elm_map_user_agent_get(const Evas_Object *obj);
1123
1124
1125/**
1126 * Add a new overlay to the map object. This overlay has a default type.
1127 *
1128 * @param obj The map object to add a new overlay.
1129 * @param lon The longitude of the overlay.
1130 * @param lat The latitude of the overlay.
1131 * @return The created overlay or @c NULL upon failure.
1132 *
1133 * A overlay will be created and shown in a specific point of the map, defined
1134 * by @p lon and @p lat.
1135 *
1136 * The created overlay has a default style layout before content or
1137 * icon is set.
1138 * If content or icon is set, those are displayed instead of default style
1139 * layout.
1140 * You can set by using elm_map_overlay_content_set() or
1141 * elm_map_overlay_icon_set(). If NULL is set, default style
1142 * is shown again.
1143 *
1144 * Overlay created with this method can be deleted by elm_map_overlay_del().
1145 *
1146 * @see elm_map_overlay_del()
1147 * @see elm_map_overlay_class_add()
1148 * @see elm_map_overlay_bubble_add()
1149 * @see elm_map_overlay_content_set()
1150 * @see elm_map_overlay_icon_set()
1151 *
1152 * @ingroup Map
1153 */
1154EAPI Elm_Map_Overlay * elm_map_overlay_add(Evas_Object *obj, double lon, double lat);
1155
1156/**
1157 * Return all overlays in the map object.
1158 *
1159 * @param obj The map object to return overlays.
1160 * @return The list of all overlays or @c NULL upon failure.
1161 *
1162 * This list includes group overlays also.
1163 * So this can be changed dynamically while zooming and panning.
1164 *
1165 * @since 1.7
1166 *
1167 * @ingroup Map
1168 */
1169EAPI EAPI Eina_List * elm_map_overlays_get(Evas_Object *obj);
1170
1171/**
1172 * Delete a overlay from the map. This function can delete all types
1173 * of overlays.
1174 *
1175 * @param overlay The overlay to be deleted.
1176 *
1177 * @see elm_map_overlay_add()
1178 * @see elm_map_overlay_class_add()
1179 * @see elm_map_overlay_bubble_add()
1180 *
1181 * @ingroup Map
1182 */
1183EAPI void elm_map_overlay_del(Elm_Map_Overlay *overlay);
1184
1185/**
1186 * Get the overlay type.
1187 *
1188 * @param overlay The overlay to return type.
1189 * @return Return the overlay type.
1190 *
1191 * This type is resolved when the overlay is created.
1192 *
1193 * @see elm_map_overlay_add()
1194 * @see elm_map_overlay_class_add()
1195 * @see elm_map_overlay_bubble_add()
1196 *
1197 * @ingroup Map
1198 */
1199EAPI Elm_Map_Overlay_Type elm_map_overlay_type_get(const Elm_Map_Overlay *overlay);
1200
1201 /**
1202 * Set a pointer of user data for a overlay.
1203 *
1204 * @param overlay The overlay to own the user data.
1205 * @param data A pointer of user data
1206 *
1207 * @see elm_map_overlay_data_get()
1208 *
1209 * @ingroup Map
1210 */
1211EAPI void elm_map_overlay_data_set(Elm_Map_Overlay *overlay, void *data);
1212
1213/**
1214 * Get the user data stored on a overlay.
1215 *
1216 * @param overlay The overlay to return the user data.
1217 * @return A pointer to data stored using elm_map_overlay_data_set(),
1218 * or @c NULL, if none has been set.
1219 *
1220 * @see elm_map_overlay_data_set()
1221 *
1222 * @ingroup Map
1223 */
1224EAPI void * elm_map_overlay_data_get(const Elm_Map_Overlay *overlay);
1225
1226/**
1227 * Set if the overlay is hidden or not.
1228 *
1229 * @param overlay The overlay to be hidden.
1230 * @param hide Use @c EINA_TRUE to hide the overlay or @c EINA_FALSE to show.
1231 *
1232 * @see elm_map_overlay_hide_get()
1233 *
1234 * @ingroup Map
1235 */
1236EAPI void elm_map_overlay_hide_set(Elm_Map_Overlay *overlay, Eina_Bool hide);
1237
1238/**
1239 * Get a value whether the overlay is hidden or not.
1240 *
1241 * @param overlay The overlay to return the hidden state.
1242 * @return @c EINA_TRUE means the overlay is hidden. @c EINA_FALSE indicates
1243 * it is not.
1244 *
1245 * This gets the current hidden state for the overlay.
1246 *
1247 * @see elm_map_overlay_hide_set()
1248 *
1249 * @ingroup Map
1250 */
1251EAPI Eina_Bool elm_map_overlay_hide_get(const Elm_Map_Overlay *overlay);
1252
1253/**
1254 * Set the minimum zoom from where the overlay is displayed.
1255 *
1256 * @param overlay The overlay to be set the minimum zoom.
1257 * @param zoom The minimum zoom.
1258 *
1259 * The overlay only will be displayed when the map is displayed at @p zoom
1260 * or bigger.
1261 *
1262 * @see elm_map_overlay_displayed_zoom_min_get()
1263 *
1264 * @ingroup Map
1265 */
1266EAPI void elm_map_overlay_displayed_zoom_min_set(Elm_Map_Overlay *overlay, int zoom);
1267
1268/**
1269 * Get the minimum zoom from where the overlay is displayed.
1270 *
1271 * @param overlay The overlay to return the minimum zoom.
1272 * @return zoom The minimum zoom.
1273 *
1274 * @see elm_map_overlay_displayed_zoom_min_set()
1275 *
1276 * @ingroup Map
1277 */
1278EAPI int elm_map_overlay_displayed_zoom_min_get(const Elm_Map_Overlay *overlay);
1279
1280/**
1281 * Pause or unpause the overlay.
1282 *
1283 * @param overlay The overlay to be paused.
1284 * @param paused Use @c EINA_TRUE to pause the @p overlay or @c EINA_FALSE
1285 * to unpause it.
1286 *
1287 * This sets the paused state to on (@c EINA_TRUE) or off (@c EINA_FALSE)
1288 * for the overlay.
1289 *
1290 * The default is off.
1291 *
1292 * This will stop moving the overlay coordinates instantly.
1293 * even if map being scrolled or zoomed.
1294 *
1295 * @see elm_map_overlay_paused_get()
1296 *
1297 * @ingroup Map
1298 */
1299EAPI void elm_map_overlay_paused_set(Elm_Map_Overlay *overlay, Eina_Bool paused);
1300
1301/**
1302 * Get a value whether the overlay is paused or not.
1303 *
1304 * @param overlay The overlay to return paused state.
1305 * @return @c EINA_TRUE means overlay is paused. @c EINA_FALSE indicates
1306 * it is not.
1307 *
1308 * This gets the current paused state for the overlay.
1309 *
1310 * @see elm_map_overlay_paused_set()
1311 *
1312 * @ingroup Map
1313 */
1314EAPI Eina_Bool elm_map_overlay_paused_get(const Elm_Map_Overlay *overlay);
1315
1316/**
1317 * Get a value whether the overlay is visible or not.
1318 *
1319 * @param overlay The overlay to return visible state.
1320 * @return @c EINA_TRUE means overlay is visible. @c EINA_FALSE indicates
1321 * it is not.
1322 *
1323 * The visible of the overlay can not be set.
1324 * This value can be changed dynamically while zooming and panning
1325 *
1326 * @since 1.7
1327 *
1328 * @ingroup Map
1329 */
1330EAPI Eina_Bool elm_map_overlay_visible_get(const Elm_Map_Overlay *overlay);
1331
1332/**
1333 * Set the content object of the overlay.
1334 *
1335 * @param overlay The overlay to be set the content.
1336 * @param obj The evas object will be used to display the overlay.
1337 *
1338 * Only default and class type overlay support this function.
1339 *
1340 * The content should be resized or set size hints before set to the overlay.
1341 * <b> Do not modify this object</b> (move, show, hide, del, etc.),
1342 * after set.
1343 * You can only resize this.
1344 *
1345 * This content is what will be inside the overlay that will be displayed.
1346 * If a content is set, icon and default style layout are no more used before
1347 * the content is deleted.
1348 *
1349 * If @p obj is @c NULL, content inside the overlay is deleted.
1350 *
1351 * @see elm_map_overlay_content_get()
1352 *
1353 * @ingroup Map
1354 */
1355EAPI void elm_map_overlay_content_set(Elm_Map_Overlay *overlay, Evas_Object *obj);
1356
1357/**
1358 * Get the content object.
1359 *
1360 * @param overlay The overlay to return the content.
1361 * @return Return the evas object if it exists, else @c NULL.
1362 *
1363 * Only default and class type overlay support this function.
1364 *
1365 * Returned content is what being inside the overlay that being displayed.
1366 *
1367 * <b> Do not modify this object</b> (move, show, hide, del, etc.).
1368 * You can only resize this.
1369 *
1370 * The content can be set by elm_map_overlay_content_set().
1371 *
1372 * @see elm_map_overlay_content_set()
1373 *
1374 * @ingroup Map
1375 */
1376EAPI const Evas_Object * elm_map_overlay_content_get(const Elm_Map_Overlay *overlay);
1377
1378/**
1379 * Set a icon of the overlay.
1380 *
1381 * @param overlay The overlay to be set the icon.
1382 * @param icon The icon will be used to display the overlay.
1383 *
1384 * Only default and class type overlay support this function.
1385 *
1386 * <b> Do not modify this object</b> (move, show, hide, resize, del, etc.),
1387 * after set.
1388 *
1389 * If icon is set, default style layout will not be used.
1390 *
1391 * If @p icon is @c NULL, icon inside the overlay will be deleted.
1392 *
1393 * @see elm_map_overlay_icon_get()
1394 *
1395 * @ingroup Map
1396 */
1397EAPI void elm_map_overlay_icon_set(Elm_Map_Overlay *overlay, Evas_Object *icon);
1398
1399/**
1400 * Get the icon object.
1401 *
1402 * @param overlay The overlay to return the icon.
1403 * @return Return the icon object if it exists, else @c NULL.
1404 *
1405 * Only default and class type overlay support this function.
1406 *
1407 * Returned icon is what being inside the overlay that being displayed.
1408 *
1409 * <b> Do not modify this icon </b> (move, show, hide, resize, del, etc.).
1410 *
1411 * The icon can be set by elm_map_overlay_icon_set().
1412 *
1413 * @see elm_map_overlay_icon_set()
1414 *
1415 * @ingroup Map
1416 */
1417EAPI const Evas_Object * elm_map_overlay_icon_get(const Elm_Map_Overlay *overlay);
1418
1419/**
1420 * Set the geographic coordinates of the overlay.
1421 *
1422 * @param overlay The overlay to be set geographic coordinates.
1423 * @param lon Longitude to be set.
1424 * @param lat Latitude to be set.
1425 *
1426 * Only default and bubble type overlay support this function.
1427 *
1428 * This sets the center coordinates of the overlay. It can be
1429 * get by elm_map_overlay_region_get().
1430 *
1431 * @see elm_map_overlay_region_get()
1432 *
1433 * @ingroup Map
1434 */
1435EAPI void elm_map_overlay_region_set(Elm_Map_Overlay *overlay, double lon, double lat);
1436
1437/**
1438 * Get the geographic coordinates of the overlay.
1439 *
1440 * @param overlay The overlay to return geographic coordinates.
1441 * @param lon Pointer to store longitude.
1442 * @param lat Pointer to store latitude.
1443 *
1444 * Only default and bubble type overlay support this function.
1445 *
1446 * This returns the center coordinates of the overlay. It can be
1447 * set by elm_map_overlay_region_set().
1448 *
1449 * @see elm_map_overlay_region_set()
1450 *
1451 * @ingroup Map
1452 */
1453EAPI void elm_map_overlay_region_get(const Elm_Map_Overlay *overlay, double *lon, double *lat);
1454
1455
1456/**
1457 * Set the object color of the overlay.
1458 *
1459 * @param overlay The overlay to be set color.
1460 * @param r Red channel value, from 0 to 255.
1461 * @param g Green channel value, from 0 to 255.
1462 * @param b Blue channel value, from 0 to 255.
1463 * @param a Alpha channel value, from 0 to 255.
1464 *
1465 * It uses an additive color model, so each color channel represents
1466 * how much of each primary colors must to be used. 0 represents
1467 * absence of this color, so if all of the three are set to 0,
1468 * the color will be black.
1469 *
1470 * These component values should be integers in the range 0 to 255,
1471 * (single 8-bit byte).
1472 *
1473 * This sets the color used for the overlay. By default, it is set to
1474 * solid red (r = 255, g = 0, b = 0, a = 255).
1475 *
1476 * For alpha channel, 0 represents completely transparent, and 255, opaque.
1477 *
1478 * Function supports only ELM_MAP_OVERLAY_TYPE_CLASS, ELM_MAP_OVERLAY_TYPE_DEFAULT
1479 * and ELM_MAP_OVERLAY_TYPE_ROUTE Elm_Map_Overlay_Type types.
1480 *
1481 * @see elm_map_overlay_color_get()
1482 *
1483 * @ingroup Map
1484 */
1485EAPI void elm_map_overlay_color_set(Elm_Map_Overlay *overlay, int r, int g, int b, int a);
1486
1487/**
1488 * Get the object color of the overlay.
1489 *
1490 * @param overlay The overlay to return color.
1491 * @param r Pointer to store the red channel value.
1492 * @param g Pointer to store the green channel value.
1493 * @param b Pointer to store the blue channel value.
1494 * @param a Pointer to store the alpha channel value.
1495 *
1496 * @see elm_map_overlay_color_set()
1497 *
1498 * @ingroup Map
1499 */
1500EAPI void elm_map_overlay_color_get(const Elm_Map_Overlay *overlay, int *r, int *g, int *b, int *a);
1501
1502/**
1503 * Show the given overlay at the center of the map, immediately.
1504 *
1505 * @param overlay The overlay to be center at.
1506 *
1507 * This causes map to @b redraw its viewport's contents to the
1508 * region containing the given @p overlay's coordinates, that will be
1509 * moved to the center of the map.
1510 *
1511 * @see elm_map_overlays_show() if more than one overlay need to be displayed.
1512 *
1513 * @ingroup Map
1514 */
1515EAPI void elm_map_overlay_show(Elm_Map_Overlay *overlay);
1516
1517/**
1518 * Move and zoom the map to display a list of overlays.
1519 *
1520 * @param overlays A list of #Elm_Map_Overlay handles.
1521 *
1522 * The map will be centered on the center point of the overlays in the list.
1523 * Then the map will be zoomed in order to fit the overlays using the maximum
1524 * zoom which allows display of all the overlays.
1525 *
1526 * @warning All the overlays should belong to the same map object.
1527 *
1528 * @see elm_map_overlay_show() to show a single overlay.
1529 *
1530 * @ingroup Map
1531 */
1532EAPI void elm_map_overlays_show(Eina_List *overlays);
1533
1534/**
1535 * Set the get callback function of the overlay.
1536 *
1537 * @param overlay The overlay to own the get callback function.
1538 * @param get_cb The callback function.
1539 * @param data The user callback data.
1540 *
1541 * If the overlay is clicked, the callback wll be called.
1542 * The clicked overlay is returned by callback.
1543 *
1544 * You can add callback to the class overlay. If one of the group overlays in this class
1545 * is clicked, callback will be called and return a virtual group overlays.
1546 *
1547 * You can delete this callback function by setting @c NULL.
1548 *
1549 * @ingroup Map
1550 */
1551EAPI void elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Get_Cb get_cb, void *data);
1552
1553/**
1554 * Set the get callback function to call when the overlay is deleted.
1555 *
1556 * @param overlay The overlay to own the del callback function.
1557 * @param get_cb The callback function.
1558 * @param data The user callback data.
1559 *
1560 * If the overlay is deleted, the callback wll be called.
1561 * The deleted overlay is returned by callback.
1562 *
1563 * You can delete this callback function by setting @c NULL.
1564 *
1565 * @since 1.7
1566 *
1567 * @ingroup Map
1568 */
1569EAPI void elm_map_overlay_del_cb_set(Elm_Map_Overlay *overlay, Elm_Map_Overlay_Del_Cb del_cb, void *data);
1570
1571/**
1572 * Add a new class overlay to the map object.
1573 * This overlay has a class type.
1574 *
1575 * @param obj The map object to add a new overlay.
1576 * @return The created overlay or @c NULL upon failure.
1577 *
1578 * This overlay is not shown before overlay members are appended.
1579 * if overlay members in the same class are close, group overlays
1580 * are created. If they are far away, group overlays are hidden.
1581 * When group overlays are shown, they have default style layouts at first.
1582 *
1583 * You can change the state (hidden, paused, etc.) or set the content
1584 * or icon of the group overlays by chaning the state of the class overlay.
1585 * Do not modify the group overlay itself.
1586 *
1587 * Also these changes have a influence on the overlays in the same class
1588 * even if each overlay is alone and is not grouped.
1589 *
1590 * @see elm_map_overlay_del()
1591 * @see elm_map_overlay_add()
1592 * @see elm_map_overlay_bubble_add()
1593 *
1594 * @ingroup Map
1595 */
1596EAPI Elm_Map_Overlay * elm_map_overlay_class_add(Evas_Object *obj);
1597
1598/**
1599 * Add a new overlay member to the class overlay.
1600 *
1601 * @param clas The class overlay to add a new overlay.
1602 * @param overlay The overlay to be added to the class overlay.
1603 *
1604 * @see elm_map_overlay_class_remove()
1605 *
1606 * @ingroup Map
1607 */
1608EAPI void elm_map_overlay_class_append(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
1609
1610/**
1611 * Remove a overlay from the class.
1612 *
1613 * @param clas The class overlay to delete the overlay.
1614 * @param overlay The overlay to be deleted from the class overlay.
1615 *
1616 * @see elm_map_overlay_class_append()
1617 *
1618 * @ingroup Map
1619 */
1620EAPI void elm_map_overlay_class_remove(Elm_Map_Overlay *clas, Elm_Map_Overlay *overlay);
1621
1622/**
1623 * Set the maximum zoom from where the overlay members in the class can be
1624 * grouped.
1625 *
1626 * @param clas The overlay class has overlay members.
1627 * @param zoom The maximum zoom.
1628 *
1629 * Overlay members in the class only will be grouped when the map
1630 * is displayed at less than @p zoom.
1631 *
1632 * @see elm_map_overlay_class_zoom_max_get()
1633 *
1634 * @ingroup Map
1635 */
1636EAPI void elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *clas, int zoom);
1637
1638/**
1639 * Get the maximum zoom from where the overlay members in the class can be
1640 * grouped.
1641 *
1642 * @param clas The overlay class has overlay members.
1643 *
1644 * @return The maximum zoom.
1645 *
1646 * @see elm_map_overlay_class_zoom_max_set()
1647 *
1648 * @ingroup Map
1649 */
1650EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *clas);
1651
1652/**
1653 * Get the overlay members of the group overlay.
1654 *
1655 * @param grp The group overlay has overlay members.
1656 *
1657 * @return The list of group overlay members.
1658 *
1659 * The group overlays are virtualy overlays. Those are shown and hidden dynamically.
1660 * You can add callback to the class overlay. If one of the group overlays in this class
1661 * is clicked, callback will be called and return a virtual group overlays.
1662 *
1663 * You can change the state (hidden, paused, etc.) or set the content
1664 * or icon of the group overlays by chaning the state of the class overlay.
1665 * Do not modifty the group overlay itself.
1666 *
1667 * @see elm_map_overlay_class_add()
1668 *
1669 * @ingroup Map
1670 */
1671EAPI Eina_List * elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp);
1672
1673/**
1674 * Add a new bubble overlay to the map object.
1675 * This overlay has a bubble type.
1676 *
1677 * @param obj The map object to add a new overlay.
1678 * @return The created overlay or @c NULL upon failure.
1679 *
1680 * A bubble will not be displayed before geographic coordinates are set or
1681 * any other overlays are followed.
1682 *
1683 * This overlay has a bubble style layout and icon or content can not
1684 * be set.
1685 *
1686 * Overlay created with this method can be deleted with elm_map_overlay_del().
1687 *
1688 * @see elm_map_overlay_del()
1689 * @see elm_map_overlay_add()
1690 * @see elm_map_overlay_class_add()
1691 * @see elm_map_overlay_region_set()
1692 * @see elm_map_overlay_bubble_follow()
1693 *
1694 * @ingroup Map
1695 */
1696EAPI Elm_Map_Overlay * elm_map_overlay_bubble_add(Evas_Object *obj);
1697
1698/**
1699 * Follow a other overlay.
1700 *
1701 * @param bubble The bubble overlay to follow a parent overlay.
1702 * @param parent The parent overlay to be followed by the bubble overlay.
1703 *
1704 * Bubble overlay will follow the parent overlay's movement (hide, show, move).
1705 *
1706 * @see elm_map_overlay_bubble_add()
1707 *
1708 * @ingroup Map
1709 */
1710EAPI void elm_map_overlay_bubble_follow(Elm_Map_Overlay *bubble, const Elm_Map_Overlay *parent);
1711
1712/**
1713 * Add a content object to the bubble overlay.
1714 *
1715 * @param bubble The bubble overlay to add a content.
1716 * @param content The content to be added to the bubble overlay.
1717 *
1718 * Added contents will be displayed inside the bubble overlay.
1719 *
1720 * @see elm_map_overlay_bubble_content_clear()
1721 *
1722 * @ingroup Map
1723 */
1724EAPI void elm_map_overlay_bubble_content_append(Elm_Map_Overlay *bubble, Evas_Object *content);
1725
1726/**
1727 * Clear all contents inside the bubble overlay.
1728 *
1729 * @param bubble The bubble overlay to clear the contents.
1730 *
1731 * This will delete all contents inside the bubble overlay.
1732 *
1733 * @see elm_map_overlay_bubble_content_append()
1734 *
1735 * @ingroup Map
1736 */
1737EAPI void elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble);
1738
1739/**
1740 * Add a new route overlay to the map object.
1741 * This overlay has a route type.
1742 *
1743 * @param obj The map object to add a new overlay.
1744 * @param route The route object to make a overlay.
1745 * @return The created overlay or @c NULL upon failure.
1746 *
1747 * This overlay has a route style layout and icon or content can not
1748 * be set.
1749 *
1750 * The color scheme can be changed by elm_map_overlay_content_set().
1751 *
1752 * Overlay created with this method can be deleted with elm_map_overlay_del().
1753 *
1754 * @see elm_map_overlay_del()
1755 * @see elm_map_overlay_class_add()
1756 * @see elm_map_overlay_content_set()
1757 * @see elm_map_overlay_content_get()
1758 *
1759 * @ingroup Map
1760 */
1761EAPI Elm_Map_Overlay * elm_map_overlay_route_add(Evas_Object *obj, const Elm_Map_Route *route);
1762
1763/**
1764 * Add a new line overlay to the map object.
1765 * This overlay has a line type.
1766 *
1767 * @param obj The map object to add a new overlay.
1768 * @param flon The start longitude.
1769 * @param flat The start latitude.
1770 * @param tlon The destination longitude.
1771 * @param tlat The destination latitude.
1772 * @return The created overlay or @c NULL upon failure.
1773 *
1774 * Overlay created with this method can be deleted with elm_map_overlay_del().
1775 *
1776 * @see elm_map_overlay_del()
1777 *
1778 * @ingroup Map
1779 */
1780EAPI Elm_Map_Overlay * elm_map_overlay_line_add(Evas_Object *obj, double flon, double flat, double tlon, double tlat);
1781
1782/**
1783 * Add a new polygon overlay to the map object.
1784 * This overlay has a polygon type.
1785 *
1786 * @param obj The map object to add a new overlay.
1787 * @return The created overlay or @c NULL upon failure.
1788 *
1789 * At least 3 regions should be added to show the polygon overlay.
1790 *
1791 * Overlay created with this method can be deleted with elm_map_overlay_del().
1792 *
1793 * @see elm_map_overlay_polygon_region_add()
1794 * @see elm_map_overlay_del()
1795 *
1796 * @ingroup Map
1797 */
1798EAPI Elm_Map_Overlay * elm_map_overlay_polygon_add(Evas_Object *obj);
1799
1800/**
1801 * Add a geographic coordinates to the polygon overlay.
1802 *
1803 * @param overlay The polygon overlay to get a region.
1804 * @param lon The longitude.
1805 * @param lat The latitude.
1806 *
1807 * At least 3 regions should be added to show the polygon overlay.
1808 *
1809 * Overlay created with this method can be deleted with elm_map_overlay_del().
1810 *
1811 * @see elm_map_overlay_polygon_add()
1812 * @see elm_map_overlay_del()
1813 *
1814 * @ingroup Map
1815 */
1816EAPI void elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay, double lon, double lat);
1817
1818/**
1819 * Add a new circle overlay to the map object.
1820 * This overlay has a circle type.
1821 *
1822 * @param obj The map object to add a new overlay.
1823 * @param lon The center longitude.
1824 * @param lat The center latitude.
1825 * @param radius The pixel length of radius.
1826 * @return The created overlay or @c NULL upon failure.
1827 *
1828 * Overlay created with this method can be deleted with elm_map_overlay_del().
1829 *
1830 * @see elm_map_overlay_del()
1831 *
1832 * @ingroup Map
1833 */
1834EAPI Elm_Map_Overlay * elm_map_overlay_circle_add(Evas_Object *obj, double lon, double lat, double radius);
1835
1836/**
1837 * Add a new scale overlay to the map object.
1838 * This overlay has a scale type.
1839 *
1840 * @param obj The map object to add a new overlay.
1841 * @param x horizontal pixel coordinate.
1842 * @param y vertical pixel coordinate
1843 * @return The created overlay or @c NULL upon failure.
1844 *
1845 * The scale overlay shows the ratio of a distance on the map to the corresponding distance.
1846 *
1847 * Overlay created with this method can be deleted with elm_map_overlay_del().
1848 *
1849 * @see elm_map_overlay_del()
1850 *
1851 * @ingroup Map
1852 */
1853EAPI Elm_Map_Overlay * elm_map_overlay_scale_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1854
1855/**
1856 * Get the information of tile load status.
1857 *
1858 * @param obj The map object.
1859 * @param try_num Pointer to store number of tiles download requested.
1860 * @param finish_num Pointer to store number of tiles successfully downloaded.
1861 *
1862 * This gets the current tile loaded status for the map object.
1863 *
1864 * @ingroup Map
1865 */
1866EAPI void elm_map_tile_load_status_get(const Evas_Object *obj, int *try_num, int *finish_num);
1867
1868/**
1869 * Get the names of available sources for a specific type.
1870 *
1871 * @param obj The map object.
1872 * @param type source type.
1873 * @return The char pointer array of source names.
1874 *
1875 * It will provide a list with all available sources.
1876 * Current source can be set by elm_map_source_set(), or get with
1877 * elm_map_source_get().
1878 *
1879 * At least available sources of tile type:
1880 * @li "Mapnik"
1881 * @li "Osmarender"
1882 * @li "CycleMap"
1883 * @li "Maplint"
1884 *
1885 * At least available sources of route type:
1886 * @li "Yours"
1887 *
1888 * At least available sources of name type:
1889 * @li "Nominatim"
1890 *
1891 * @see elm_map_source_set()
1892 * @see elm_map_source_get()
1893 *
1894 * @ingroup Map
1895 */
1896EAPI const char **elm_map_sources_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1897
1898/**
1899 * Set the current source of the map for a specific type.
1900 *
1901 * @param obj The map object.
1902 * @param type source type.
1903 * @param source_name The source to be used.
1904 *
1905 * Map widget retrieves tile images that composes the map from a web service.
1906 * This web service can be set with this method
1907 * for ELM_MAP_SOURCE_TYPE_TILE type.
1908 * A different service can return a different maps with different
1909 * information and it can use different zoom values.
1910 *
1911 * Map widget provides route data based on a external web service.
1912 * This web service can be set with this method
1913 * for ELM_MAP_SOURCE_TYPE_ROUTE type.
1914 *
1915 * Map widget also provide geoname data based on a external web service.
1916 * This web service can be set with this method
1917 * for ELM_MAP_SOURCE_TYPE_NAME type.
1918 *
1919 * The @p source_name need to match one of the names provided by
1920 * elm_map_sources_get().
1921 *
1922 * The current source can be get using elm_map_source_get().
1923 *
1924 * @see elm_map_sources_get()
1925 * @see elm_map_source_get()
1926 *
1927 * @ingroup Map
1928 */
1929EAPI void elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const char *source_name);
1930
1931/**
1932 * Get the name of currently used source for a specific type.
1933 *
1934 * @param obj The map object.
1935 * @param type source type.
1936 * @return Returns the name of the source in use.
1937 *
1938 * @see elm_map_sources_get()
1939 * @see elm_map_source_set()
1940 *
1941 * @ingroup Map
1942 */
1943EAPI const char *elm_map_source_get(const Evas_Object *obj, Elm_Map_Source_Type type);
1944
1945/**
1946 * Add a new route to the map object.
1947 *
1948 * @param obj The map object.
1949 * @param type The type of transport to be considered when tracing a route.
1950 * @param method The routing method, what should be prioritized.
1951 * @param flon The start longitude.
1952 * @param flat The start latitude.
1953 * @param tlon The destination longitude.
1954 * @param tlat The destination latitude.
1955 * @param route_cb The route to be traced.
1956 * @param data A pointer of user data.
1957 *
1958 * @return The created route or @c NULL upon failure.
1959 *
1960 * A route will be traced by point on coordinates (@p flat, @p flon)
1961 * to point on coordinates (@p tlat, @p tlon), using the route service
1962 * set with elm_map_source_set().
1963 *
1964 * It will take @p type on consideration to define the route,
1965 * depending if the user will be walking or driving, the route may vary.
1966 * One of #ELM_MAP_ROUTE_TYPE_MOTOCAR, #ELM_MAP_ROUTE_TYPE_BICYCLE,
1967 * or #ELM_MAP_ROUTE_TYPE_FOOT need to be used.
1968 *
1969 * Another parameter is what the route should prioritize, the minor distance
1970 * or the less time to be spend on the route. So @p method should be one
1971 * of #ELM_MAP_ROUTE_METHOD_SHORTEST or #ELM_MAP_ROUTE_METHOD_FASTEST.
1972 *
1973 * Routes created with this method can be deleted with
1974 * elm_map_route_del(),
1975 * and distance can be get with elm_map_route_distance_get().
1976 *
1977 * @see elm_map_route_del()
1978 * @see elm_map_route_distance_get()
1979 * @see elm_map_source_set()
1980 *
1981 * @ingroup Map
1982 */
1983EAPI Elm_Map_Route *elm_map_route_add(Evas_Object *obj, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data);
1984
1985/**
1986 * Remove a route from the map.
1987 *
1988 * @param route The route to remove.
1989 *
1990 * @see elm_map_route_add()
1991 *
1992 * @ingroup Map
1993 */
1994EAPI void elm_map_route_del(Elm_Map_Route *route);
1995
1996/**
1997 * Get the route distance in kilometers.
1998 *
1999 * @param route The route object.
2000 * @return The distance of route (unit : km).
2001 *
2002 * @ingroup Map
2003 */
2004EAPI double elm_map_route_distance_get(const Elm_Map_Route *route);
2005
2006/**
2007 * Get the information of route nodes.
2008 *
2009 * @param route The route object.
2010 * @return Returns a string with the nodes of route.
2011 *
2012 * @ingroup Map
2013 */
2014EAPI const char *elm_map_route_node_get(const Elm_Map_Route *route);
2015
2016/**
2017 * Get the information of route waypoint.
2018 *
2019 * @param route the route object.
2020 * @return Returns a string with information about waypoint of route.
2021 *
2022 * @ingroup Map
2023 */
2024EAPI const char *elm_map_route_waypoint_get(const Elm_Map_Route *route);
2025
2026/**
2027 * Request a address or geographic coordinates(longitude, latitude)
2028 * from a given address or geographic coordinate(longitude, latitude).
2029 *
2030 * @param obj The map object.
2031 * @param address The address.
2032 * @param lon The longitude.
2033 * @param lat The latitude.
2034 * @param name_cb The callback function.
2035 * @param data The user callback data.
2036 * @return name A #Elm_Map_Name handle for this coordinate.
2037 *
2038 * If you want to get address from geographic coordinates, set input @p address
2039 * as @c NULL and set @p lon, @p lat as you want to convert.
2040 * If address is set except NULL, @p lon and @p lat are checked.
2041 *
2042 * To get the string for this address, elm_map_name_address_get()
2043 * should be used after callback or "name,loaded" signal is called.
2044 *
2045 * To get the longitude and latitude, elm_map_name_region_get()
2046 * should be used.
2047 *
2048 * @ingroup Map
2049 */
2050EAPI Elm_Map_Name *elm_map_name_add(const Evas_Object *obj, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data);
2051
2052/**
2053 * Request a list of addresses corresponding to a given name
2054 *
2055 * @param obj The map object.
2056 * @param address The address.
2057 * @param name_cb The callback function.
2058 * @param data The user callback data.
2059 *
2060 * If you want to search address from a name.
2061 *
2062 * @since 1.8
2063 *
2064 * @ingroup Map
2065 */
2066EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
2067
2068/**
2069 * Get the address of the name.
2070 *
2071 * @param name The name handle.
2072 * @return Returns the address string of @p name.
2073 *
2074 * This gets the coordinates of the @p name, created with one of the
2075 * conversion functions.
2076 *
2077 * @see elm_map_name_add()
2078 *
2079 * @ingroup Map
2080 */
2081EAPI const char *elm_map_name_address_get(const Elm_Map_Name *name);
2082
2083/**
2084 * Get the current coordinates of the name.
2085 *
2086 * @param name The name handle.
2087 * @param lat Pointer to store the latitude.
2088 * @param lon Pointer to store The longitude.
2089 *
2090 * This gets the coordinates of the @p name, created with one of the
2091 * conversion functions.
2092 *
2093 * @see elm_map_name_add()
2094 *
2095 * @ingroup Map
2096 */
2097EAPI void elm_map_name_region_get(const Elm_Map_Name *name, double *lon, double *lat);
2098
2099/**
2100 * Remove a name from the map.
2101 *
2102 * @param name The name to remove.
2103 *
2104 * Basically the struct handled by @p name will be freed, so conversions
2105 * between address and coordinates will be lost.
2106 *
2107 * @see elm_map_name_add()
2108 *
2109 * @ingroup Map
2110 */
2111EAPI void elm_map_name_del(Elm_Map_Name *name);
2112
2113/**
2114 * Add a track on the map
2115 *
2116 * @param obj The map object.
2117 * @param emap The emap route object.
2118 * @return The route object. This is an elm object of type Route.
2119 *
2120 * @see elm_route_add() for details.
2121 *
2122 * @ingroup Map
2123 */
2124EAPI Evas_Object *elm_map_track_add(Evas_Object *obj, void *emap);
2125
2126/**
2127 * Remove a track from the map
2128 *
2129 * @param obj The map object.
2130 * @param route The track to remove.
2131 *
2132 * @ingroup Map
2133 */
2134EAPI void elm_map_track_remove(Evas_Object *obj, Evas_Object *route);
2135 80
2136/** 81/**
2137 * @} 82 * @}
diff --git a/src/lib/elm_map_eo.h b/src/lib/elm_map_eo.h
index ea34d632d..f547a9179 100644
--- a/src/lib/elm_map_eo.h
+++ b/src/lib/elm_map_eo.h
@@ -599,7 +599,6 @@ enum
599 * @ingroup Map 599 * @ingroup Map
600 */ 600 */
601#define elm_obj_map_overlay_scale_add(x, y, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Elm_Map_Overlay **, ret) 601#define elm_obj_map_overlay_scale_add(x, y, ret) ELM_OBJ_MAP_ID(ELM_OBJ_MAP_SUB_ID_OVERLAY_SCALE_ADD), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y), EO_TYPECHECK(Elm_Map_Overlay **, ret)
602#ifdef ELM_EMAP
603 602
604/** 603/**
605 * @def elm_obj_map_track_add 604 * @def elm_obj_map_track_add
diff --git a/src/lib/elm_map_legacy.h b/src/lib/elm_map_legacy.h
index 36fb0c338..89bc94377 100644
--- a/src/lib/elm_map_legacy.h
+++ b/src/lib/elm_map_legacy.h
@@ -1,4 +1,16 @@
1/** 1/**
2 * Add a new map widget to the given parent Elementary (container) object.
3 *
4 * @param parent The parent object.
5 * @return a new map widget handle or @c NULL, on errors.
6 *
7 * This function inserts a new map widget on the canvas.
8 *
9 * @ingroup Map
10 */
11EAPI Evas_Object *elm_map_add(Evas_Object *parent);
12
13/**
2 * Set the zoom level of the map. 14 * Set the zoom level of the map.
3 * 15 *
4 * @param obj The map object. 16 * @param obj The map object.