2010-10-19 11:25:22 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
2012-03-29 12:27:13 -07:00
|
|
|
#include <Elementary.h>
|
2013-11-04 00:54:31 -08:00
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
#define SOURCE_MAX 10
|
2011-02-15 02:28:39 -08:00
|
|
|
#define MARKER_MAX 1000
|
2011-04-17 23:42:47 -07:00
|
|
|
#define NAME_ENTRY_TEXT "Enter freeform address"
|
2011-02-15 02:28:39 -08:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
typedef struct Overlay_Data
|
2009-11-15 07:53:37 -08:00
|
|
|
{
|
2015-03-30 23:11:00 -07:00
|
|
|
char file[PATH_MAX];
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
} Overlay_Data;
|
2009-11-15 07:53:37 -08:00
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
typedef struct Map_Source
|
|
|
|
{
|
|
|
|
Evas_Object *map;
|
2012-03-21 22:23:19 -07:00
|
|
|
Elm_Map_Source_Type type;
|
2011-05-04 08:01:07 -07:00
|
|
|
char *source_name;
|
|
|
|
} Map_Source;
|
2009-11-15 07:53:37 -08:00
|
|
|
|
2011-04-07 23:14:10 -07:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
static Elm_Map_Overlay *route_start, *route_end, *route_clas;
|
|
|
|
static Elm_Map_Overlay *bubble_img;
|
|
|
|
static Elm_Map_Overlay *bubble_parking;
|
|
|
|
static Elm_Map_Overlay *route_ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
static Elm_Map_Overlay *line_start, *line_end, *line;
|
|
|
|
static Elm_Map_Overlay *poly;
|
|
|
|
static Elm_Map_Overlay *circle;
|
|
|
|
static Elm_Map_Overlay *scale;
|
|
|
|
static Eina_List *poly_points;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
|
|
|
|
static Evas_Object *menu, *fs_win;
|
|
|
|
static Elm_Map_Route *route;
|
|
|
|
static Elm_Map_Name *name;
|
|
|
|
static Evas_Object *track;
|
2012-03-21 22:23:19 -07:00
|
|
|
static Evas_Coord down_x, down_y;
|
|
|
|
static Evas_Coord old_x, old_y, old_d;
|
|
|
|
static Map_Source ts[SOURCE_MAX];
|
|
|
|
static Map_Source rs[SOURCE_MAX];
|
|
|
|
static Map_Source ns[SOURCE_MAX];
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
|
2011-05-19 22:55:15 -07:00
|
|
|
static void
|
2011-06-28 00:02:37 -07:00
|
|
|
#ifdef ELM_EMAP
|
2013-08-31 18:18:03 -07:00
|
|
|
my_map_gpx_fileselector_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2011-06-28 00:02:37 -07:00
|
|
|
#else
|
2013-08-31 18:18:03 -07:00
|
|
|
my_map_gpx_fileselector_done(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2011-06-28 00:02:37 -07:00
|
|
|
#endif
|
2011-05-19 22:55:15 -07:00
|
|
|
{
|
|
|
|
const char *selected = event_info;
|
|
|
|
|
|
|
|
if (selected)
|
|
|
|
{
|
|
|
|
printf("Selected file: %s\n", selected);
|
2011-06-25 10:48:55 -07:00
|
|
|
#ifdef ELM_EMAP
|
2011-06-25 07:30:10 -07:00
|
|
|
EMap_Route *emap = emap_route_gpx_new(selected);
|
|
|
|
track = elm_map_track_add(data, emap);
|
|
|
|
#else
|
|
|
|
printf("libEMap is required !\n");
|
|
|
|
#endif
|
2011-05-19 22:55:15 -07:00
|
|
|
}
|
|
|
|
evas_object_del(fs_win);
|
|
|
|
}
|
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
static Evas_Object *
|
|
|
|
_route_icon_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Evas_Object *icon = elm_icon_add(obj);
|
2012-05-28 14:50:11 -07:00
|
|
|
elm_image_file_set(icon, PACKAGE_DATA_DIR"/images/bubble.png", NULL);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
evas_object_show(icon);
|
|
|
|
|
|
|
|
return icon;
|
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
static Evas_Object *
|
|
|
|
_box_get(Evas_Object *obj, Overlay_Data *data, Elm_Map_Overlay *ovl)
|
|
|
|
{
|
|
|
|
Evas_Object *bx, *img, *label;
|
|
|
|
double lon, lat;
|
|
|
|
char buf[256];
|
|
|
|
bx = elm_box_add(obj);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
img = evas_object_image_add(evas_object_evas_get(obj));
|
|
|
|
evas_object_image_file_set(img, data->file, NULL);
|
|
|
|
evas_object_image_filled_set(img, EINA_TRUE);
|
|
|
|
evas_object_size_hint_min_set(img, 64, 64);
|
|
|
|
evas_object_show(img);
|
|
|
|
elm_box_pack_end(bx, img);
|
|
|
|
|
|
|
|
label = elm_label_add(bx);
|
|
|
|
elm_map_overlay_region_get(ovl, &lon, &lat);
|
|
|
|
snprintf(buf, sizeof(buf), "%0.4lf %0.4lf", lon, lat);
|
|
|
|
elm_object_text_set(label, buf);
|
|
|
|
evas_object_show(label);
|
|
|
|
elm_box_pack_end(bx, label);
|
|
|
|
return bx;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_label_get(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Evas_Object *label;
|
|
|
|
label = elm_label_add(obj);
|
|
|
|
elm_object_text_set(label, "Here is a parking lot.");
|
2012-10-12 07:51:45 -07:00
|
|
|
evas_object_show(label);
|
2012-03-22 03:40:04 -07:00
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_icon_get(Evas_Object *obj, Overlay_Data *data)
|
|
|
|
{
|
|
|
|
Evas_Object *icon = elm_icon_add(obj);
|
2012-05-28 14:50:11 -07:00
|
|
|
elm_image_file_set(icon, data->file, NULL);
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_show(icon);
|
|
|
|
|
|
|
|
return icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_overlay_hide(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
elm_map_overlay_hide_set(data, EINA_TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_overlay_pause(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
elm_map_overlay_paused_set(data, EINA_TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_overlay_unpause(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
elm_map_overlay_paused_set(data, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_overlay_show(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
elm_map_overlay_show(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
|
|
|
_btn_box_get(Evas_Object *obj, Elm_Map_Overlay *ovl)
|
|
|
|
{
|
|
|
|
Evas_Object *bx, *btn, *btn2, *btn3, *btn4;
|
|
|
|
bx = elm_box_add(obj);
|
|
|
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
|
|
|
evas_object_show(bx);
|
|
|
|
|
|
|
|
btn = elm_button_add(bx);
|
|
|
|
elm_object_text_set(btn, "Hide");
|
|
|
|
evas_object_smart_callback_add(btn, "clicked", _overlay_hide, ovl);
|
|
|
|
evas_object_show(btn);
|
|
|
|
elm_box_pack_end(bx, btn);
|
|
|
|
|
|
|
|
btn2 = elm_button_add(bx);
|
|
|
|
elm_object_text_set(btn2, "Pause");
|
|
|
|
evas_object_smart_callback_add(btn2, "clicked", _overlay_pause, ovl);
|
|
|
|
evas_object_show(btn2);
|
|
|
|
elm_box_pack_end(bx, btn2);
|
|
|
|
|
|
|
|
btn3 = elm_button_add(bx);
|
|
|
|
elm_object_text_set(btn3, "Unpause");
|
|
|
|
evas_object_smart_callback_add(btn3, "clicked", _overlay_unpause, ovl);
|
|
|
|
evas_object_show(btn3);
|
|
|
|
elm_box_pack_end(bx, btn3);
|
|
|
|
|
|
|
|
btn4 = elm_button_add(bx);
|
|
|
|
elm_object_text_set(btn4, "Show");
|
|
|
|
evas_object_smart_callback_add(btn4, "clicked", _overlay_show, ovl);
|
|
|
|
evas_object_show(btn4);
|
|
|
|
elm_box_pack_end(bx, btn4);
|
|
|
|
|
|
|
|
return bx;
|
|
|
|
}
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
|
|
|
_bubble_parking_follow(Evas_Object *map)
|
|
|
|
{
|
|
|
|
double lon, lat;
|
|
|
|
Evas_Coord x, y;
|
|
|
|
|
|
|
|
if (bubble_parking)
|
|
|
|
{
|
|
|
|
Elm_Map_Overlay *ovl = elm_map_overlay_data_get(bubble_parking);
|
|
|
|
elm_map_overlay_region_get(ovl, &lon, &lat);
|
|
|
|
elm_map_region_to_canvas_convert(map, lon, lat, &x, &y);
|
|
|
|
elm_map_canvas_to_region_convert(map, x+40, y+50, &lon, &lat);
|
|
|
|
elm_map_overlay_region_set(bubble_parking, lon, lat);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
static void
|
|
|
|
_overlays_num_check(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
double lon, lat, max_lon, max_lat, min_lon, min_lat;
|
|
|
|
Eina_List *overlays, *l;
|
|
|
|
Elm_Map_Overlay *ovl;
|
|
|
|
int cnt = 0;
|
|
|
|
int cnt_visible = 0;
|
|
|
|
|
|
|
|
overlays = elm_map_overlays_get(obj);
|
|
|
|
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
|
|
|
elm_map_canvas_to_region_convert(obj, x, y, &min_lon, &max_lat);
|
|
|
|
elm_map_canvas_to_region_convert(obj, x + w, y + h, &max_lon, &min_lat);
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(overlays, l, ovl)
|
|
|
|
{
|
|
|
|
if (elm_map_overlay_type_get(ovl) == ELM_MAP_OVERLAY_TYPE_CLASS)
|
|
|
|
continue;
|
|
|
|
elm_map_overlay_region_get(ovl, &lon, &lat);
|
|
|
|
if ((min_lon <= lon) && (lon <= max_lon) &&
|
|
|
|
(min_lat <= lat) && (lat <= max_lat))
|
|
|
|
{
|
|
|
|
if (elm_map_overlay_visible_get(ovl)) cnt_visible++;
|
|
|
|
cnt++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("Number of (visible/total) overlays in viewport: %d/%d\n",
|
2013-10-13 22:40:35 -07:00
|
|
|
cnt_visible, cnt);
|
2012-05-23 03:29:03 -07:00
|
|
|
}
|
|
|
|
|
2009-11-13 07:22:23 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_clicked(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
printf("clicked\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_clicked_double(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("clicked,double\n");
|
2011-04-07 23:14:10 -07:00
|
|
|
double lon, lat;
|
2013-09-21 02:39:35 -07:00
|
|
|
Evas_Event_Mouse_Down *ev = event_info;
|
|
|
|
if (!ev) return;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Fix zoom & rotated coordinates bug
In my point of view, elm_map did not consider zooming & rotation by
using Evas_Map initially.
There are no problems if you use only elm_map_zoom_set(). But if you
use pinch gesture or wheel to do subtle zooming & rotating, the
calculations of coordinates are not correct currently.
I have fixed these problem and also made some utility APIs for user
convenience.
I made following 3 APIs.
1. elm_map_utils_size_get()
Currently users can only get integer zoom level by using
elm_map_zoom_get().
So if user want to calculate full map size, user should calculate
pow(2.0, zoom level) * tile size. Furthermore, user assumes tile size
as 256. (tile size can be changed!!)
Also it's not correct sometimes because Evas_map is used for subtle
zooming between zoom levels.
Above APIs return correct full map size.
2. elm_map_utils_region_get()
It can used for getting left top coordinates, center coordinates and
width, height of currently shown map area.
3. elm_map_utils_convert_canvas_into_geo()
Currently it is hard to converting x, y coordinates to geographical
longitude, latitude because of subtle zooming & rotating.
If use wants to get it, user uses combination of above functions and
more. It is harsh job.
This function is used for getting longitude, latitude from x, y
coordinates of current viewport.
SVN revision: 67286
2012-01-17 19:55:40 -08:00
|
|
|
if (elm_map_zoom_get(obj) < 5) return;
|
2011-04-07 23:14:10 -07:00
|
|
|
|
2013-09-21 02:39:35 -07:00
|
|
|
elm_map_canvas_to_region_convert(obj, ev->canvas.x, ev->canvas.y, &lon, &lat);
|
|
|
|
printf("x:%d, y:%d, lon:%lf, lat:%lf\n", ev->canvas.x, ev->canvas.y, lon, lat);
|
2011-04-07 23:14:10 -07:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
if (!route_clas)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Refactoring Elementary Map
I have done refactoring & code clean-up in elm_map. Event if this
patch have much changes, refactoring & code clean-up jobs almost
always do.
Anyway, code is shortened and optimized I think.
I have done following jobs in my patch.
(1) Always change child size
Scroller Child size is changed when integer zoom level is changed
before. This makes bugs which mouse pointer is not correct on the map
when map is dragging.
Now, scroller child size is always changed when double zoom level is
changed.
(2) Evas map
Evas map is used for rotation & zooming before. But now it is used for
only rotation. evas_object_resize() can do zooming because (1) makes
child size always changed.
(3) Grid & Marker & Route, etc.
Because of (1), all coordinate calculations are all changed. So grid &
marker & route should be changed.
When I have fixed these, I have these split into small function
(create, free, update, place, etc.)
So these can be easily reused for other purpose ( I will add overlay
later.)
Also marker size is not changed and is not rotated anymore because
marker's coordinate is just rotated and evas_map is not used for
marker.
And grouping algorithm is somewhat changed. Each marker can be group
leader and if other markers (followers) are closed to leader, markers
are grouped.
Actually _marker_place() function do almost everything. (place marker,
bubble, group & make group, etc.)
Bubbles go along with parent object. (show, hide, move) and this is
created when marker & group are opened.
At now, bubble display bugs are all fixed.
As before, grid is created when elm_map_add() or tile source is
changed. And I add _grid_item_* functions for each 256x256 tile
management. So grid_place() function can be simple now.
(4) Download idler
Before download is not a job or idler and is integrated with grid
calculation.
I have separated this into independent idler. So now, download idler
do download jobs when idler time.
(5) Zoom
I have made one zoom_do() function. This does all zoom jobs. At now,
pinch_zoom & wheel_zoom & animated zoom do not much jobs. just call
zoom_do().
(6) Delayed jobs
As I know, evas is based on a retained mode and calculation can be do
later. So sometimes elm_map APIs can not do the jobs correctly.
For example, elm_map_marker_list_show() or elm_map_zoom_set() can not
be used right after elm_map_add() because window size and pan size
can be 0. (refer map_example_02.c)
So when APIs related such calculation are called. These are deferred
and calculated later when _pan_calculate() is called.
5) Code clean-up
I have removed unused variables & functions. and rearranged struct &
functions & declaration & static variables, etc.
Instead of "if (!wd) return; ", I changed this by macro,
"EINA_SAFETY_ON_NULL_RETURN(wd);". This is better for function
entrance check. Also ELM_NEW is used instead of calloc or malloc.
Aboves are all related each other. So it can be hard to split this
file. If these should be splitted, I'm going to freak ;D.
This patch does no harm!!!! :D.
After this patch, I will add overlay APIs based on this patch. I
doubt whether I will add this before elementary 1.0 release. :(
SVN revision: 68207
2012-02-21 00:01:22 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
route_clas = elm_map_overlay_class_add(obj);
|
|
|
|
elm_map_overlay_icon_set(route_clas, _route_icon_get(obj));
|
|
|
|
elm_map_overlay_displayed_zoom_min_set(route_clas, 5);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Refactoring Elementary Map
I have done refactoring & code clean-up in elm_map. Event if this
patch have much changes, refactoring & code clean-up jobs almost
always do.
Anyway, code is shortened and optimized I think.
I have done following jobs in my patch.
(1) Always change child size
Scroller Child size is changed when integer zoom level is changed
before. This makes bugs which mouse pointer is not correct on the map
when map is dragging.
Now, scroller child size is always changed when double zoom level is
changed.
(2) Evas map
Evas map is used for rotation & zooming before. But now it is used for
only rotation. evas_object_resize() can do zooming because (1) makes
child size always changed.
(3) Grid & Marker & Route, etc.
Because of (1), all coordinate calculations are all changed. So grid &
marker & route should be changed.
When I have fixed these, I have these split into small function
(create, free, update, place, etc.)
So these can be easily reused for other purpose ( I will add overlay
later.)
Also marker size is not changed and is not rotated anymore because
marker's coordinate is just rotated and evas_map is not used for
marker.
And grouping algorithm is somewhat changed. Each marker can be group
leader and if other markers (followers) are closed to leader, markers
are grouped.
Actually _marker_place() function do almost everything. (place marker,
bubble, group & make group, etc.)
Bubbles go along with parent object. (show, hide, move) and this is
created when marker & group are opened.
At now, bubble display bugs are all fixed.
As before, grid is created when elm_map_add() or tile source is
changed. And I add _grid_item_* functions for each 256x256 tile
management. So grid_place() function can be simple now.
(4) Download idler
Before download is not a job or idler and is integrated with grid
calculation.
I have separated this into independent idler. So now, download idler
do download jobs when idler time.
(5) Zoom
I have made one zoom_do() function. This does all zoom jobs. At now,
pinch_zoom & wheel_zoom & animated zoom do not much jobs. just call
zoom_do().
(6) Delayed jobs
As I know, evas is based on a retained mode and calculation can be do
later. So sometimes elm_map APIs can not do the jobs correctly.
For example, elm_map_marker_list_show() or elm_map_zoom_set() can not
be used right after elm_map_add() because window size and pan size
can be 0. (refer map_example_02.c)
So when APIs related such calculation are called. These are deferred
and calculated later when _pan_calculate() is called.
5) Code clean-up
I have removed unused variables & functions. and rearranged struct &
functions & declaration & static variables, etc.
Instead of "if (!wd) return; ", I changed this by macro,
"EINA_SAFETY_ON_NULL_RETURN(wd);". This is better for function
entrance check. Also ELM_NEW is used instead of calloc or malloc.
Aboves are all related each other. So it can be hard to split this
file. If these should be splitted, I'm going to freak ;D.
This patch does no harm!!!! :D.
After this patch, I will add overlay APIs based on this patch. I
doubt whether I will add this before elementary 1.0 release. :(
SVN revision: 68207
2012-02-21 00:01:22 -08:00
|
|
|
}
|
2011-04-07 23:14:10 -07:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
if (route_start && route_end)
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_del(route_start);
|
|
|
|
elm_map_overlay_del(route_end);
|
2012-03-20 00:37:59 -07:00
|
|
|
elm_map_route_del(route);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
route_start = NULL;
|
|
|
|
route_end = NULL;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
route = NULL;
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
if (!route_start) route_start = elm_map_overlay_add(obj, lon, lat);
|
|
|
|
else route_end = elm_map_overlay_add(obj, lon, lat);
|
2011-04-07 23:14:10 -07:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
if (route_start && route_end)
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
double start_lon, start_lat, end_lon, end_lat;
|
|
|
|
elm_map_overlay_class_append(route_clas, route_start);
|
|
|
|
elm_map_overlay_class_append(route_clas, route_end);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_overlay_region_get(route_start, &start_lon, &start_lat);
|
|
|
|
elm_map_overlay_region_get(route_end, &end_lon, &end_lat);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
route = elm_map_route_add(obj, ELM_MAP_ROUTE_TYPE_MOTOCAR,
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
ELM_MAP_ROUTE_METHOD_FASTEST,
|
|
|
|
start_lon, start_lat, end_lon, end_lat,
|
|
|
|
NULL, NULL);
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_press(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("press\n");
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_longpressed(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
if (!event_info) return;
|
|
|
|
double lon, lat;
|
2013-09-21 02:39:35 -07:00
|
|
|
Evas_Event_Mouse_Down *ev = event_info;
|
|
|
|
elm_map_canvas_to_region_convert(obj, ev->canvas.x, ev->canvas.y, &lon, &lat);
|
|
|
|
printf("longpressed, x:%d, y:%d, lon:%lf, lat:%lf\n", ev->canvas.x, ev->canvas.y, lon, lat);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
|
|
|
|
if (elm_map_zoom_get(obj) < 8) return;
|
2012-03-07 05:50:37 -08:00
|
|
|
if (name) elm_map_name_del(name);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
name = elm_map_name_add(obj, NULL, lon, lat, NULL, NULL);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_scroll(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
double lon, lat;
|
|
|
|
elm_map_region_get(obj, &lon, &lat);
|
|
|
|
printf("scroll, longitude: %f latitude: %f\n", lon, lat);
|
2012-03-21 22:23:19 -07:00
|
|
|
_bubble_parking_follow(obj);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_drag_start(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("scroll,drag,start\n");
|
|
|
|
evas_object_smart_callback_del(data, "longpressed", _map_longpressed);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_drag_stop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("scroll,drag,stop\n");
|
|
|
|
evas_object_smart_callback_add(data, "longpressed", _map_longpressed, data);
|
2012-05-23 03:29:03 -07:00
|
|
|
_overlays_num_check(obj);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_anim_start(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("scroll,anim,start\n");
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_anim_stop(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("scroll,anim,stop\n");
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_zoom_start(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("zoom,start\n");
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_zoom_stop(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("zoom,stop\n");
|
2012-05-23 03:29:03 -07:00
|
|
|
_overlays_num_check(obj);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_zoom_change(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
printf("zoom,change\n");
|
2012-05-23 03:29:03 -07:00
|
|
|
_bubble_parking_follow(obj);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2012-05-24 03:07:56 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_loaded(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2012-05-24 03:07:56 -07:00
|
|
|
{
|
|
|
|
printf("loaded\n");
|
|
|
|
}
|
|
|
|
|
2011-01-10 21:48:28 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_tile_load(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
printf("tile,load\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_tile_loaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
int try_num, finish_num;
|
|
|
|
elm_map_tile_load_status_get(data, &try_num, &finish_num);
|
|
|
|
printf("tile,loaded: %d / %d\n", finish_num, try_num);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_tile_loaded_fail(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-01-10 21:48:28 -08:00
|
|
|
{
|
|
|
|
int try_num, finish_num;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_tile_load_status_get(data, &try_num, &finish_num);
|
|
|
|
printf("tile,loaded,fail: %d / %d\n", finish_num, try_num);
|
2011-01-10 21:48:28 -08:00
|
|
|
}
|
|
|
|
|
2011-04-07 23:14:10 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_route_load(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("route,load\n");
|
2011-04-26 09:19:58 -07:00
|
|
|
}
|
2011-04-07 23:14:10 -07:00
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_route_loaded(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("route,loaded\n");
|
2011-04-07 23:14:10 -07:00
|
|
|
double d;
|
|
|
|
const char *w, *n;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
|
2011-04-07 23:14:10 -07:00
|
|
|
d = elm_map_route_distance_get(route);
|
|
|
|
printf("route distance = %lf km\n", d);
|
|
|
|
|
|
|
|
w = elm_map_route_waypoint_get(route);
|
|
|
|
if (w) printf("[waypoints]\n%s\n", w);
|
|
|
|
|
|
|
|
n = elm_map_route_node_get(route);
|
|
|
|
if (n) printf("[nodes]\n%s\n", n);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
|
|
|
|
if (route_ovl) elm_map_overlay_del(route_ovl);
|
|
|
|
route_ovl = elm_map_overlay_route_add(obj, route);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_route_loaded_fail(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
printf("route,loaded,fail\n");
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
|
|
|
|
2011-04-17 23:42:47 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_name_load(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-04-17 23:42:47 -07:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("name,load\n");
|
2011-04-26 09:19:58 -07:00
|
|
|
}
|
2011-04-17 23:42:47 -07:00
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_name_loaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-04-17 23:42:47 -07:00
|
|
|
{
|
2011-12-04 21:04:24 -08:00
|
|
|
printf("name,loaded\n");
|
2011-04-17 23:42:47 -07:00
|
|
|
if (!name) return;
|
|
|
|
double lon, lat;
|
|
|
|
const char *addr = elm_map_name_address_get(name);
|
|
|
|
elm_map_name_region_get(name, &lon, &lat);
|
|
|
|
if (addr)
|
|
|
|
{
|
|
|
|
printf("name of [lon = %lf, lat = %lf] is %s\n", lon, lat, addr);
|
|
|
|
if ((lon != 0.0) && (lat !=0.0))
|
|
|
|
{
|
|
|
|
Eina_Bool b = elm_map_paused_get(data);
|
|
|
|
elm_map_paused_set(data, EINA_TRUE);
|
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_zoom_set(data, elm_map_zoom_max_get(data));
|
2012-03-07 05:50:37 -08:00
|
|
|
elm_map_region_show(data, lon, lat);
|
2011-04-17 23:42:47 -07:00
|
|
|
elm_map_paused_set(data, b);
|
|
|
|
}
|
|
|
|
}
|
2012-03-07 05:50:37 -08:00
|
|
|
|
|
|
|
elm_map_name_del(name);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
name = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_name_loaded_fail(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
printf("name,loaded,fail\n");
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
|
|
|
|
2011-05-06 23:32:34 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_src_set(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
Map_Source *s = data;
|
|
|
|
|
|
|
|
if (!s) return;
|
|
|
|
elm_map_source_set(s->map, s->type, s->source_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_show_urmatt(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-06 23:32:34 -07:00
|
|
|
{
|
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (elm_map_zoom_get(data) < 12) elm_map_zoom_set(data, 12);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_region_show(data,7.325201, 48.526813);
|
2011-05-06 23:32:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_bring_seoul(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-06 23:32:34 -07:00
|
|
|
{
|
2012-03-20 00:37:59 -07:00
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
|
|
|
if (elm_map_zoom_get(data) < 12) elm_map_zoom_set(data, 12);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_region_bring_in(data, 126.977969, 37.566535);
|
2011-05-06 23:32:34 -07:00
|
|
|
}
|
|
|
|
|
2014-05-28 01:08:00 -07:00
|
|
|
static void
|
|
|
|
_bring_zoom_suwon(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
elm_map_region_zoom_bring_in(data, 16, 126.977969, 37.566535);
|
|
|
|
}
|
|
|
|
|
2011-05-06 23:32:34 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_paused_set(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-06 23:32:34 -07:00
|
|
|
{
|
|
|
|
elm_map_paused_set(data, EINA_TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_paused_unset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-06 23:32:34 -07:00
|
|
|
{
|
|
|
|
elm_map_paused_set(data, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
2009-11-13 07:22:23 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-05-05 08:15:43 -07:00
|
|
|
int zoom;
|
2011-05-04 08:01:07 -07:00
|
|
|
|
2011-05-05 08:15:43 -07:00
|
|
|
zoom = elm_map_zoom_get(data) + 1;
|
2009-11-14 07:30:03 -08:00
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
2011-05-05 08:15:43 -07:00
|
|
|
elm_map_zoom_set(data, zoom);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_out(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-05-05 08:15:43 -07:00
|
|
|
int zoom;
|
2011-05-04 08:01:07 -07:00
|
|
|
|
2011-05-05 08:15:43 -07:00
|
|
|
zoom = elm_map_zoom_get(data) - 1;
|
2011-05-04 08:01:07 -07:00
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
2011-05-05 08:15:43 -07:00
|
|
|
elm_map_zoom_set(data, zoom);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_fit(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-05-04 08:01:07 -07:00
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT);
|
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_fill(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2011-05-19 22:55:15 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_manual(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_track_add(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-19 22:55:15 -07:00
|
|
|
{
|
2012-04-01 23:20:28 -07:00
|
|
|
Evas_Object *fs, *vbox, *hbox, *sep;
|
2011-12-13 02:39:53 -08:00
|
|
|
char *path = NULL;
|
2011-05-19 22:55:15 -07:00
|
|
|
|
2012-04-01 23:20:28 -07:00
|
|
|
fs_win = elm_win_util_standard_add("fileselector", "File Selector");
|
2014-01-06 23:48:58 -08:00
|
|
|
elm_win_autodel_set(fs_win, EINA_TRUE);
|
2011-05-19 22:55:15 -07:00
|
|
|
|
|
|
|
vbox = elm_box_add(fs_win);
|
|
|
|
evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2012-11-14 02:49:45 -08:00
|
|
|
elm_win_resize_object_add(fs_win, vbox);
|
2011-05-19 22:55:15 -07:00
|
|
|
evas_object_show(vbox);
|
|
|
|
|
|
|
|
fs = elm_fileselector_add(fs_win);
|
|
|
|
elm_fileselector_is_save_set(fs, EINA_TRUE);
|
|
|
|
elm_fileselector_expandable_set(fs, EINA_FALSE);
|
2015-05-14 12:26:44 -07:00
|
|
|
path = eina_environment_home_get();
|
2011-12-13 02:39:53 -08:00
|
|
|
//if "HOME" is not available, set current dir. path
|
|
|
|
if (!path)
|
|
|
|
path = ".";
|
|
|
|
elm_fileselector_path_set(fs, path);
|
2011-05-19 22:55:15 -07:00
|
|
|
evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
elm_box_pack_end(vbox, fs);
|
|
|
|
evas_object_show(fs);
|
|
|
|
|
|
|
|
evas_object_smart_callback_add(fs, "done", my_map_gpx_fileselector_done, data);
|
|
|
|
|
|
|
|
sep = elm_separator_add(fs_win);
|
|
|
|
elm_separator_horizontal_set(sep, EINA_TRUE);
|
|
|
|
elm_box_pack_end(vbox, sep);
|
|
|
|
evas_object_show(sep);
|
|
|
|
|
|
|
|
hbox = elm_box_add(fs_win);
|
|
|
|
elm_box_horizontal_set(hbox, EINA_TRUE);
|
|
|
|
elm_box_pack_end(vbox, hbox);
|
|
|
|
evas_object_show(hbox);
|
|
|
|
|
|
|
|
evas_object_resize(fs_win, 240, 350);
|
|
|
|
evas_object_show(fs_win);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_track_remove(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-19 22:55:15 -07:00
|
|
|
{
|
2011-06-26 10:36:18 -07:00
|
|
|
elm_map_track_remove(data, track);
|
2011-05-19 22:55:15 -07:00
|
|
|
}
|
|
|
|
|
2011-04-21 01:55:02 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_rotate_cw(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-04-21 01:55:02 -07:00
|
|
|
{
|
|
|
|
double d;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
float half_w, half_h;
|
|
|
|
evas_object_geometry_get(data, &x, &y, &w, &h);
|
|
|
|
half_w = (float)w * 0.5;
|
|
|
|
half_h = (float)h * 0.5;
|
|
|
|
|
|
|
|
elm_map_rotate_get(data, &d, NULL, NULL);
|
|
|
|
d += 15.0;
|
|
|
|
elm_map_rotate_set(data, d, x + half_w, y + half_h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_rotate_ccw(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-04-21 01:55:02 -07:00
|
|
|
{
|
|
|
|
double d;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
float half_w, half_h;
|
|
|
|
evas_object_geometry_get(data, &x, &y, &w, &h);
|
|
|
|
half_w = (float)w * 0.5;
|
|
|
|
half_h = (float)h * 0.5;
|
|
|
|
|
|
|
|
elm_map_rotate_get(data, &d, NULL, NULL);
|
|
|
|
d -= 15.0;
|
|
|
|
elm_map_rotate_set(data, d, x + half_w, y + half_h);
|
|
|
|
}
|
|
|
|
|
2009-11-13 07:22:23 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_rotate_reset(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-05-04 08:01:07 -07:00
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
float half_w, half_h;
|
|
|
|
evas_object_geometry_get(data, &x, &y, &w, &h);
|
|
|
|
half_w = (float)w * 0.5;
|
|
|
|
half_h = (float)h * 0.5;
|
2009-11-13 07:22:23 -08:00
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
elm_map_rotate_set(data, 0.0, x + half_w, y + half_h);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2011-05-26 05:40:29 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_wheel_disable(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
elm_map_wheel_disabled_set(data, EINA_TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_wheel_enable(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
elm_map_wheel_disabled_set(data, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_min_set(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-26 05:40:29 -07:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_zoom_min_set(data, 1);
|
2011-05-26 05:40:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_zoom_max_set(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-05-26 05:40:29 -07:00
|
|
|
{
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_zoom_max_set(data, 10);
|
2011-05-26 05:40:29 -07:00
|
|
|
}
|
|
|
|
|
2009-12-22 14:47:17 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_line_add(void *data, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
2009-12-18 06:28:36 -08:00
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
double lon, lat;
|
2011-02-15 02:28:39 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_map_canvas_to_region_convert(data, down_x, down_y, &lon, &lat);
|
|
|
|
printf("line marker: %d %d %lf %lf\n", down_x, down_y, lon, lat);
|
|
|
|
if (line_start && line_end)
|
|
|
|
{
|
|
|
|
elm_map_overlay_del(line_start);
|
|
|
|
elm_map_overlay_del(line_end);
|
|
|
|
elm_map_overlay_del(line);
|
|
|
|
line_start = NULL;
|
|
|
|
line_end = NULL;
|
|
|
|
line = NULL;
|
|
|
|
}
|
|
|
|
if (!line_start) line_start = elm_map_overlay_add(data, lon, lat);
|
|
|
|
else if (!line_end) line_end = elm_map_overlay_add(data, lon, lat);
|
2011-02-15 02:28:39 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (line_start && line_end)
|
|
|
|
{
|
|
|
|
double flon, flat, tlon, tlat;
|
|
|
|
elm_map_overlay_region_get(line_start, &flon, &flat);
|
|
|
|
elm_map_overlay_region_get(line_end, &tlon, &tlat);
|
|
|
|
line = elm_map_overlay_line_add(data, flon, flat, tlon, tlat);
|
|
|
|
printf("line add: (%lf, %lf) --> (%lf, %lf)\n", flon, flat, tlon, tlat);
|
|
|
|
}
|
2009-12-18 06:28:36 -08:00
|
|
|
}
|
|
|
|
|
2011-02-15 02:28:39 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_poly_add(void *data, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
2011-02-15 02:28:39 -08:00
|
|
|
{
|
2012-03-22 03:40:04 -07:00
|
|
|
double lon, lat;
|
2011-02-15 02:28:39 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_map_canvas_to_region_convert(data, down_x, down_y, &lon, &lat);
|
|
|
|
printf("%d %d %lf %lf\n", down_x, down_y, lon, lat);
|
2011-02-15 02:28:39 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (!poly) poly = elm_map_overlay_polygon_add(data);
|
|
|
|
poly_points = eina_list_append(poly_points,
|
|
|
|
elm_map_overlay_add(data, lon, lat));
|
|
|
|
elm_map_overlay_polygon_region_add(poly, lon, lat);
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_poly_clear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
2011-04-17 23:42:47 -07:00
|
|
|
{
|
2012-03-22 03:40:04 -07:00
|
|
|
Elm_Map_Overlay *ovl;
|
|
|
|
if (poly) elm_map_overlay_del(poly);
|
|
|
|
EINA_LIST_FREE(poly_points, ovl) elm_map_overlay_del(ovl);
|
|
|
|
poly = NULL;
|
|
|
|
poly_points = NULL;
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_circle_add(void *data, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
2009-11-15 07:53:37 -08:00
|
|
|
{
|
2012-03-22 03:40:04 -07:00
|
|
|
double radius = 100;
|
|
|
|
double lon, lat;
|
2009-11-15 07:53:37 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (circle) elm_map_overlay_del(circle);
|
|
|
|
elm_map_canvas_to_region_convert(data, down_x, down_y, &lon, &lat);
|
|
|
|
circle = elm_map_overlay_circle_add(data, lon, lat, radius);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_scale_add(void *data, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-03-22 03:40:04 -07:00
|
|
|
if (scale) elm_map_overlay_del(scale);
|
|
|
|
scale = elm_map_overlay_scale_add(data, down_x, down_y);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_submenu_src_add(void *data, Elm_Object_Item *parent)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
|
|
|
int idx;
|
2012-03-21 22:23:19 -07:00
|
|
|
const char **tile_srcs;
|
|
|
|
const char **route_srcs;
|
|
|
|
const char **name_srcs;
|
|
|
|
|
|
|
|
if ((!data) || (!parent)) return;
|
2011-05-04 08:01:07 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
tile_srcs = elm_map_sources_get(data, ELM_MAP_SOURCE_TYPE_TILE);
|
|
|
|
route_srcs = elm_map_sources_get(data, ELM_MAP_SOURCE_TYPE_ROUTE);
|
|
|
|
name_srcs = elm_map_sources_get(data, ELM_MAP_SOURCE_TYPE_NAME);
|
|
|
|
|
|
|
|
for (idx = 0; tile_srcs[idx]; idx++)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
|
|
|
if (idx >= SOURCE_MAX) break;
|
2012-03-21 22:23:19 -07:00
|
|
|
ts[idx].map = data;
|
|
|
|
ts[idx].type = ELM_MAP_SOURCE_TYPE_TILE;
|
|
|
|
ts[idx].source_name = strdup(tile_srcs[idx]);
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_menu_item_add(menu, parent, "", tile_srcs[idx], _src_set, &ts[idx]);
|
2011-05-04 08:01:07 -07:00
|
|
|
}
|
2012-03-21 22:23:19 -07:00
|
|
|
for (idx = 0; route_srcs[idx]; idx++)
|
|
|
|
{
|
|
|
|
if (idx >= SOURCE_MAX) break;
|
|
|
|
rs[idx].map = data;
|
|
|
|
rs[idx].type = ELM_MAP_SOURCE_TYPE_ROUTE;
|
|
|
|
rs[idx].source_name = strdup(route_srcs[idx]);
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_menu_item_add(menu, parent, "", route_srcs[idx], _src_set, &rs[idx]);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
for (idx = 0; name_srcs[idx]; idx++)
|
|
|
|
{
|
|
|
|
if (idx >= SOURCE_MAX) break;
|
|
|
|
ns[idx].map = data;
|
|
|
|
ns[idx].type = ELM_MAP_SOURCE_TYPE_NAME;
|
|
|
|
ns[idx].source_name = strdup(name_srcs[idx]);
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_menu_item_add(menu, parent, "", name_srcs[idx], _src_set, &ns[idx]);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_submenu_move_add(void *data, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if ((!data) || (!parent)) return;
|
2012-03-22 03:40:04 -07:00
|
|
|
elm_menu_item_add(menu, parent, NULL, "Show Urmatt", _show_urmatt, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Bring Seoul", _bring_seoul, data);
|
2014-05-28 01:08:00 -07:00
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom & Bring Suwon", _bring_zoom_suwon, data);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_submenu_zoom_add(void *data, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if ((!data) || (!parent)) return;
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom +", _zoom_in, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom -", _zoom_out, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom Fit", _zoom_fit, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom Fill", _zoom_fill, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom Manual", _zoom_manual, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom Min to 1", _zoom_min_set, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Zoom Max to 10", _zoom_max_set, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_submenu_prop_add(void *data, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if ((!data) || (!parent)) return;
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Paused Set", _paused_set, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Paused Unset", _paused_unset, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Rotate CW", _rotate_cw, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Rotate CCW", _rotate_ccw, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Reset Rotate", _rotate_reset, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Disable Wheel", _wheel_disable, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Enable Wheel", _wheel_enable, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_submenu_track_add(void *data, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if ((!data) || (!parent)) return;
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Add Track", _track_add, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Remove Track", _track_remove, data);
|
2011-05-04 08:01:07 -07:00
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
static void
|
|
|
|
_submenu_ovl_add(void *data, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if ((!data) || (!parent)) return;
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Add line", _line_add, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Add polygon", _poly_add, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Clear polygon", _poly_clear, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Add circle", _circle_add, data);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, "Add scale", _scale_add, data);
|
|
|
|
}
|
|
|
|
|
2013-09-21 04:24:21 -07:00
|
|
|
static void
|
|
|
|
_submenu_info_add(Evas_Object *map, Elm_Object_Item *parent)
|
|
|
|
{
|
|
|
|
if (!map || !parent) return;
|
|
|
|
char buf[PATH_MAX] = { 0 };
|
|
|
|
double lon = 0.0, lat = 0.0;
|
|
|
|
|
|
|
|
elm_map_canvas_to_region_convert(map,
|
|
|
|
down_x, down_y,
|
|
|
|
&lon, &lat);
|
|
|
|
|
|
|
|
snprintf(buf, PATH_MAX, "Longitude : %f", lon);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, buf, NULL, NULL);
|
|
|
|
|
|
|
|
snprintf(buf, PATH_MAX, "Latitude : %f", lat);
|
|
|
|
elm_menu_item_add(menu, parent, NULL, buf, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event_info)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
2013-09-21 02:39:35 -07:00
|
|
|
Evas_Event_Mouse_Down *ev = event_info;
|
2011-11-25 02:57:39 -08:00
|
|
|
Elm_Object_Item *menu_it;
|
2013-09-21 04:24:21 -07:00
|
|
|
static Elm_Object_Item *info_it = NULL;
|
|
|
|
|
2013-09-21 02:39:35 -07:00
|
|
|
if (!ev) return;
|
2011-05-04 08:01:07 -07:00
|
|
|
|
2013-09-21 02:39:35 -07:00
|
|
|
if (ev->button == 2)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
2013-09-21 02:39:35 -07:00
|
|
|
old_x = ev->canvas.x;
|
|
|
|
old_y = ev->canvas.y;
|
2011-05-04 08:01:07 -07:00
|
|
|
old_d = 0.0;
|
|
|
|
}
|
2013-09-21 02:39:35 -07:00
|
|
|
else if (ev->button == 3)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
2013-09-21 02:39:35 -07:00
|
|
|
down_x = ev->canvas.x;
|
|
|
|
down_y = ev->canvas.y;
|
2012-10-16 19:43:50 -07:00
|
|
|
if (!menu)
|
|
|
|
{
|
|
|
|
menu = elm_menu_add(obj);
|
|
|
|
elm_menu_parent_set(menu, obj);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Source", NULL, NULL);
|
|
|
|
_submenu_src_add(data, menu_it);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Move", NULL, NULL);
|
|
|
|
_submenu_move_add(data, menu_it);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Zoom", NULL, NULL);
|
|
|
|
_submenu_zoom_add(data, menu_it);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Prop", NULL, NULL);
|
|
|
|
_submenu_prop_add(data, menu_it);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Track", NULL, NULL);
|
|
|
|
_submenu_track_add(data, menu_it);
|
|
|
|
menu_it = elm_menu_item_add(menu, NULL, "", "Overlay", NULL, NULL);
|
|
|
|
_submenu_ovl_add(data, menu_it);
|
2013-09-21 04:24:21 -07:00
|
|
|
|
|
|
|
info_it = elm_menu_item_add(menu, NULL, "", "Info", NULL, NULL);
|
2012-10-16 19:43:50 -07:00
|
|
|
}
|
2013-09-21 04:24:21 -07:00
|
|
|
|
|
|
|
elm_menu_item_subitems_clear(info_it);
|
|
|
|
_submenu_info_add(obj, info_it);
|
|
|
|
|
|
|
|
elm_menu_move(menu, ev->canvas.x, ev->canvas.y);
|
2013-09-21 04:28:37 -07:00
|
|
|
evas_object_show(menu);
|
2011-05-04 08:01:07 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Move *move = event_info;
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
float half_w, half_h;
|
|
|
|
int d, d_diff;
|
|
|
|
double cur_d;
|
|
|
|
if (!move) return;
|
|
|
|
|
|
|
|
if (move->buttons == 2)
|
|
|
|
{
|
|
|
|
evas_object_geometry_get(data, &x, &y, &w, &h);
|
|
|
|
half_w = (float)w * 0.5;
|
|
|
|
half_h = (float)h * 0.5;
|
|
|
|
elm_map_rotate_get(data, &cur_d, NULL, NULL);
|
|
|
|
|
2011-06-13 04:26:08 -07:00
|
|
|
d = move->cur.canvas.x - old_x;
|
2011-05-04 08:01:07 -07:00
|
|
|
if (!old_d) old_d = d;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
d_diff = old_d - d;
|
|
|
|
if (d_diff > 0)
|
|
|
|
{
|
|
|
|
old_d --;
|
|
|
|
cur_d += 1.0;
|
|
|
|
}
|
|
|
|
else if (d_diff < 0)
|
|
|
|
{
|
|
|
|
old_d ++;
|
|
|
|
cur_d -= 1.0;
|
|
|
|
}
|
|
|
|
old_d = d;
|
|
|
|
elm_map_rotate_set(data, cur_d, x + half_w, y + half_h);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_map_mouse_up(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
2011-05-04 08:01:07 -07:00
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Up *up = event_info;
|
|
|
|
if (!up) return;
|
|
|
|
|
|
|
|
if (up->button == 2)
|
|
|
|
{
|
|
|
|
old_x = 0;
|
|
|
|
old_y = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_overlay_cb(void *data EINA_UNUSED, Evas_Object *map, void *ev)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
{
|
|
|
|
printf("Overlay clicked: ");
|
|
|
|
Elm_Map_Overlay *overlay = ev;
|
2012-03-21 22:23:19 -07:00
|
|
|
Overlay_Data *od;
|
|
|
|
Elm_Map_Overlay_Type type = elm_map_overlay_type_get(overlay);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (type != ELM_MAP_OVERLAY_TYPE_GROUP &&
|
|
|
|
type != ELM_MAP_OVERLAY_TYPE_DEFAULT) return;
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (!bubble_img) bubble_img = elm_map_overlay_bubble_add(map);
|
|
|
|
elm_map_overlay_bubble_follow(bubble_img, overlay);
|
|
|
|
elm_map_overlay_bubble_content_clear(bubble_img);
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (type == ELM_MAP_OVERLAY_TYPE_GROUP)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *memb;
|
|
|
|
Eina_List *members = elm_map_overlay_group_members_get(overlay);
|
|
|
|
printf("Group Members Num: %d\n", eina_list_count(members));
|
|
|
|
EINA_LIST_FOREACH(members, l, memb)
|
|
|
|
{
|
|
|
|
od = elm_map_overlay_data_get(memb);
|
|
|
|
if (od)
|
|
|
|
elm_map_overlay_bubble_content_append(bubble_img,
|
|
|
|
_box_get(map, od, memb));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
od = elm_map_overlay_data_get(overlay);
|
|
|
|
if (od)
|
|
|
|
elm_map_overlay_bubble_content_append(bubble_img,
|
|
|
|
_box_get(map, od, overlay));
|
|
|
|
elm_map_overlay_bubble_content_append(bubble_img,
|
|
|
|
_btn_box_get(map, overlay));
|
|
|
|
}
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_parking_cb(void *data EINA_UNUSED, Evas_Object *map, Elm_Map_Overlay *ovl)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
{
|
|
|
|
double lon, lat;
|
2012-03-07 05:50:37 -08:00
|
|
|
Evas_Coord x, y;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
elm_map_overlay_region_get(ovl, &lon, &lat);
|
2012-03-07 05:50:37 -08:00
|
|
|
elm_map_region_to_canvas_convert(map, lon, lat, &x, &y);
|
|
|
|
printf("Parking clicked: %lf %lf %d %d\n", lon, lat, x, y);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_canvas_to_region_convert(map, x+40, y+50, &lon, &lat);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
if (!bubble_parking)
|
|
|
|
{
|
|
|
|
Evas_Object *bubble, *label;
|
|
|
|
bubble = elm_bubble_add(map);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_bubble_pos_set(bubble, ELM_BUBBLE_POS_TOP_LEFT);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_object_text_set(bubble, "Overlay object");
|
|
|
|
elm_object_part_text_set(bubble, "info", "Bubble is overlayed");
|
|
|
|
|
|
|
|
label = elm_label_add(bubble);
|
|
|
|
elm_object_text_set(label, "Parking Here !!");
|
|
|
|
evas_object_show(label);
|
|
|
|
elm_object_content_set(bubble, label);
|
|
|
|
|
|
|
|
evas_object_resize(bubble, 125, 50);
|
|
|
|
evas_object_show(bubble);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
bubble_parking = elm_map_overlay_add(map, lon, lat);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_content_set(bubble_parking, bubble);
|
|
|
|
}
|
2012-03-21 22:23:19 -07:00
|
|
|
else elm_map_overlay_region_set(bubble_parking, lon, lat);
|
|
|
|
elm_map_overlay_data_set(bubble_parking, ovl);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_del_map(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ei EINA_UNUSED)
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
{
|
|
|
|
if (route_start) elm_map_overlay_del(route_start);
|
|
|
|
if (route_end) elm_map_overlay_del(route_end);
|
|
|
|
if (route_clas) elm_map_overlay_del(route_clas);
|
|
|
|
if (bubble_img) elm_map_overlay_del(bubble_img);
|
|
|
|
if (bubble_parking) elm_map_overlay_del(bubble_parking);
|
|
|
|
if (route_ovl) elm_map_overlay_del(route_ovl);
|
|
|
|
route_start = NULL;
|
|
|
|
route_end = NULL;
|
|
|
|
route_clas = NULL;
|
|
|
|
bubble_img = NULL;
|
|
|
|
bubble_parking = NULL;
|
|
|
|
route_ovl = NULL;
|
|
|
|
|
2012-03-07 05:50:37 -08:00
|
|
|
if (route) elm_map_route_del(route);
|
|
|
|
if (name) elm_map_name_del(name);
|
2012-10-16 19:43:50 -07:00
|
|
|
if (menu) evas_object_del(menu);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
route = NULL;
|
|
|
|
name = NULL;
|
2012-10-16 19:43:50 -07:00
|
|
|
menu = NULL;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
}
|
|
|
|
|
2009-11-13 07:22:23 -08:00
|
|
|
void
|
2013-08-31 18:18:03 -07:00
|
|
|
test_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-04-01 23:20:28 -07:00
|
|
|
Evas_Object *win, *map;
|
2011-05-04 02:44:53 -07:00
|
|
|
int idx = 0;
|
2012-03-21 22:23:19 -07:00
|
|
|
const char **tile_srcs;
|
|
|
|
const char **route_srcs;
|
|
|
|
const char **name_srcs;
|
2015-03-09 02:07:48 -07:00
|
|
|
Overlay_Data data1;
|
|
|
|
Overlay_Data data2;
|
|
|
|
Overlay_Data data3;
|
|
|
|
Overlay_Data data4;
|
|
|
|
Overlay_Data data5;
|
|
|
|
Overlay_Data data6;
|
|
|
|
Overlay_Data data7;
|
|
|
|
Overlay_Data data8;
|
|
|
|
Overlay_Data data9;
|
|
|
|
Overlay_Data data10;
|
|
|
|
Overlay_Data data11;
|
|
|
|
Overlay_Data parking;
|
|
|
|
Overlay_Data icon_data;
|
|
|
|
|
|
|
|
snprintf(data1.file, PATH_MAX, "%s/images/logo.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data2.file, PATH_MAX, "%s/images/logo_small.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data3.file, PATH_MAX, "%s/images/panel_01.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data4.file, PATH_MAX, "%s/images/plant_01.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data5.file, PATH_MAX, "%s/images/rock_01.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data6.file, PATH_MAX, "%s/images/rock_02.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data7.file, PATH_MAX, "%s/images/sky_01.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data8.file, PATH_MAX, "%s/images/sky_02.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data9.file, PATH_MAX, "%s/images/sky_03.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data10.file, PATH_MAX, "%s/images/sky_03.png", elm_app_data_dir_get());
|
|
|
|
snprintf(data11.file, PATH_MAX, "%s/images/wood_01.png", elm_app_data_dir_get());
|
|
|
|
snprintf(parking.file, PATH_MAX, "%s/images/parking.png", elm_app_data_dir_get());
|
|
|
|
snprintf(icon_data.file, PATH_MAX, "%s/images/icon_14.png", elm_app_data_dir_get());
|
2009-11-13 07:22:23 -08:00
|
|
|
|
2012-04-01 23:20:28 -07:00
|
|
|
win = elm_win_util_standard_add("map", "Map");
|
2011-07-25 07:22:19 -07:00
|
|
|
elm_win_autodel_set(win, EINA_TRUE);
|
2009-11-13 07:22:23 -08:00
|
|
|
|
|
|
|
map = elm_map_add(win);
|
2011-04-08 07:30:48 -07:00
|
|
|
if (map)
|
2009-12-07 10:05:04 -08:00
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Elm_Map_Overlay *ovl_1, *ovl_2, *ovl_3, *ovl_4, *ovl_5, *ovl_6;
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
Elm_Map_Overlay *ovl_7, *ovl_8, *ovl_9, *ovl_10, *ovl_11;
|
|
|
|
Elm_Map_Overlay *parking1, *parking2, *parking3, *parking4, *parking5;
|
|
|
|
Elm_Map_Overlay *grp1, *grp2, *grp_parking;
|
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
evas_object_event_callback_add(map, EVAS_CALLBACK_DEL, _del_map, NULL);
|
|
|
|
|
2011-05-04 02:44:53 -07:00
|
|
|
srand(time(NULL));
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
tile_srcs = elm_map_sources_get(map, ELM_MAP_SOURCE_TYPE_TILE);
|
|
|
|
route_srcs = elm_map_sources_get(map, ELM_MAP_SOURCE_TYPE_ROUTE);
|
|
|
|
name_srcs = elm_map_sources_get(map, ELM_MAP_SOURCE_TYPE_NAME);
|
2011-05-04 02:44:53 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (!tile_srcs) return;
|
|
|
|
printf("Tile sources [ ");
|
|
|
|
for (idx = 0; tile_srcs[idx] ; idx++) printf("%s, ", tile_srcs[idx]);
|
|
|
|
printf("]\n");
|
|
|
|
if (!route_srcs) return;
|
|
|
|
printf("Route sources [ ");
|
|
|
|
for (idx = 0; route_srcs[idx] ; idx++) printf("%s, ", route_srcs[idx]);
|
|
|
|
printf("]\n");
|
|
|
|
if (!name_srcs) return;
|
|
|
|
printf("Name sources [ ");
|
|
|
|
for (idx = 0; name_srcs[idx] ; idx++) printf("%s, ", name_srcs[idx]);
|
2011-05-04 02:44:53 -07:00
|
|
|
printf("]\n");
|
2009-12-18 06:28:36 -08:00
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2011-11-11 08:47:05 -08:00
|
|
|
elm_win_resize_object_add(win, map);
|
2009-12-07 10:05:04 -08:00
|
|
|
evas_object_data_set(map, "window", win);
|
|
|
|
|
2011-05-04 08:01:07 -07:00
|
|
|
evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_DOWN,
|
|
|
|
_map_mouse_down, map);
|
|
|
|
evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_MOVE,
|
|
|
|
_map_mouse_move, map);
|
|
|
|
evas_object_event_callback_add(map, EVAS_CALLBACK_MOUSE_UP,
|
|
|
|
_map_mouse_up, map);
|
2009-12-07 10:05:04 -08:00
|
|
|
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
evas_object_smart_callback_add(map, "clicked", _map_clicked, map);
|
|
|
|
evas_object_smart_callback_add(map, "clicked,double", _map_clicked_double, map);
|
|
|
|
evas_object_smart_callback_add(map, "press", _map_press, map);
|
|
|
|
evas_object_smart_callback_add(map, "longpressed", _map_longpressed, map);
|
|
|
|
evas_object_smart_callback_add(map, "scroll", _map_scroll, map);
|
|
|
|
evas_object_smart_callback_add(map, "scroll,drag,start", _map_drag_start, map);
|
|
|
|
evas_object_smart_callback_add(map, "scroll,drag,stop", _map_drag_stop, map);
|
|
|
|
evas_object_smart_callback_add(map, "scroll,anim,start", _map_anim_start, map);
|
|
|
|
evas_object_smart_callback_add(map, "scroll,anim,stop", _map_anim_stop, map);
|
|
|
|
evas_object_smart_callback_add(map, "zoom,start", _map_zoom_start, map);
|
|
|
|
evas_object_smart_callback_add(map, "zoom,stop", _map_zoom_stop, map);
|
|
|
|
evas_object_smart_callback_add(map, "zoom,change", _map_zoom_change, map);
|
2012-05-24 03:07:56 -07:00
|
|
|
evas_object_smart_callback_add(map, "loaded", _map_loaded, map);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Change & Add map APIs
I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)
1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get
2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert
I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.
3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get
4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx
I will add line, rectangle, poi overlays ASAP.
5) Source - External Provider (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get
I will add more provider ASAP such as POI, etc.
6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get
7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get
6) Route and 7) Name do not return visible objects actually. Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are tightly coupled with
Map.
If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.
8) Miscellaneous
elm_map_tile_load_status_get
9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"
There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.
PS) Documentations and some minor bugs are remained yet.
SVN revision: 68915
2012-03-07 01:28:08 -08:00
|
|
|
evas_object_smart_callback_add(map, "tile,load", _map_tile_load, map);
|
|
|
|
evas_object_smart_callback_add(map, "tile,loaded", _map_tile_loaded, map);
|
|
|
|
evas_object_smart_callback_add(map, "tile,loaded,fail", _map_tile_loaded_fail, map);
|
|
|
|
evas_object_smart_callback_add(map, "route,load", _map_route_load, map);
|
|
|
|
evas_object_smart_callback_add(map, "route,loaded", _map_route_loaded, map);
|
|
|
|
evas_object_smart_callback_add(map, "route,loaded,fail", _map_route_loaded_fail, map);
|
|
|
|
evas_object_smart_callback_add(map, "name,load", _map_name_load, map);
|
|
|
|
evas_object_smart_callback_add(map, "name,loaded", _map_name_loaded, map);
|
|
|
|
evas_object_smart_callback_add(map, "name,loaded,fail", _map_name_loaded_fail, map);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
evas_object_smart_callback_add(map, "overlay,clicked", _overlay_cb, map);
|
|
|
|
|
|
|
|
// Create Overlays
|
|
|
|
ovl_1 = elm_map_overlay_add(map, 2.352, 48.857);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_color_set(ovl_1, 0x00, 0xfa, 0x9a, 0xff);
|
|
|
|
elm_map_overlay_displayed_zoom_min_set(ovl_1, 5);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
ovl_2 = elm_map_overlay_add(map, 3, 48.857);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_color_set(ovl_2, 0xff, 0xd7, 0x00, 0xff);
|
|
|
|
elm_map_overlay_displayed_zoom_min_set(ovl_2, 4);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
ovl_3 = elm_map_overlay_add(map, 2.352, 49);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_displayed_zoom_min_set(ovl_3, 3);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
ovl_4 = elm_map_overlay_add(map, 7.31451, 48.857127);
|
|
|
|
ovl_5 = elm_map_overlay_add(map, 7.314704, 48.857119);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl_6 = elm_map_overlay_add(map, 7.31432, 48.856785);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
ovl_7 = elm_map_overlay_add(map, 7.3148, 48.85725);
|
|
|
|
ovl_8 = elm_map_overlay_add(map, 7.316445, 48.8572210000694);
|
|
|
|
ovl_9 = elm_map_overlay_add(map, 7.316527000125, 48.85609);
|
|
|
|
ovl_10 = elm_map_overlay_add(map, 7.3165409990833, 48.856078);
|
|
|
|
ovl_11 = elm_map_overlay_add(map, 7.319812, 48.856561);
|
|
|
|
elm_map_overlay_data_set(ovl_1, &data1);
|
|
|
|
elm_map_overlay_data_set(ovl_2, &data2);
|
|
|
|
elm_map_overlay_data_set(ovl_3, &data3);
|
|
|
|
elm_map_overlay_data_set(ovl_4, &data4);
|
|
|
|
elm_map_overlay_data_set(ovl_5, &data5);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_data_set(ovl_6, &data6);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_data_set(ovl_7, &data7);
|
|
|
|
elm_map_overlay_data_set(ovl_8, &data8);
|
|
|
|
elm_map_overlay_data_set(ovl_9, &data9);
|
|
|
|
elm_map_overlay_data_set(ovl_10, &data10);
|
|
|
|
elm_map_overlay_data_set(ovl_11, &data11);
|
|
|
|
|
|
|
|
// Append overlays to groups
|
|
|
|
grp1 = elm_map_overlay_class_add(map);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_class_zoom_max_set(grp1, 6);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_class_append(grp1, ovl_1);
|
|
|
|
elm_map_overlay_class_append(grp1, ovl_2);
|
|
|
|
elm_map_overlay_class_append(grp1, ovl_3);
|
|
|
|
elm_map_overlay_class_append(grp1, ovl_4);
|
|
|
|
elm_map_overlay_class_append(grp1, ovl_5);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_class_append(grp1, ovl_6);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
|
|
|
|
// Append overlays to groups
|
|
|
|
grp2 = elm_map_overlay_class_add(map);
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_displayed_zoom_min_set(grp2, 9);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_class_append(grp2, ovl_7);
|
|
|
|
elm_map_overlay_class_append(grp2, ovl_8);
|
|
|
|
elm_map_overlay_class_append(grp2, ovl_9);
|
|
|
|
elm_map_overlay_class_append(grp2, ovl_10);
|
|
|
|
elm_map_overlay_class_append(grp2, ovl_11);
|
|
|
|
|
|
|
|
// Create overlays
|
|
|
|
parking1 = elm_map_overlay_add(map, 127.04871, 37.25730);
|
|
|
|
parking2 = elm_map_overlay_add(map, 127.05578, 37.25545);
|
|
|
|
parking3 = elm_map_overlay_add(map, 127.05515, 37.25439);
|
|
|
|
parking4 = elm_map_overlay_add(map, 127.05328, 37.25721);
|
|
|
|
elm_map_overlay_icon_set(parking4, _icon_get(map, &icon_data));
|
2012-03-21 22:23:19 -07:00
|
|
|
parking5 = elm_map_overlay_add(map, 127.05431, 37.25873);
|
|
|
|
elm_map_overlay_content_set(parking5, _label_get(map));
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_get_cb_set(parking1, _parking_cb, NULL);
|
|
|
|
elm_map_overlay_get_cb_set(parking2, _parking_cb, NULL);
|
|
|
|
elm_map_overlay_get_cb_set(parking3, _parking_cb, NULL);
|
|
|
|
elm_map_overlay_get_cb_set(parking4, _parking_cb, NULL);
|
|
|
|
elm_map_overlay_get_cb_set(parking5, _parking_cb, NULL);
|
|
|
|
|
|
|
|
// Append overlays to groups
|
|
|
|
grp_parking = elm_map_overlay_class_add(map);
|
|
|
|
elm_map_overlay_icon_set(grp_parking, _icon_get(map, &parking));
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_map_overlay_get_cb_set(grp_parking, _parking_cb, NULL);
|
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map
I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2
Marker only supports layout style overlay. So only icon and image are
suitable for marker. For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types. And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions. (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class. (Same functionality as previous
maker class.)
There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.
After this patch, I will fix signals and function names before
elementary 1.0 releases.
SVN revision: 68672
2012-03-04 20:18:33 -08:00
|
|
|
elm_map_overlay_class_append(grp_parking, parking1);
|
|
|
|
elm_map_overlay_class_append(grp_parking, parking2);
|
|
|
|
elm_map_overlay_class_append(grp_parking, parking3);
|
|
|
|
elm_map_overlay_class_append(grp_parking, parking4);
|
|
|
|
elm_map_overlay_class_append(grp_parking, parking5);
|
2009-12-07 10:05:04 -08:00
|
|
|
|
|
|
|
evas_object_show(map);
|
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
|
|
|
|
evas_object_resize(win, 800, 800);
|
|
|
|
evas_object_show(win);
|
|
|
|
}
|