2013-04-25 22:13:00 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2014-10-17 08:56:11 -07:00
|
|
|
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
|
|
|
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
#include <Elementary.h>
|
2013-04-25 22:13:00 -07:00
|
|
|
|
2009-11-13 07:22:23 -08:00
|
|
|
#include "elm_priv.h"
|
2012-07-30 15:36:50 -07:00
|
|
|
#include "elm_widget_map.h"
|
2012-11-25 22:32:53 -08:00
|
|
|
#include "elm_interface_scrollable.h"
|
2012-07-30 15:36:50 -07:00
|
|
|
|
2014-06-03 03:35:28 -07:00
|
|
|
#define MY_PAN_CLASS ELM_MAP_PAN_CLASS
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2013-11-07 03:44:22 -08:00
|
|
|
#define MY_PAN_CLASS_NAME "Elm_Map_Pan"
|
|
|
|
#define MY_PAN_CLASS_NAME_LEGACY "elm_map_pan"
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2014-06-03 03:35:28 -07:00
|
|
|
#define MY_CLASS ELM_MAP_CLASS
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2013-11-07 06:29:38 -08:00
|
|
|
#define MY_CLASS_NAME "Elm_Map"
|
|
|
|
#define MY_CLASS_NAME_LEGACY "elm_map"
|
2011-11-20 07:00:43 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
#define OVERLAY_CLASS_ZOOM_MAX 255
|
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
|
|
|
#define MAX_CONCURRENT_DOWNLOAD 10
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
#define ROUND(z) (((z) < 0) ? (int)ceil((z) - 0.005) : (int)floor((z) + 0.005))
|
|
|
|
#define EVAS_MAP_POINT 4
|
|
|
|
#define DEFAULT_TILE_SIZE 256
|
|
|
|
#define MARER_MAX_NUMBER 30
|
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
|
|
|
#define OVERLAY_GROUPING_SCALE 2
|
2014-05-28 01:08:00 -07:00
|
|
|
#define ZOOM_ANIM_CNT 75
|
|
|
|
#define ZOOM_BRING_CNT 80
|
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-07-19 13:26:09 -07:00
|
|
|
#define CACHE_ROOT "/elm_map"
|
|
|
|
#define CACHE_TILE_ROOT CACHE_ROOT "/%d/%d/%d"
|
|
|
|
#define CACHE_TILE_PATH "%s/%d.png"
|
|
|
|
#define CACHE_ROUTE_ROOT CACHE_ROOT "/route"
|
|
|
|
#define CACHE_NAME_ROOT CACHE_ROOT "/name"
|
|
|
|
|
|
|
|
#define ROUTE_YOURS_URL "http://www.yournavigation.org/api/dev/route.php"
|
|
|
|
#define ROUTE_TYPE_MOTORCAR "motocar"
|
|
|
|
#define ROUTE_TYPE_BICYCLE "bicycle"
|
|
|
|
#define ROUTE_TYPE_FOOT "foot"
|
|
|
|
#define YOURS_DISTANCE "distance"
|
|
|
|
#define YOURS_DESCRIPTION "description"
|
|
|
|
#define YOURS_COORDINATES "coordinates"
|
|
|
|
|
|
|
|
#define NAME_NOMINATIM_URL "http://nominatim.openstreetmap.org"
|
|
|
|
#define NOMINATIM_RESULT "result"
|
|
|
|
#define NOMINATIM_PLACE "place"
|
|
|
|
#define NOMINATIM_ATTR_LON "lon"
|
|
|
|
#define NOMINATIM_ATTR_LAT "lat"
|
2012-10-12 03:27:08 -07:00
|
|
|
#define NOMINATIM_ATTR_ADDRESS "display_name"
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-04-14 22:52:06 -07:00
|
|
|
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
|
|
|
static Eina_Bool _key_action_zoom(Evas_Object *obj, const char *params);
|
2016-01-27 16:46:16 -08:00
|
|
|
static Eina_Bool _zoom_animator_set(Elm_Map_Data *sd, void *callback);
|
2014-04-14 22:52:06 -07:00
|
|
|
|
|
|
|
static const Elm_Action key_actions[] = {
|
|
|
|
{"move", _key_action_move},
|
|
|
|
{"zoom", _key_action_zoom},
|
|
|
|
{NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_mapnik_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int zoom)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
// ((x+y+zoom)%3)+'a' is requesting map images from distributed
|
|
|
|
// tile servers (eg., a, b, c)
|
|
|
|
snprintf(buf, sizeof(buf), "http://%c.tile.openstreetmap.org/%d/%d/%d.png",
|
|
|
|
((x + y + zoom) % 3) + 'a', zoom, x, y);
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_osmarender_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int zoom)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"http://%c.tah.openstreetmap.org/Tiles/tile/%d/%d/%d.png",
|
|
|
|
((x + y + zoom) % 3) + 'a', zoom, x, y);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_cyclemap_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int zoom)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"http://%c.tile.opencyclemap.org/cycle/%d/%d/%d.png",
|
|
|
|
((x + y + zoom) % 3) + 'a', zoom, x, y);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_mapquest_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int zoom)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"http://otile%d.mqcdn.com/tiles/1.0.0/osm/%d/%d/%d.png",
|
|
|
|
((x + y + zoom) % 4) + 1, zoom, x, y);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_mapquest_aerial_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int zoom)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "http://oatile%d.mqcdn.com/naip/%d/%d/%d.png",
|
|
|
|
((x + y + zoom) % 4) + 1, zoom, x, y);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_yours_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
const char *type_name,
|
|
|
|
int method,
|
|
|
|
double flon,
|
|
|
|
double flat,
|
|
|
|
double tlon,
|
|
|
|
double tlat)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf
|
|
|
|
(buf, sizeof(buf),
|
|
|
|
"%s?flat=%lf&flon=%lf&tlat=%lf&tlon=%lf&v=%s&fast=%d&instructions=1",
|
|
|
|
ROUTE_YOURS_URL, flat, flon, tlat, tlon, type_name, method);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: fix monav api
|
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
|
|
|
/*
|
2012-07-19 13:26:09 -07:00
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_monav_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
char *type_name,
|
|
|
|
int method,
|
|
|
|
double flon,
|
|
|
|
double flat,
|
|
|
|
double tlon,
|
|
|
|
double tlat)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"%s?flat=%f&flon=%f&tlat=%f&tlon=%f&v=%s&fast=%d&instructions=1",
|
|
|
|
ROUTE_MONAV_URL, flat, flon, tlat, tlon, type_name, method);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
//TODO: fix ors api
|
|
|
|
|
|
|
|
static char *
|
2014-01-06 06:30:02 -08:00
|
|
|
_ors_url_cb(const Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
char *type_name,
|
|
|
|
int method,
|
|
|
|
double flon,
|
|
|
|
double flat,
|
|
|
|
double tlon,
|
|
|
|
double tlat)
|
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"%s?flat=%f&flon=%f&tlat=%f&tlon=%f&v=%s&fast=%d&instructions=1",
|
|
|
|
ROUTE_ORS_URL, flat, flon, tlat, tlon, type_name, method);
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
static char *
|
|
|
|
_nominatim_url_cb(const Evas_Object *obj,
|
|
|
|
int method,
|
|
|
|
const char *name,
|
|
|
|
double lon,
|
|
|
|
double lat)
|
|
|
|
{
|
|
|
|
char **str;
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
unsigned int ele, idx;
|
|
|
|
char search_url[PATH_MAX];
|
|
|
|
|
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
|
|
|
|
if (method == ELM_MAP_NAME_METHOD_SEARCH)
|
|
|
|
{
|
|
|
|
search_url[0] = '\0';
|
|
|
|
str = eina_str_split_full(name, " ", 0, &ele);
|
|
|
|
for (idx = 0; idx < ele; idx++)
|
|
|
|
{
|
|
|
|
eina_strlcat(search_url, str[idx], sizeof(search_url));
|
|
|
|
if (!(idx == (ele - 1)))
|
|
|
|
eina_strlcat(search_url, "+", sizeof(search_url));
|
|
|
|
}
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"%s/search?q=%s&format=xml&polygon=0&addressdetails=0",
|
|
|
|
NAME_NOMINATIM_URL, search_url);
|
|
|
|
|
2013-01-09 00:49:30 -08:00
|
|
|
if (str)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
2014-01-21 18:08:47 -08:00
|
|
|
free(str[0]);
|
2012-07-19 13:26:09 -07:00
|
|
|
free(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (method == ELM_MAP_NAME_METHOD_REVERSE)
|
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"%s/reverse?format=xml&lat=%lf&lon=%lf&zoom=%d&addressdetails=0",
|
|
|
|
NAME_NOMINATIM_URL, lat, lon, (int)sd->zoom);
|
|
|
|
else strcpy(buf, "");
|
|
|
|
|
|
|
|
return strdup(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Refer : http://wiki.openstreetmap.org/wiki/FAQ
|
|
|
|
// meters per pixel when latitude is 0 (equator)
|
|
|
|
// meters per pixel = _osm_scale_meter[zoom] * cos (latitude)
|
2015-11-11 08:27:29 -08:00
|
|
|
static const double _osm_scale_meter[] =
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
78206, 39135.758482, 19567.879241, 9783.939621, 4891.969810,
|
|
|
|
2445.984905, 1222.992453, 611.496226, 305.748113, 152.874057, 76.437028,
|
|
|
|
38.218514, 19.109257, 9.554629, 4.777314, 2.388657, 1.194329, 0.597164,
|
|
|
|
0.29858
|
|
|
|
};
|
|
|
|
|
|
|
|
static double
|
2014-01-06 06:30:02 -08:00
|
|
|
_scale_cb(const Evas_Object *obj EINA_UNUSED,
|
|
|
|
double lon EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
double lat,
|
|
|
|
int zoom)
|
|
|
|
{
|
2013-01-09 07:34:59 -08:00
|
|
|
if ((zoom < 0) ||
|
|
|
|
(zoom >= (int)(sizeof(_osm_scale_meter) / sizeof(_osm_scale_meter[0])))
|
|
|
|
)
|
|
|
|
return 0;
|
2015-04-30 22:34:11 -07:00
|
|
|
return _osm_scale_meter[zoom] * cos(lat * ELM_PI / 180.0);
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2016-12-05 21:17:31 -08:00
|
|
|
static Evas_Object *
|
|
|
|
_osm_copyright_cb(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
Evas_Object *label;
|
|
|
|
|
|
|
|
label = elm_label_add(obj);
|
|
|
|
elm_object_text_set(label, "<color=#000000FF><backing=on><backing_color=#FCFCFBFF><shadow_color=#00000000>"
|
|
|
|
"openstreetmap.org opendatacommons.org creativecommons.org"
|
|
|
|
"</shadow_color></backing_color></backing></color>");
|
|
|
|
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
2015-11-11 08:27:29 -08:00
|
|
|
static const Source_Tile src_tiles[] =
|
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
|
|
|
{
|
2016-12-05 21:17:31 -08:00
|
|
|
{"Mapnik", 0, 18, _mapnik_url_cb, NULL, NULL, _scale_cb, _osm_copyright_cb},
|
|
|
|
{"Osmarender", 0, 17, _osmarender_url_cb, NULL, NULL, _scale_cb, _osm_copyright_cb},
|
|
|
|
{"CycleMap", 0, 16, _cyclemap_url_cb, NULL, NULL, _scale_cb, _osm_copyright_cb},
|
|
|
|
{"MapQuest", 0, 18, _mapquest_url_cb, NULL, NULL, _scale_cb, _osm_copyright_cb},
|
2012-07-19 13:26:09 -07:00
|
|
|
{"MapQuest Open Aerial", 0, 11, _mapquest_aerial_url_cb, NULL, NULL,
|
2016-12-05 21:17:31 -08:00
|
|
|
_scale_cb, _osm_copyright_cb}
|
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
|
|
|
};
|
|
|
|
|
2016-03-22 15:58:18 -07:00
|
|
|
static void _kml_parse(Elm_Map_Route *r);
|
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
|
|
|
// FIXME: Fix more open sources
|
2015-11-11 08:27:29 -08:00
|
|
|
static const Source_Route src_routes[] =
|
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
|
|
|
{
|
2016-03-22 15:58:18 -07:00
|
|
|
{"Yours", _yours_url_cb, _kml_parse} // http://www.yournavigation.org/
|
|
|
|
//{"Monav", _monav_url_cb, _kml_parse},
|
|
|
|
//{"ORS", _ors_url_cb, _kml_parse)}, // http://www.openrouteservice.org
|
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
|
|
|
};
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
// Scale in meters
|
2015-11-11 08:27:29 -08:00
|
|
|
static const double _scale_tb[] =
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
10000000, 5000000, 2000000, 1000000, 500000, 200000, 100000, 50000,
|
|
|
|
20000, 10000, 5000, 2000, 1000, 500, 500, 200, 100, 50, 20, 10, 5, 2, 1
|
|
|
|
};
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2016-03-22 15:58:18 -07:00
|
|
|
static void _name_parse(Elm_Map_Name *n);
|
|
|
|
static void _name_list_parse(Elm_Map_Name_List *nl);
|
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
|
|
|
// FIXME: Add more open sources
|
2015-11-11 08:27:29 -08:00
|
|
|
static const Source_Name src_names[] =
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
2016-03-22 15:58:18 -07:00
|
|
|
{"Nominatim", _nominatim_url_cb, _name_parse, _name_list_parse}
|
2011-04-07 23:14:10 -07:00
|
|
|
};
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static int id_num = 1;
|
|
|
|
|
|
|
|
static const char SIG_CLICKED[] = "clicked";
|
|
|
|
static const char SIG_CLICKED_DOUBLE[] = "clicked,double";
|
|
|
|
static const char SIG_PRESS[] = "press";
|
|
|
|
static const char SIG_LONGPRESSED[] = "longpressed";
|
|
|
|
static const char SIG_SCROLL[] = "scroll";
|
|
|
|
static const char SIG_SCROLL_DRAG_START[] = "scroll,drag,start";
|
|
|
|
static const char SIG_SCROLL_DRAG_STOP[] = "scroll,drag,stop";
|
|
|
|
static const char SIG_SCROLL_ANIM_START[] = "scroll,anim,start";
|
|
|
|
static const char SIG_SCROLL_ANIM_STOP[] = "scroll,anim,stop";
|
|
|
|
static const char SIG_ZOOM_START[] = "zoom,start";
|
|
|
|
static const char SIG_ZOOM_STOP[] = "zoom,stop";
|
|
|
|
static const char SIG_ZOOM_CHANGE[] = "zoom,change";
|
|
|
|
static const char SIG_LOADED[] = "loaded";
|
|
|
|
static const char SIG_TILE_LOAD[] = "tile,load";
|
|
|
|
static const char SIG_TILE_LOADED[] = "tile,loaded";
|
|
|
|
static const char SIG_TILE_LOADED_FAIL[] = "tile,loaded,fail";
|
|
|
|
static const char SIG_ROUTE_LOAD[] = "route,load";
|
|
|
|
static const char SIG_ROUTE_LOADED[] = "route,loaded";
|
|
|
|
static const char SIG_ROUTE_LOADED_FAIL[] = "route,loaded,fail";
|
|
|
|
static const char SIG_NAME_LOAD[] = "name,load";
|
|
|
|
static const char SIG_NAME_LOADED[] = "name,loaded";
|
|
|
|
static const char SIG_NAME_LOADED_FAIL[] = "name,loaded,fail";
|
|
|
|
static const char SIG_OVERLAY_CLICKED[] = "overlay,clicked";
|
|
|
|
static const char SIG_OVERLAY_DEL[] = "overlay,del";
|
2013-03-29 04:53:11 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|
|
|
{SIG_CLICKED, ""},
|
|
|
|
{SIG_CLICKED_DOUBLE, ""},
|
|
|
|
{SIG_PRESS, ""},
|
|
|
|
{SIG_LONGPRESSED, ""},
|
|
|
|
{SIG_SCROLL, ""},
|
|
|
|
{SIG_SCROLL_DRAG_START, ""},
|
|
|
|
{SIG_SCROLL_DRAG_STOP, ""},
|
|
|
|
{SIG_SCROLL_ANIM_START, ""},
|
|
|
|
{SIG_SCROLL_ANIM_STOP, ""},
|
|
|
|
{SIG_ZOOM_START, ""},
|
|
|
|
{SIG_ZOOM_STOP, ""},
|
|
|
|
{SIG_ZOOM_CHANGE, ""},
|
|
|
|
{SIG_LOADED, ""},
|
|
|
|
{SIG_TILE_LOAD, ""},
|
|
|
|
{SIG_TILE_LOADED, ""},
|
|
|
|
{SIG_TILE_LOADED_FAIL, ""},
|
|
|
|
{SIG_ROUTE_LOAD, ""},
|
|
|
|
{SIG_ROUTE_LOADED, ""},
|
|
|
|
{SIG_ROUTE_LOADED_FAIL, ""},
|
|
|
|
{SIG_NAME_LOAD, ""},
|
|
|
|
{SIG_NAME_LOADED, ""},
|
|
|
|
{SIG_NAME_LOADED_FAIL, ""},
|
|
|
|
{SIG_OVERLAY_CLICKED, ""},
|
|
|
|
{SIG_OVERLAY_DEL, ""},
|
2014-01-23 02:30:34 -08:00
|
|
|
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
2014-02-07 21:05:06 -08:00
|
|
|
{SIG_WIDGET_ACCESS_CHANGED, ""}, /**< handled by elm_widget */
|
2014-01-23 00:24:19 -08:00
|
|
|
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
|
|
|
|
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
|
2012-07-19 13:26:09 -07:00
|
|
|
{NULL, NULL}
|
2010-04-05 12:21:22 -07:00
|
|
|
};
|
|
|
|
|
2011-04-21 01:55:02 -07:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_edj_overlay_size_get(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord *w,
|
|
|
|
Evas_Coord *h)
|
2012-02-20 19:26:00 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Object *edj;
|
|
|
|
const char *s;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(w);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(h);
|
2011-04-01 04:26:58 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
edj = edje_object_add(evas_object_evas_get(sd->obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_widget_theme_object_set
|
2012-11-25 22:32:53 -08:00
|
|
|
(sd->obj, edj, "map/marker", "radio",
|
|
|
|
elm_widget_style_get(sd->obj));
|
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
|
|
|
|
|
|
|
s = edje_object_data_get(edj, "size_w");
|
|
|
|
if (s) *w = atoi(s);
|
2012-07-19 13:26:09 -07:00
|
|
|
else *w = 0;
|
|
|
|
|
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
|
|
|
s = edje_object_data_get(edj, "size_h");
|
|
|
|
if (s) *h = atoi(s);
|
2012-07-19 13:26:09 -07:00
|
|
|
else *h = 0;
|
|
|
|
|
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
|
|
|
evas_object_del(edj);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_rotate_do(Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord cx,
|
|
|
|
Evas_Coord cy,
|
|
|
|
double degree,
|
|
|
|
Evas_Coord *xx,
|
|
|
|
Evas_Coord *yy)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
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
|
|
|
double r = (degree * M_PI) / 180.0;
|
2012-07-19 13:26:09 -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
|
|
|
if (xx) *xx = ((x - cx) * cos(r)) + ((y - cy) * cos(r + M_PI_2)) + cx;
|
|
|
|
if (yy) *yy = ((x - cx) * sin(r)) + ((y - cy) * sin(r + M_PI_2)) + cy;
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
|
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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_obj_rotate(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Object *obj)
|
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
|
|
|
{
|
|
|
|
Evas_Coord w, h, ow, oh;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
evas_map_util_points_populate_from_object(sd->map, obj);
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
|
|
|
evas_object_image_size_get(obj, &w, &h);
|
|
|
|
if ((w > ow) || (h > oh))
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_map_point_image_uv_set(sd->map, 0, 0, 0);
|
|
|
|
evas_map_point_image_uv_set(sd->map, 1, w, 0);
|
|
|
|
evas_map_point_image_uv_set(sd->map, 2, w, h);
|
|
|
|
evas_map_point_image_uv_set(sd->map, 3, 0, h);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_map_util_rotate(sd->map, sd->rotate.d, sd->rotate.cx, sd->rotate.cy);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_map_set(obj, sd->map);
|
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
|
|
|
evas_object_map_enable_set(obj, EINA_TRUE);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_obj_place(Evas_Object *obj,
|
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord w,
|
|
|
|
Evas_Coord h)
|
2009-11-14 07:30:03 -08:00
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
evas_object_move(obj, x, y);
|
|
|
|
evas_object_resize(obj, w, h);
|
|
|
|
evas_object_show(obj);
|
|
|
|
}
|
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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_coord_to_region_convert(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord size,
|
|
|
|
double *lon,
|
|
|
|
double *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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
int zoom;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
|
|
|
|
zoom = floor(log(size / sd->size.tile) / log(2));
|
|
|
|
if ((sd->src_tile) && (sd->src_tile->coord_to_geo))
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->src_tile->coord_to_geo
|
2012-11-25 22:32:53 -08:00
|
|
|
(sd->obj, zoom, x, y, size, lon, lat))
|
2012-07-19 13:26:09 -07:00
|
|
|
return;
|
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 (lon) *lon = (x / (double)size * 360.0) - 180;
|
|
|
|
if (lat)
|
|
|
|
{
|
|
|
|
double n = ELM_PI - (2.0 * ELM_PI * y / size);
|
2012-07-19 13:26:09 -07:00
|
|
|
*lat = 180.0 / ELM_PI *atan(0.5 * (exp(n) - exp(-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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_region_to_coord_convert(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
Evas_Coord size,
|
|
|
|
Evas_Coord *x,
|
|
|
|
Evas_Coord *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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
int zoom;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
|
|
|
|
zoom = floor(log(size / 256) / log(2));
|
|
|
|
if ((sd->src_tile) && (sd->src_tile->geo_to_coord))
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->src_tile->geo_to_coord
|
2012-11-25 22:32:53 -08:00
|
|
|
(sd->obj, zoom, lon, lat, size, x, y)) return;
|
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 (x) *x = floor((lon + 180.0) / 360.0 * size);
|
|
|
|
if (y)
|
2012-07-19 13:26:09 -07:00
|
|
|
*y = floor((1.0 - log(tan(lat * ELM_PI / 180.0) +
|
|
|
|
(1.0 / cos(lat * ELM_PI / 180.0)))
|
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_PI) / 2.0 * size);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_viewport_coord_get(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord *vx,
|
|
|
|
Evas_Coord *vy,
|
|
|
|
Evas_Coord *vw,
|
|
|
|
Evas_Coord *vh)
|
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
|
|
|
{
|
2014-04-03 08:33:52 -07:00
|
|
|
Evas_Coord x = 0, y = 0, w = 0, h = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_content_pos_get(sd->obj, &x, &y);
|
|
|
|
elm_interface_scrollable_content_viewport_geometry_get
|
|
|
|
(sd->obj, NULL, NULL, &w, &h);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
if (w > sd->size.w) x -= ((w - sd->size.w) / 2);
|
|
|
|
if (h > sd->size.h) y -= ((h - sd->size.h) / 2);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (vx) *vx = x;
|
|
|
|
if (vy) *vy = y;
|
|
|
|
if (vw) *vw = w;
|
|
|
|
if (vh) *vh = h;
|
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
|
|
|
}
|
|
|
|
|
2012-03-20 00:37:59 -07:00
|
|
|
// Map coordinates to canvas geometry without rotate
|
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
|
2014-03-23 07:45:00 -07:00
|
|
|
_coord_to_canvas_no_rotation(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord *xx,
|
|
|
|
Evas_Coord *yy)
|
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
|
|
|
{
|
2016-02-29 20:37:39 -08:00
|
|
|
Evas_Coord vx = 0, vy = 0, sx = 0, sy = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_viewport_coord_get(sd, &vx, &vy, NULL, NULL);
|
|
|
|
evas_object_geometry_get(sd->pan_obj, &sx, &sy, NULL, NULL);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (xx) *xx = x - vx + sx;
|
|
|
|
if (yy) *yy = y - vy + sy;
|
|
|
|
}
|
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
|
|
|
|
2012-03-20 00:37:59 -07:00
|
|
|
// Map coordinates to canvas geometry
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_coord_to_canvas(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord *xx,
|
|
|
|
Evas_Coord *yy)
|
|
|
|
{
|
|
|
|
_coord_to_canvas_no_rotation(sd, x, y, &x, &y);
|
|
|
|
_rotate_do(x, y, sd->rotate.cx, sd->rotate.cy, sd->rotate.d, &x, &y);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (xx) *xx = x;
|
|
|
|
if (yy) *yy = y;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Canvas geometry to map coordinates
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_canvas_to_coord(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Evas_Coord *xx,
|
|
|
|
Evas_Coord *yy)
|
2012-03-20 00:37:59 -07:00
|
|
|
{
|
2016-02-29 20:37:39 -08:00
|
|
|
Evas_Coord vx = 0, vy = 0, sx = 0, sy = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_viewport_coord_get(sd, &vx, &vy, NULL, NULL);
|
|
|
|
evas_object_geometry_get(sd->pan_obj, &sx, &sy, NULL, NULL);
|
|
|
|
_rotate_do(x - sx + vx, y - sy + vy, sd->rotate.cx - sx + vx,
|
|
|
|
sd->rotate.cy - sy + vy, -sd->rotate.d, &x, &y);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (xx) *xx = x;
|
|
|
|
if (yy) *yy = 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
|
|
|
|
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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_grid_item_coord_get(Grid_Item *gi,
|
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
int *w,
|
|
|
|
int *h)
|
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
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(gi);
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (x) *x = gi->x * gi->wsd->size.tile;
|
|
|
|
if (y) *y = gi->y * gi->wsd->size.tile;
|
|
|
|
if (w) *w = gi->wsd->size.tile;
|
|
|
|
if (h) *h = gi->wsd->size.tile;
|
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
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
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
|
|
|
static Eina_Bool
|
2012-03-20 00:37:59 -07:00
|
|
|
_grid_item_in_viewport(Grid_Item *gi)
|
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
|
|
|
{
|
2016-02-29 20:37:39 -08:00
|
|
|
Evas_Coord vx = 0, vy = 0, vw = 0, vh = 0;
|
|
|
|
Evas_Coord x = 0, y = 0, w = 0, h = 0;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(gi, EINA_FALSE);
|
|
|
|
|
|
|
|
_viewport_coord_get(gi->wsd, &vx, &vy, &vw, &vh);
|
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
|
|
|
_grid_item_coord_get(gi, &x, &y, &w, &h);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-20 00:37:59 -07:00
|
|
|
return ELM_RECTS_INTERSECT(x, y, w, h, vx, vy, vw, vh);
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
|
|
|
|
2012-05-24 03:07:56 -07:00
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_loaded_timeout_cb(void *data)
|
2012-05-24 03:07:56 -07:00
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-05-24 03:07:56 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->loaded_timer = NULL;
|
|
|
|
if (!(sd->download_num) && !(sd->download_idler))
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_LOADED, NULL);
|
2012-05-24 03:07:56 -07:00
|
|
|
return ECORE_CALLBACK_CANCEL;
|
|
|
|
}
|
|
|
|
|
2012-02-20 19:26:00 -08:00
|
|
|
static void
|
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
|
|
|
_grid_item_update(Grid_Item *gi)
|
2012-02-20 19:26:00 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Load_Error err;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(gi);
|
|
|
|
|
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
|
|
|
evas_object_image_file_set(gi->img, gi->file, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!gi->wsd->zoom_timer && !gi->wsd->scr_timer)
|
|
|
|
evas_object_image_smooth_scale_set(gi->img, EINA_TRUE);
|
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
|
|
|
else evas_object_image_smooth_scale_set(gi->img, EINA_FALSE);
|
2012-02-20 19:26:00 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
err = evas_object_image_load_error_get(gi->img);
|
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
|
|
|
if (err != EVAS_LOAD_ERROR_NONE)
|
2011-04-25 01:11:46 -07:00
|
|
|
{
|
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
|
|
|
ERR("Image loading error (%s): %s", gi->file, evas_load_error_str(err));
|
|
|
|
ecore_file_remove(gi->file);
|
|
|
|
gi->file_have = EINA_FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
_grid_item_coord_get(gi, &x, &y, &w, &h);
|
2012-07-19 13:26:09 -07:00
|
|
|
_coord_to_canvas_no_rotation(gi->wsd, x, y, &x, &y);
|
2012-03-20 00:37:59 -07:00
|
|
|
_obj_place(gi->img, x, y, w, h);
|
2012-07-19 13:26:09 -07:00
|
|
|
_obj_rotate(gi->wsd, gi->img);
|
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
|
|
|
gi->file_have = EINA_TRUE;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
2012-05-24 03:07:56 -07:00
|
|
|
|
2014-01-21 06:16:41 -08:00
|
|
|
ecore_timer_del(gi->wsd->loaded_timer);
|
2013-04-24 04:41:37 -07:00
|
|
|
gi->wsd->loaded_timer = ecore_timer_add(0.25, _loaded_timeout_cb, gi->wsd->obj);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
|
|
|
|
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
|
|
|
static void
|
|
|
|
_grid_item_load(Grid_Item *gi)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
if (gi->file_have) _grid_item_update(gi);
|
|
|
|
else if (!gi->job)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->wsd->download_list = eina_list_remove(gi->wsd->download_list, gi);
|
|
|
|
gi->wsd->download_list = eina_list_append(gi->wsd->download_list, gi);
|
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
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2012-02-20 19:26:00 -08:00
|
|
|
static void
|
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
|
|
|
_grid_item_unload(Grid_Item *gi)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
if (gi->file_have)
|
|
|
|
{
|
|
|
|
evas_object_hide(gi->img);
|
|
|
|
evas_object_image_file_set(gi->img, NULL, NULL);
|
|
|
|
}
|
|
|
|
else if (gi->job)
|
|
|
|
{
|
|
|
|
ecore_file_download_abort(gi->job);
|
|
|
|
ecore_file_remove(gi->file);
|
|
|
|
gi->job = NULL;
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->wsd->try_num--;
|
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
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
else gi->wsd->download_list = eina_list_remove(gi->wsd->download_list, gi);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static Grid_Item *
|
2012-07-19 13:26:09 -07:00
|
|
|
_grid_item_create(Grid *g,
|
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y)
|
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
|
|
|
{
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
char buf2[PATH_MAX];
|
|
|
|
Grid_Item *gi;
|
2012-07-19 13:26:09 -07:00
|
|
|
char *url;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(g, NULL);
|
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
|
|
|
|
|
|
|
gi = ELM_NEW(Grid_Item);
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->wsd = g->wsd;
|
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
|
|
|
gi->g = g;
|
|
|
|
gi->x = x;
|
|
|
|
gi->y = y;
|
|
|
|
|
|
|
|
gi->file_have = EINA_FALSE;
|
|
|
|
gi->job = NULL;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->img = evas_object_image_add
|
2012-11-25 22:32:53 -08:00
|
|
|
(evas_object_evas_get((g->wsd)->obj));
|
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
|
|
|
evas_object_image_smooth_scale_set(gi->img, EINA_FALSE);
|
|
|
|
evas_object_image_scale_hint_set(gi->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_image_filled_set(gi->img, EINA_TRUE);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(gi->img, g->wsd->pan_obj);
|
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
|
|
|
evas_object_pass_events_set(gi->img, EINA_TRUE);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_stack_below(gi->img, g->wsd->sep_maps_overlays);
|
2011-04-27 22:40:48 -07:00
|
|
|
|
2013-11-12 05:56:05 -08:00
|
|
|
snprintf(buf, sizeof(buf), "%s" CACHE_TILE_ROOT, efreet_cache_home_get(),
|
|
|
|
g->wsd->id, g->zoom, x);
|
2012-07-19 13:26:09 -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
|
|
|
snprintf(buf2, sizeof(buf2), CACHE_TILE_PATH, buf, y);
|
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
|
|
|
if (!ecore_file_exists(buf)) ecore_file_mkpath(buf);
|
|
|
|
|
|
|
|
eina_stringshare_replace(&gi->file, buf2);
|
2012-11-25 22:32:53 -08:00
|
|
|
url = g->wsd->src_tile->url_cb((g->wsd)->obj, x, y, g->zoom);
|
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 ((!url) || (!strlen(url)))
|
2012-02-20 19:26:00 -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
|
|
|
eina_stringshare_replace(&gi->url, NULL);
|
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
|
|
|
ERR("Getting source url failed: %s", gi->file);
|
2012-02-20 19:26:00 -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
|
|
|
else eina_stringshare_replace(&gi->url, url);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-01-21 18:08:47 -08:00
|
|
|
free(url);
|
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
|
|
|
eina_matrixsparse_data_idx_set(g->grid, y, x, gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
return gi;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
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
|
|
|
_grid_item_free(Grid_Item *gi)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
_grid_item_unload(gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
if (gi->g && gi->g->grid)
|
|
|
|
eina_matrixsparse_data_idx_set(gi->g->grid, gi->y, gi->x, NULL);
|
2014-01-21 17:12:44 -08:00
|
|
|
eina_stringshare_del(gi->url);
|
2012-04-25 01:56:25 -07:00
|
|
|
if (gi->file_have) ecore_file_remove(gi->file);
|
2014-01-21 17:12:44 -08:00
|
|
|
eina_stringshare_del(gi->file);
|
|
|
|
evas_object_del(gi->img);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
free(gi);
|
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_downloaded_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
const char *file EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
int status)
|
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
|
|
|
{
|
|
|
|
Grid_Item *gi = data;
|
2012-02-20 23:59:19 -08:00
|
|
|
|
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
|
|
|
if (status == 200)
|
2012-02-20 23:59:19 -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
|
|
|
DBG("Download success from %s to %s", gi->url, gi->file);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
_grid_item_update(gi);
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->wsd->finish_num++;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
((gi->wsd)->obj, ELM_MAP_EVENT_TILE_LOADED, NULL);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
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
|
|
|
WRN("Download failed from %s to %s (%d) ", gi->url, gi->file, status);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
ecore_file_remove(gi->file);
|
|
|
|
gi->file_have = EINA_FALSE;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
((gi->wsd)->obj, ELM_MAP_EVENT_TILE_LOADED_FAIL, NULL);
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(gi->wsd->obj, wd);
|
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
|
|
|
gi->job = NULL;
|
2012-07-19 13:26:09 -07:00
|
|
|
gi->wsd->download_num--;
|
|
|
|
if (!gi->wsd->download_num)
|
2013-10-05 01:14:50 -07:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
2012-07-19 13:26:09 -07:00
|
|
|
"elm,state,busy,stop", "elm");
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_download_job(void *data)
|
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
Evas_Object *obj = data;
|
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
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
|
|
|
Eina_List *l, *ll;
|
|
|
|
Grid_Item *gi;
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ECORE_CALLBACK_CANCEL);
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!eina_list_count(sd->download_list))
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->download_idler = NULL;
|
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
|
|
|
return ECORE_CALLBACK_CANCEL;
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_LIST_REVERSE_FOREACH_SAFE(sd->download_list, l, ll, gi)
|
|
|
|
{
|
|
|
|
Eina_Bool ret;
|
|
|
|
|
|
|
|
if ((gi->g->zoom != sd->zoom) || !(_grid_item_in_viewport(gi)))
|
|
|
|
{
|
|
|
|
sd->download_list = eina_list_remove(sd->download_list, gi);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (sd->download_num >= MAX_CONCURRENT_DOWNLOAD)
|
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
|
|
|
|
ret = ecore_file_download_full
|
|
|
|
(gi->url, gi->file, _downloaded_cb, NULL, gi, &(gi->job), sd->ua);
|
|
|
|
|
|
|
|
if ((!ret) || (!gi->job))
|
|
|
|
ERR("Can't start to download from %s to %s", gi->url, gi->file);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sd->download_list = eina_list_remove(sd->download_list, gi);
|
|
|
|
sd->try_num++;
|
|
|
|
sd->download_num++;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(obj, ELM_MAP_EVENT_TILE_LOAD, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->download_num == 1)
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
2012-07-19 13:26:09 -07:00
|
|
|
"elm,state,busy,start", "elm");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
return ECORE_CALLBACK_RENEW;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_grid_viewport_get(Grid *g,
|
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
int *w,
|
|
|
|
int *h)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
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
|
|
|
int xx, yy, ww, hh;
|
2016-05-15 07:49:33 -07:00
|
|
|
Evas_Coord vx = 0, vy = 0, vw = 0, vh = 0;
|
2011-04-27 22:40:48 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(g);
|
|
|
|
|
|
|
|
_viewport_coord_get(g->wsd, &vx, &vy, &vw, &vh);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (vx < 0) vx = 0;
|
|
|
|
if (vy < 0) vy = 0;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
xx = (vx / g->wsd->size.tile) - 1;
|
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
|
|
|
if (xx < 0) xx = 0;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
yy = (vy / g->wsd->size.tile) - 1;
|
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
|
|
|
if (yy < 0) yy = 0;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ww = (vw / g->wsd->size.tile) + 3;
|
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
|
|
|
if (xx + ww >= g->tw) ww = g->tw - xx;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
hh = (vh / g->wsd->size.tile) + 3;
|
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
|
|
|
if (yy + hh >= g->th) hh = g->th - yy;
|
|
|
|
|
|
|
|
if (x) *x = xx;
|
|
|
|
if (y) *y = yy;
|
|
|
|
if (w) *w = ww;
|
|
|
|
if (h) *h = hh;
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
2011-01-05 19:43:51 -08:00
|
|
|
|
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
|
|
|
static void
|
|
|
|
_grid_unload(Grid *g)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
Eina_Matrixsparse_Cell *cell;
|
2012-07-19 13:26:09 -07:00
|
|
|
Eina_Iterator *it;
|
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
|
|
|
Grid_Item *gi;
|
2012-02-20 19:26:00 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(g);
|
|
|
|
|
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
|
|
|
it = eina_matrixsparse_iterator_new(g->grid);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_ITERATOR_FOREACH(it, cell)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
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
|
|
|
gi = eina_matrixsparse_cell_data_get(cell);
|
|
|
|
_grid_item_unload(gi);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
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
|
|
|
eina_iterator_free(it);
|
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
static void
|
|
|
|
_grid_load(Grid *g)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Eina_Matrixsparse_Cell *cell;
|
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
|
|
|
int x, y, xx, yy, ww, hh;
|
|
|
|
Eina_Iterator *it;
|
|
|
|
Grid_Item *gi;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(g);
|
|
|
|
|
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
|
|
|
it = eina_matrixsparse_iterator_new(g->grid);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_ITERATOR_FOREACH(it, cell)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
gi = eina_matrixsparse_cell_data_get(cell);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (!_grid_item_in_viewport(gi)) _grid_item_unload(gi);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
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
|
|
|
eina_iterator_free(it);
|
|
|
|
|
|
|
|
_grid_viewport_get(g, &xx, &yy, &ww, &hh);
|
|
|
|
for (y = yy; y < yy + hh; y++)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
for (x = xx; x < xx + ww; x++)
|
|
|
|
{
|
|
|
|
gi = eina_matrixsparse_data_idx_get(g->grid, y, x);
|
|
|
|
if (!gi) gi = _grid_item_create(g, x, y);
|
|
|
|
_grid_item_load(gi);
|
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_grid_place(Elm_Map_Data *sd)
|
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
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Grid *g;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->grids, l, g)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->zoom == g->zoom) _grid_load(g);
|
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
|
|
|
else _grid_unload(g);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!sd->download_idler)
|
2013-04-24 04:41:37 -07:00
|
|
|
sd->download_idler = ecore_idler_add(_download_job, sd->obj);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_grid_all_create(Elm_Map_Data *sd)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
int zoom;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
|
|
|
|
|
|
|
|
for (zoom = sd->src_tile->zoom_min; zoom <= sd->src_tile->zoom_max; zoom++)
|
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
|
|
|
{
|
|
|
|
Grid *g;
|
|
|
|
int tnum;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
g = ELM_NEW(Grid);
|
2012-07-19 13:26:09 -07:00
|
|
|
g->wsd = sd;
|
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
|
|
|
g->zoom = zoom;
|
2012-07-19 13:26:09 -07:00
|
|
|
tnum = pow(2.0, g->zoom);
|
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
|
|
|
g->tw = tnum;
|
|
|
|
g->th = tnum;
|
|
|
|
g->grid = eina_matrixsparse_new(g->th, g->tw, NULL, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->grids = eina_list_append(sd->grids, g);
|
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
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_grid_all_clear(Elm_Map_Data *sd)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
Grid *g;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(sd->grids, g)
|
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
|
|
|
{
|
|
|
|
Eina_Matrixsparse_Cell *cell;
|
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
|
|
|
Eina_Iterator *it = eina_matrixsparse_iterator_new(g->grid);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_ITERATOR_FOREACH(it, cell)
|
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] 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
|
|
|
Grid_Item *gi;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
gi = eina_matrixsparse_cell_data_get(cell);
|
|
|
|
if (gi) _grid_item_free(gi);
|
|
|
|
}
|
|
|
|
eina_iterator_free(it);
|
|
|
|
|
|
|
|
eina_matrixsparse_free(g->grid);
|
|
|
|
free(g);
|
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2011-01-05 19:43:51 -08:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_track_place(Elm_Map_Data *sd)
|
2011-01-05 19:43:51 -08:00
|
|
|
{
|
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
|
|
|
#ifdef ELM_EMAP
|
|
|
|
Eina_List *l;
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord size;
|
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
|
|
|
Evas_Object *route;
|
|
|
|
Evas_Coord px, py, ow, oh;
|
2012-07-19 13:26:09 -07:00
|
|
|
int xmin, xmax, ymin, ymax;
|
2011-01-05 19:43:51 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
px = sd->pan_x;
|
|
|
|
py = sd->pan_y;
|
|
|
|
_viewport_coord_get(sd, NULL, NULL, &ow, &oh);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
size = sd->size.w;
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->track, l, route)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
2012-02-23 21:48:27 -08:00
|
|
|
double lon_min, lon_max;
|
|
|
|
double lat_min, lat_max;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-02-23 21:48:27 -08:00
|
|
|
elm_route_longitude_min_max_get(route, &lon_min, &lon_max);
|
|
|
|
elm_route_latitude_min_max_get(route, &lat_min, &lat_max);
|
2012-07-19 13:26:09 -07:00
|
|
|
_region_to_coord_convert(sd, lon_min, lat_max, size, &xmin, &ymin);
|
|
|
|
_region_to_coord_convert(sd, lon_max, lat_min, size, &xmax, &ymax);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if ( !(xmin < px && xmax < px) && !(xmin > px + ow && xmax > px + ow))
|
|
|
|
{
|
|
|
|
if ((ymin < py && ymax < py) ||
|
|
|
|
(ymin > py + oh && ymax > py + oh))
|
|
|
|
{
|
|
|
|
//display the route
|
|
|
|
evas_object_move(route, xmin - px, ymin - py);
|
|
|
|
evas_object_resize(route, xmax - xmin, ymax - ymin);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_raise(route);
|
|
|
|
_obj_rotate(sd, route);
|
|
|
|
evas_object_show(route);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
//the route is not display
|
|
|
|
evas_object_hide(route);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
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
|
|
|
#else
|
2012-07-19 13:26:09 -07:00
|
|
|
(void)sd;
|
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
|
|
|
#endif
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
2011-04-27 19:47:12 -07:00
|
|
|
|
2011-04-01 04:26:58 -07:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_calc_job(Elm_Map_Data *sd)
|
2011-01-05 19:43:51 -08:00
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
if (sd->calc_job.zoom_mode_set)
|
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
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
sd->calc_job.zoom_mode_set(sd, sd->calc_job.zoom);
|
|
|
|
sd->calc_job.zoom_mode_set = NULL;
|
|
|
|
}
|
2014-05-13 20:27:27 -07:00
|
|
|
if (!sd->zoom_animator)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
2014-05-13 20:27:27 -07:00
|
|
|
if (sd->calc_job.region_show_bring_in)
|
|
|
|
{
|
|
|
|
sd->calc_job.region_show_bring_in
|
|
|
|
(sd, sd->calc_job.lon, sd->calc_job.lat, sd->calc_job.bring_in);
|
|
|
|
sd->calc_job.region_show_bring_in = NULL;
|
|
|
|
}
|
|
|
|
if (sd->calc_job.overlays_show)
|
|
|
|
{
|
|
|
|
sd->calc_job.overlays_show(sd, sd->calc_job.overlays);
|
|
|
|
sd->calc_job.overlays_show = NULL;
|
|
|
|
}
|
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-01-05 19:43:51 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_smooth_update(Elm_Map_Data *sd)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2011-01-05 19:43:51 -08:00
|
|
|
Eina_List *l;
|
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
|
|
|
Grid *g;
|
2009-12-20 08:34:45 -08:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->grids, l, g)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
Eina_Iterator *it = eina_matrixsparse_iterator_new(g->grid);
|
|
|
|
Eina_Matrixsparse_Cell *cell;
|
2011-04-07 23:14:10 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_ITERATOR_FOREACH(it, cell)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
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
|
|
|
Grid_Item *gi = eina_matrixsparse_cell_data_get(cell);
|
2012-03-20 00:37:59 -07:00
|
|
|
if (_grid_item_in_viewport(gi))
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_image_smooth_scale_set(gi->img, EINA_TRUE);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
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
|
|
|
eina_iterator_free(it);
|
|
|
|
}
|
|
|
|
}
|
2011-04-07 23:14:10 -07:00
|
|
|
|
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
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_timeout_cb(void *data)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_smooth_update(sd);
|
|
|
|
sd->zoom_timer = NULL;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 02:02:03 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_ZOOM_STOP, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
return ECORE_CALLBACK_CANCEL;
|
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] 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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_zoom_do(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
double zoom)
|
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
|
|
|
{
|
2012-03-20 00:37:59 -07:00
|
|
|
Evas_Coord vx, vy, vw, vh;
|
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
|
|
|
Evas_Coord ow, oh;
|
2011-04-17 23:42:47 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (zoom > sd->src_tile->zoom_max) zoom = sd->src_tile->zoom_max;
|
|
|
|
else if (zoom < sd->src_tile->zoom_min)
|
|
|
|
zoom = sd->src_tile->zoom_min;
|
|
|
|
if (zoom > sd->zoom_max) zoom = sd->zoom_max;
|
|
|
|
else if (zoom < sd->zoom_min)
|
|
|
|
zoom = sd->zoom_min;
|
|
|
|
|
|
|
|
sd->zoom = ROUND(zoom);
|
|
|
|
sd->zoom_detail = zoom;
|
|
|
|
ow = sd->size.w;
|
|
|
|
oh = sd->size.h;
|
|
|
|
sd->size.tile = pow(2.0, (zoom - sd->zoom)) * sd->tsize;
|
|
|
|
sd->size.w = pow(2.0, sd->zoom) * sd->size.tile;
|
|
|
|
sd->size.h = sd->size.w;
|
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
|
|
|
|
2012-03-20 00:37:59 -07:00
|
|
|
// Fix to zooming with (viewport center vx, vy) as the center to prevent
|
2014-01-21 20:20:15 -08:00
|
|
|
// from zooming with (0,0) as the center. (scroller default behavior)
|
2012-07-19 13:26:09 -07:00
|
|
|
_viewport_coord_get(sd, &vx, &vy, &vw, &vh);
|
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
|
|
|
if ((vw > 0) && (vh > 0) && (ow > 0) && (oh > 0))
|
|
|
|
{
|
2012-03-20 00:37:59 -07:00
|
|
|
Evas_Coord x, y;
|
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
|
|
|
double sx, sy;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
if (vw > ow) sx = 0.5;
|
2012-07-19 13:26:09 -07:00
|
|
|
else sx = (double)(vx + (double)(vw / 2)) / ow;
|
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
|
|
|
if (vh > oh) sy = 0.5;
|
2012-07-19 13:26:09 -07:00
|
|
|
else sy = (double)(vy + (double)(vh / 2)) / oh;
|
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
|
|
|
|
|
|
|
if (sx > 1.0) sx = 1.0;
|
|
|
|
if (sy > 1.0) sy = 1.0;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
x = ceil((sx * sd->size.w) - (vw / 2));
|
|
|
|
y = ceil((sy * sd->size.h) - (vh / 2));
|
2012-03-20 00:37:59 -07:00
|
|
|
if (x < 0) x = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (x > (sd->size.w - vw))
|
|
|
|
x = sd->size.w - vw;
|
2012-03-20 00:37:59 -07:00
|
|
|
if (y < 0) y = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (y > (sd->size.h - vh))
|
|
|
|
y = sd->size.h - vh;
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_content_region_show
|
|
|
|
(sd->obj, x, y, vw, vh);
|
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
|
|
|
}
|
|
|
|
|
2015-09-02 03:34:06 -07:00
|
|
|
if (sd->zoom_timer)
|
|
|
|
{
|
|
|
|
ecore_timer_del(sd->zoom_timer);
|
|
|
|
sd->zoom_timer = NULL;
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
else
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 02:02:03 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_ZOOM_START, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2015-09-02 03:34:06 -07:00
|
|
|
if (sd->obj)
|
|
|
|
sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_ZOOM_CHANGE, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->pan_obj, ELM_PAN_EVENT_CHANGED, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_zoom_anim_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
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
|
|
|
|
2014-05-28 01:08:00 -07:00
|
|
|
if (sd->ani.zoom_cnt <= 0)
|
2011-04-17 23:42:47 -07:00
|
|
|
{
|
2016-01-27 16:46:16 -08:00
|
|
|
_zoom_animator_set(sd, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-05-13 20:27:27 -07:00
|
|
|
_calc_job(sd);
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
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
|
|
|
else
|
2011-05-19 22:55:15 -07:00
|
|
|
{
|
2014-05-28 01:08:00 -07:00
|
|
|
sd->ani.zoom += sd->ani.zoom_diff;
|
|
|
|
sd->ani.zoom_cnt--;
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_do(sd, sd->ani.zoom);
|
2011-05-19 22:55:15 -07:00
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_zoom_bring_anim_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
2014-05-28 01:08:00 -07:00
|
|
|
{
|
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
|
|
|
|
|
|
|
if ((sd->ani.zoom_cnt <= 0) && (sd->ani.region_cnt <= 0))
|
|
|
|
{
|
2016-01-27 16:46:16 -08:00
|
|
|
_zoom_animator_set(sd, NULL);
|
2014-05-28 01:08:00 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
|
|
|
_calc_job(sd);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
|
|
|
if (sd->ani.zoom_cnt > 0)
|
|
|
|
{
|
|
|
|
sd->ani.zoom += sd->ani.zoom_diff;
|
|
|
|
_zoom_do(sd, sd->ani.zoom);
|
|
|
|
sd->ani.zoom_cnt--;
|
|
|
|
}
|
|
|
|
if (sd->ani.region_cnt > 0)
|
|
|
|
{
|
|
|
|
sd->ani.lon += sd->ani.lon_diff;
|
|
|
|
sd->ani.lat += sd->ani.lat_diff;
|
|
|
|
|
|
|
|
_region_to_coord_convert
|
|
|
|
(sd, sd->ani.lon, sd->ani.lat, sd->size.w, &x, &y);
|
|
|
|
_viewport_coord_get(sd, NULL, NULL, &w, &h);
|
|
|
|
x = x - (w / 2);
|
|
|
|
y = y - (h / 2);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_content_region_show(sd->obj, x, y, w, h);
|
2014-05-28 01:08:00 -07:00
|
|
|
sd->ani.region_cnt--;
|
|
|
|
}
|
|
|
|
}
|
2016-01-27 16:46:16 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_zoom_animator_set(Elm_Map_Data *sd,
|
|
|
|
void *callback)
|
|
|
|
{
|
|
|
|
Eina_Bool r = EINA_FALSE;
|
|
|
|
|
|
|
|
sd->zoom_animator = !!callback;
|
2016-08-10 07:23:04 -07:00
|
|
|
r = efl_event_callback_del(sd->obj, EFL_EVENT_ANIMATOR_TICK, _zoom_anim_cb, sd->obj);
|
|
|
|
r |= efl_event_callback_del(sd->obj, EFL_EVENT_ANIMATOR_TICK, _zoom_bring_anim_cb, sd->obj);
|
|
|
|
if (callback) efl_event_callback_add(sd->obj, EFL_EVENT_ANIMATOR_TICK, callback, sd->obj);
|
2016-01-27 16:46:16 -08:00
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_zoom_with_animation(Elm_Map_Data *sd,
|
|
|
|
double zoom,
|
|
|
|
int cnt)
|
|
|
|
{
|
|
|
|
if (cnt == 0) return;
|
|
|
|
|
|
|
|
sd->ani.zoom_cnt = cnt;
|
|
|
|
sd->ani.zoom = sd->zoom;
|
|
|
|
sd->ani.zoom_diff = (double)(zoom - sd->zoom) / cnt;
|
|
|
|
_zoom_animator_set(sd, _zoom_anim_cb);
|
2014-05-28 01:08:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_zoom_bring_with_animation(Elm_Map_Data *sd,
|
|
|
|
double zoom,
|
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
int zoom_cnt,
|
|
|
|
int region_cnt)
|
|
|
|
{
|
|
|
|
double tlon, tlat;
|
|
|
|
Evas_Coord vx, vy, vw, vh;
|
2014-06-17 02:01:22 -07:00
|
|
|
if ((zoom_cnt == 0) || (region_cnt == 0)) return;
|
2014-05-28 01:08:00 -07:00
|
|
|
|
|
|
|
sd->ani.zoom_cnt = zoom_cnt;
|
|
|
|
sd->ani.zoom = sd->zoom;
|
|
|
|
sd->ani.zoom_diff = (double)(zoom - sd->zoom) / zoom_cnt;
|
|
|
|
|
|
|
|
sd->ani.region_cnt = region_cnt;
|
|
|
|
_viewport_coord_get(sd, &vx, &vy, &vw, &vh);
|
|
|
|
_coord_to_region_convert
|
|
|
|
(sd, vx + vw / 2, vy + vh / 2, sd->size.w, &tlon, &tlat);
|
|
|
|
sd->ani.lon = tlon;
|
|
|
|
sd->ani.lat = tlat;
|
|
|
|
sd->ani.lon_diff = (lon - tlon) / region_cnt;
|
|
|
|
sd->ani.lat_diff = (lat - tlat) / region_cnt;
|
|
|
|
|
2016-01-27 16:46:16 -08:00
|
|
|
_zoom_animator_set(sd, _zoom_bring_anim_cb);
|
2014-05-28 01:08:00 -07:00
|
|
|
}
|
|
|
|
|
2012-02-20 19:26:00 -08:00
|
|
|
static void
|
2013-04-24 04:41:37 -07:00
|
|
|
_sizing_eval(Evas_Object *obj)
|
2012-02-20 19:26:00 -08:00
|
|
|
{
|
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
|
|
|
Evas_Coord maxw = -1, maxh = -1;
|
2009-11-13 14:22:05 -08:00
|
|
|
|
2013-04-24 04:41:37 -07:00
|
|
|
evas_object_size_hint_max_get(obj, &maxw, &maxh);
|
|
|
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_changed_size_hints_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *e EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
|
|
|
void *event_info EINA_UNUSED)
|
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
|
|
|
{
|
|
|
|
_sizing_eval(data);
|
|
|
|
}
|
2011-04-27 22:40:48 -07:00
|
|
|
|
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
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_scr_timeout_cb(void *data)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_smooth_update(sd);
|
|
|
|
sd->scr_timer = NULL;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:51:20 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_SCROLL_DRAG_STOP, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
return ECORE_CALLBACK_CANCEL;
|
2010-09-29 05:22:30 -07:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_scroll_cb(Evas_Object *obj,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *data EINA_UNUSED)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
2011-04-27 22:40:48 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->scr_timer) ecore_timer_del(sd->scr_timer);
|
|
|
|
else
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:51:20 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_SCROLL_DRAG_START, NULL);
|
elm_map: block longpressed event when scrolled, zoomed, or rotated
Summary:
Currently, longpressed event can be called when map is
scrolled, zoomed or rotated. This might cause unintentional
result, because mouse need to be down at lease once to
execute scroll, zoom, or rotate, and longpressed event will start
when those events takes long enough time.
Reviewers: seoz, Hermet, woohyun, cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3195
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:42:35 -07:00
|
|
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
2013-04-24 04:41:37 -07:00
|
|
|
sd->scr_timer = ecore_timer_add(0.25, _scr_timeout_cb, obj);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:51:20 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_SCROLL, NULL);
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
|
|
|
|
2012-02-20 23:59:19 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_scroll_animate_start_cb(Evas_Object *obj,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *data EINA_UNUSED)
|
2012-02-20 19:26:00 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:51:20 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_SCROLL_ANIM_START, NULL);
|
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
|
|
|
}
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_scroll_animate_stop_cb(Evas_Object *obj,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *data EINA_UNUSED)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:51:20 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_SCROLL_ANIM_STOP, NULL);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_long_press_cb(void *data)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
sd->long_timer = NULL;
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:29:40 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_LONGPRESSED, &sd->ev);
|
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
|
|
|
|
|
|
|
return ECORE_CALLBACK_CANCEL;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_mouse_down_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *evas EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
void *event_info)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
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
|
|
|
Evas_Event_Mouse_Down *ev = event_info;
|
2012-02-20 19:26:00 -08:00
|
|
|
|
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
|
|
|
if (ev->button != 1) return;
|
2012-07-19 13:26:09 -07:00
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) sd->on_hold = EINA_TRUE;
|
|
|
|
else sd->on_hold = EINA_FALSE;
|
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
|
|
|
|
|
|
|
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:29:40 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_CLICKED_DOUBLE, ev);
|
2012-07-19 13:26:09 -07:00
|
|
|
else
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_PRESS, ev);
|
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
|
|
|
|
2014-01-21 06:16:41 -08:00
|
|
|
ecore_timer_del(sd->long_timer);
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->ev = *ev;
|
|
|
|
sd->long_timer =
|
2013-04-24 04:41:37 -07:00
|
|
|
ecore_timer_add(_elm_config->longpress_timeout, _long_press_cb, data);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_mouse_up_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *evas EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
void *event_info)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
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
|
|
|
Evas_Event_Mouse_Up *ev = event_info;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ev);
|
|
|
|
|
|
|
|
if (ev->button != 1) return;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) sd->on_hold = EINA_TRUE;
|
|
|
|
else sd->on_hold = EINA_FALSE;
|
|
|
|
|
2013-05-29 05:03:51 -07:00
|
|
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
if (!sd->on_hold)
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-06-10 01:29:40 -07:00
|
|
|
(sd->obj, EFL_UI_EVENT_CLICKED, ev);
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->on_hold = EINA_FALSE;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_mouse_wheel_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *e EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
void *event_info)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!sd->paused)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
Evas_Event_Mouse_Wheel *ev = event_info;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_zoom_do(sd, sd->zoom_detail - ((double)ev->z / 10));
|
|
|
|
}
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_region_max_min_get(Eina_List *overlays,
|
|
|
|
double *max_longitude,
|
|
|
|
double *min_longitude,
|
|
|
|
double *max_latitude,
|
|
|
|
double *min_latitude)
|
2009-11-13 07:22:23 -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
|
|
|
double max_lon = -180, min_lon = 180;
|
|
|
|
double max_lat = -90, min_lat = 90;
|
|
|
|
Elm_Map_Overlay *overlay;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(overlays, 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
|
|
|
{
|
|
|
|
double lon, lat;
|
2012-07-19 13:26:09 -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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
|
|
|
{
|
|
|
|
Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
lon = ovl->lon;
|
|
|
|
lat = ovl->lat;
|
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
|
|
|
{
|
|
|
|
// FIXME: class center coord is alright??
|
|
|
|
Overlay_Class *ovl = overlay->ovl;
|
|
|
|
double max_lo, min_lo, max_la, min_la;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_region_max_min_get
|
|
|
|
(ovl->members, &max_lo, &min_lo, &max_la, &min_la);
|
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
|
|
|
lon = (max_lo + min_lo) / 2;
|
|
|
|
lat = (max_la + min_la) / 2;
|
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
|
|
|
{
|
|
|
|
Overlay_Bubble *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
lon = ovl->lon;
|
|
|
|
lat = ovl->lat;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WRN("Not supported overlay type: %d", overlay->type);
|
|
|
|
continue;
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
if (lon > max_lon) max_lon = lon;
|
|
|
|
if (lon < min_lon) min_lon = lon;
|
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 (lat > max_lat) max_lat = lat;
|
|
|
|
if (lat < min_lat) min_lat = lat;
|
|
|
|
}
|
2012-07-19 13:26:09 -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 (max_longitude) *max_longitude = max_lon;
|
|
|
|
if (min_longitude) *min_longitude = min_lon;
|
|
|
|
if (max_latitude) *max_latitude = max_lat;
|
|
|
|
if (min_latitude) *min_latitude = min_lat;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2012-10-12 07:51:45 -07:00
|
|
|
_icon_dup(Evas_Object *icon,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Object *parent)
|
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-07 00:08:48 -08:00
|
|
|
Evas_Object *dupp;
|
2012-10-12 07:51:45 -07:00
|
|
|
Evas_Coord w, h;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!icon || !parent) return NULL;
|
2012-10-12 07:51:45 -07:00
|
|
|
dupp = evas_object_image_filled_add(evas_object_evas_get(parent));
|
|
|
|
evas_object_image_source_set(dupp, icon);
|
2014-01-21 20:20:15 -08:00
|
|
|
// Set size as origin' size for proxy
|
2012-10-12 07:51:45 -07:00
|
|
|
evas_object_geometry_get(icon, NULL, NULL, &w, &h);
|
|
|
|
if (w <= 0 || h <= 0)
|
|
|
|
{
|
2016-06-09 00:29:40 -07:00
|
|
|
efl_gfx_size_hint_combined_min_get(icon, &w, &h);
|
2012-10-12 07:51:45 -07:00
|
|
|
evas_object_size_hint_min_set(dupp, w, h);
|
|
|
|
}
|
|
|
|
else evas_object_resize(dupp, w, h);
|
|
|
|
// Original should have size for proxy
|
|
|
|
evas_object_resize(icon, w, h);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-07 00:08:48 -08:00
|
|
|
return dupp;
|
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-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_clicked_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
Evas *e EINA_UNUSED,
|
|
|
|
Evas_Object *obj EINA_UNUSED,
|
|
|
|
void *ev EINA_UNUSED)
|
2009-11-13 07:22:23 -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
|
|
|
Elm_Map_Overlay *overlay = data;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(data);
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
((overlay->wsd)->obj, ELM_MAP_EVENT_OVERLAY_CLICKED, overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->cb)
|
2012-11-25 22:32:53 -08:00
|
|
|
overlay->cb(overlay->cb_data, (overlay->wsd)->obj, overlay);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
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_default_hide(Overlay_Default *ovl)
|
2009-11-13 07:22:23 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->content) evas_object_hide(ovl->content);
|
|
|
|
if (ovl->icon) evas_object_hide(ovl->icon);
|
|
|
|
if (ovl->clas_content) evas_object_hide(ovl->clas_content);
|
|
|
|
if (ovl->clas_icon) evas_object_hide(ovl->clas_icon);
|
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 (ovl->layout) evas_object_hide(ovl->layout);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_default_show(Overlay_Default *ovl)
|
2009-11-13 07:22:23 -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
|
|
|
Evas_Object *disp;
|
|
|
|
Evas_Coord x, y, w, h;
|
2009-11-13 07:22:23 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_hide(ovl->layout);
|
|
|
|
if (ovl->content)
|
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-21 22:23:19 -07:00
|
|
|
disp = ovl->content;
|
|
|
|
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
|
2016-06-09 00:29:40 -07:00
|
|
|
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
|
2013-10-13 22:40:35 -07:00
|
|
|
ovl->w = w;
|
|
|
|
ovl->h = h;
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
else if (!(ovl->icon) && ovl->clas_content)
|
|
|
|
{
|
|
|
|
disp = ovl->clas_content;
|
|
|
|
|
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_geometry_get(disp, NULL, NULL, &w, &h);
|
2016-06-09 00:29:40 -07:00
|
|
|
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
|
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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->icon) evas_object_show(ovl->icon);
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (ovl->clas_icon)
|
|
|
|
evas_object_show(ovl->clas_icon);
|
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
|
|
|
disp = ovl->layout;
|
|
|
|
w = ovl->w;
|
|
|
|
h = ovl->h;
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
_coord_to_canvas(ovl->wsd, ovl->x, ovl->y, &x, &y);
|
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
|
|
|
_obj_place(disp, x - (w / 2), y - (h / 2), w, h);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_coord_get(Overlay_Default *ovl,
|
|
|
|
Evas_Coord *x,
|
|
|
|
Evas_Coord *y,
|
|
|
|
Evas_Coord *w,
|
|
|
|
Evas_Coord *h)
|
2009-11-13 07:22:23 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (x) *x = ovl->x;
|
|
|
|
if (y) *y = ovl->y;
|
|
|
|
if (w) *w = ovl->w;
|
|
|
|
if (h) *h = ovl->h;
|
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_coord_set(Overlay_Default *ovl,
|
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->x = x;
|
|
|
|
ovl->y = y;
|
|
|
|
}
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
|
|
|
_overlay_default_coord_update(Overlay_Default *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_region_to_coord_convert
|
|
|
|
(ovl->wsd, ovl->lon, ovl->lat, ovl->wsd->size.w, &ovl->x, &ovl->y);
|
2012-03-21 22:23:19 -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
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_layout_text_update(Overlay_Default *ovl,
|
|
|
|
const char *text)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
if (!ovl->content && !ovl->icon && !ovl->clas_content && !ovl->clas_icon)
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_layout_text_set(ovl->layout, "elm.text", text);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_content_update(Overlay_Default *ovl,
|
|
|
|
Evas_Object *content,
|
|
|
|
Elm_Map_Overlay *overlay)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->content == content) return;
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->content);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->content = content;
|
|
|
|
|
|
|
|
if (ovl->content)
|
|
|
|
evas_object_event_callback_add(ovl->content, EVAS_CALLBACK_MOUSE_DOWN,
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_clicked_cb, overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_default_layout_update(Overlay_Default *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->icon)
|
|
|
|
{
|
|
|
|
evas_object_color_set(ovl->layout, 255, 255, 255, 255);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set
|
|
|
|
(ovl->layout, "map/marker", "empty",
|
|
|
|
elm_widget_style_get((ovl->wsd)->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2013-03-01 18:04:31 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_object_part_content_set(ovl->layout, "elm.icon", ovl->icon);
|
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-21 22:23:19 -07:00
|
|
|
else if (!ovl->icon && ovl->clas_icon)
|
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-21 22:23:19 -07:00
|
|
|
evas_object_color_set(ovl->layout, 255, 255, 255, 255);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set
|
|
|
|
(ovl->layout, "map/marker", "empty",
|
|
|
|
elm_widget_style_get((ovl->wsd)->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2013-03-01 18:04:31 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
elm_object_part_content_set(ovl->layout, "elm.icon", ovl->clas_icon);
|
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-21 22:23:19 -07:00
|
|
|
else
|
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-07-19 13:26:09 -07:00
|
|
|
evas_object_color_set
|
|
|
|
(ovl->layout, ovl->c.r, ovl->c.g, ovl->c.b, ovl->c.a);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set
|
|
|
|
(ovl->layout, "map/marker", "radio",
|
|
|
|
elm_widget_style_get((ovl->wsd)->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
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
|
|
|
}
|
|
|
|
|
2012-10-12 07:51:45 -07:00
|
|
|
static void
|
|
|
|
_overlay_default_class_content_update(Overlay_Default *ovl,
|
|
|
|
Evas_Object *content)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->clas_content);
|
2012-10-12 07:51:45 -07:00
|
|
|
ovl->clas_content = _icon_dup(content, ovl->layout);
|
|
|
|
_overlay_default_layout_update(ovl);
|
|
|
|
}
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_icon_update(Overlay_Default *ovl,
|
|
|
|
Evas_Object *icon)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->icon == icon) return;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->icon);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->icon = icon;
|
|
|
|
_overlay_default_layout_update(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_icon_update(Overlay_Default *ovl,
|
2012-10-12 07:51:45 -07:00
|
|
|
Evas_Object *icon)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->clas_icon);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->clas_icon = _icon_dup(icon, ovl->layout);
|
|
|
|
_overlay_default_layout_update(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_color_update(Overlay_Default *ovl,
|
|
|
|
Color c)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->c = c;
|
|
|
|
_overlay_default_layout_update(ovl);
|
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
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_default_free(Overlay_Default *ovl)
|
2009-11-13 07:22:23 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->content);
|
|
|
|
evas_object_del(ovl->icon);
|
|
|
|
evas_object_del(ovl->clas_content);
|
|
|
|
evas_object_del(ovl->clas_icon);
|
|
|
|
evas_object_del(ovl->layout);
|
2012-07-19 13:26:09 -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
|
|
|
free(ovl);
|
2009-11-13 07:22:23 -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
|
|
|
static Overlay_Default *
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_new(Elm_Map_Overlay *overlay,
|
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
Color c,
|
|
|
|
double scale)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Default *ovl;
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, 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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Default);
|
|
|
|
ovl->wsd = overlay->wsd;
|
|
|
|
_edj_overlay_size_get(ovl->wsd, &(ovl->w), &(ovl->h));
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->w *= scale;
|
|
|
|
ovl->h *= scale;
|
2012-11-25 22:32:53 -08:00
|
|
|
ovl->layout = elm_layout_add((ovl->wsd)->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->layout, ovl->wsd->pan_obj);
|
|
|
|
evas_object_stack_above(ovl->layout, ovl->wsd->sep_maps_overlays);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set(ovl->layout, "map/marker", "radio",
|
|
|
|
elm_widget_style_get((ovl->wsd)->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2013-03-01 18:04:31 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_event_callback_add(ovl->layout, EVAS_CALLBACK_MOUSE_DOWN,
|
|
|
|
_overlay_clicked_cb, 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
|
|
|
ovl->lon = lon;
|
|
|
|
ovl->lat = lat;
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_default_color_update(ovl, c);
|
2012-07-19 13:26:09 -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
|
|
|
return ovl;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_group_hide(Overlay_Group *grp)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (grp->ovl) _overlay_default_hide(grp->ovl);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_group_show(Overlay_Group *grp)
|
2009-11-13 07:22:23 -08:00
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (grp->ovl) _overlay_default_show(grp->ovl);
|
2012-02-20 23:59:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_coord_member_update(Overlay_Group *grp,
|
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Eina_List *members)
|
2012-02-20 23:59:19 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
char text[32];
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (!grp->ovl) return;
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_default_coord_set(grp->ovl, x, y);
|
2012-07-19 13:26:09 -07:00
|
|
|
_coord_to_region_convert
|
|
|
|
(grp->wsd, x, y, grp->wsd->size.w, &grp->lon, &grp->lat);
|
2012-05-23 03:29:03 -07:00
|
|
|
|
2014-01-21 17:47:33 -08:00
|
|
|
eina_list_free(grp->members);
|
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
|
|
|
grp->members = members;
|
2012-03-21 22:23:19 -07:00
|
|
|
snprintf(text, sizeof(text), "%d", eina_list_count(members));
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_default_layout_text_update(grp->ovl, text);
|
|
|
|
}
|
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-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_icon_update(Overlay_Group *grp,
|
2012-10-12 07:51:45 -07:00
|
|
|
Evas_Object *icon)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
if (grp->ovl)
|
|
|
|
_overlay_default_icon_update
|
2012-11-25 22:32:53 -08:00
|
|
|
(grp->ovl, _icon_dup(icon, (grp->wsd)->obj));
|
2012-03-21 22:23:19 -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
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_group_content_update(Overlay_Group *grp,
|
|
|
|
Evas_Object *content,
|
|
|
|
Elm_Map_Overlay *overlay)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_default_content_update
|
2012-11-25 22:32:53 -08:00
|
|
|
(grp->ovl, _icon_dup(content, grp->wsd->obj), overlay);
|
2012-10-12 07:51:45 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
return;
|
|
|
|
}
|
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-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_color_update(Overlay_Group *grp,
|
|
|
|
Color c)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_default_color_update(grp->ovl, c);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_cb_set(Overlay_Group *grp,
|
|
|
|
Elm_Map_Overlay_Get_Cb cb,
|
|
|
|
void *data)
|
2009-11-13 07:22:23 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
grp->overlay->cb = cb;
|
|
|
|
grp->overlay->data = data;
|
|
|
|
}
|
2009-12-20 08:34:45 -08:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
|
|
|
_overlay_group_free(Overlay_Group *grp)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(grp);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-01-21 17:47:33 -08:00
|
|
|
free(grp->overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
if (grp->ovl) _overlay_default_free(grp->ovl);
|
2014-01-21 17:47:33 -08:00
|
|
|
eina_list_free(grp->members);
|
2012-07-19 13:26:09 -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
|
|
|
free(grp);
|
|
|
|
}
|
2012-02-20 23:59:19 -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
|
|
|
static Overlay_Group *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_group_new(Elm_Map_Data *sd)
|
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-07-19 13:26:09 -07:00
|
|
|
Overlay_Group *grp;
|
|
|
|
Color c = {0x90, 0xee, 0x90, 0xff};
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
grp = ELM_NEW(Overlay_Group);
|
|
|
|
grp->wsd = sd;
|
2012-03-21 22:23:19 -07:00
|
|
|
grp->overlay = ELM_NEW(Elm_Map_Overlay); // this is a virtual overlay
|
2012-07-19 13:26:09 -07:00
|
|
|
grp->overlay->wsd = sd;
|
2012-03-21 22:23:19 -07:00
|
|
|
grp->overlay->type = ELM_MAP_OVERLAY_TYPE_GROUP;
|
|
|
|
grp->overlay->ovl = grp;
|
|
|
|
grp->ovl = _overlay_default_new(grp->overlay, -1, -1, c, 2);
|
2012-07-19 13:26:09 -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
|
|
|
return grp;
|
|
|
|
}
|
2011-04-01 04:26:58 -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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_cb_set(Overlay_Class *ovl,
|
|
|
|
Elm_Map_Overlay_Get_Cb cb,
|
|
|
|
void *data)
|
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-21 22:23:19 -07:00
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
// Update class members' callbacks
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(ovl->members, l, overlay)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_cb_set(overlay->grp, cb, data);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_icon_update(Overlay_Class *ovl,
|
|
|
|
Evas_Object *icon)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *overlay;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->icon == icon) return;
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->icon);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->icon = icon;
|
2012-10-12 07:51:45 -07:00
|
|
|
// For using proxy, it should have size and be shown but moved away to hide.
|
|
|
|
evas_object_resize(icon, 32, 32);
|
|
|
|
evas_object_move(icon, -9999, -9999);
|
|
|
|
evas_object_show(icon);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
// Update class members' class icons
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(ovl->members, l, overlay)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_icon_update(overlay->grp, icon);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_icon_update(overlay->ovl, icon);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_content_update(Overlay_Class *ovl,
|
|
|
|
Evas_Object *content)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *overlay;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (ovl->content == content) return;
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(ovl->content);
|
2012-03-21 22:23:19 -07:00
|
|
|
ovl->content = content;
|
2012-10-12 07:51:45 -07:00
|
|
|
// For using proxy, it should have size and be shown but moved away to hide.
|
|
|
|
// content should have it's own size
|
|
|
|
evas_object_move(content, -9999, -9999);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
// Update class members' class contents
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(ovl->members, l, overlay)
|
2009-12-21 09:01:19 -08:00
|
|
|
{
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_group_content_update(overlay->grp, content, overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_content_update(overlay->ovl, content);
|
2009-12-21 09:01:19 -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
|
|
|
}
|
2011-04-01 04:26:58 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_color_update(Overlay_Class *ovl,
|
|
|
|
Color c)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
// Update class members' class contents
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(ovl->members, l, overlay)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_color_update(overlay->grp, c);
|
2012-03-21 22:23:19 -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
|
|
|
static void
|
|
|
|
_overlay_class_free(Overlay_Class *clas)
|
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clas);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
// Update class members' class contents
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(clas->members, l, overlay)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->grp->klass = NULL;
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_group_content_update(overlay->grp, NULL, NULL);
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_group_icon_update(overlay->grp, NULL);
|
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_content_update(overlay->ovl, NULL);
|
|
|
|
_overlay_default_class_icon_update(overlay->ovl, NULL);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
}
|
2014-01-21 17:38:55 -08:00
|
|
|
evas_object_del(clas->icon);
|
|
|
|
eina_list_free(clas->members);
|
2012-07-19 13:26:09 -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
|
|
|
free(clas);
|
|
|
|
}
|
2009-11-15 07:53:37 -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
|
|
|
static Overlay_Class *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_class_new(Elm_Map_Data *sd)
|
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-07-19 13:26:09 -07:00
|
|
|
Overlay_Class *ovl;
|
|
|
|
|
|
|
|
ovl = ELM_NEW(Overlay_Class);
|
|
|
|
ovl->wsd = sd;
|
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->icon = NULL;
|
|
|
|
ovl->zoom_max = OVERLAY_CLASS_ZOOM_MAX;
|
2012-07-19 13:26:09 -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
|
|
|
return ovl;
|
|
|
|
}
|
2009-11-15 07:53:37 -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
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_bubble_coord_update(Overlay_Bubble *bubble)
|
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
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
if (bubble->pobj)
|
|
|
|
{
|
|
|
|
Evas_Coord x, y, w, h;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
evas_object_geometry_get(bubble->pobj, &x, &y, &w, &h);
|
|
|
|
bubble->x = x + (w / 2);
|
|
|
|
bubble->y = y - (bubble->h / 2);
|
2012-07-19 13:26:09 -07:00
|
|
|
_canvas_to_coord
|
|
|
|
(bubble->wsd, bubble->x, bubble->y, &(bubble->x), &(bubble->y));
|
|
|
|
_coord_to_region_convert
|
|
|
|
(bubble->wsd, bubble->x, bubble->y, bubble->wsd->size.w,
|
|
|
|
&(bubble->lon), &(bubble->lat));
|
2012-05-23 03:29:03 -07:00
|
|
|
}
|
|
|
|
else
|
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-07-19 13:26:09 -07:00
|
|
|
_region_to_coord_convert(bubble->wsd, bubble->lon, bubble->lat,
|
|
|
|
bubble->wsd->size.w, &bubble->x, &bubble->y);
|
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-15 07:53:37 -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
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_coord_get(Overlay_Bubble *bubble,
|
|
|
|
Evas_Coord *x,
|
|
|
|
Evas_Coord *y,
|
|
|
|
Evas_Coord *w,
|
|
|
|
Evas_Coord *h)
|
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
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (!(bubble->pobj))
|
|
|
|
{
|
|
|
|
if (x) *x = bubble->x;
|
|
|
|
if (y) *y = bubble->y;
|
|
|
|
if (w) *w = bubble->w;
|
|
|
|
if (h) *h = bubble->h;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (x) *x = 0;
|
|
|
|
if (y) *y = 0;
|
|
|
|
if (w) *w = 0;
|
|
|
|
if (h) *h = 0;
|
|
|
|
}
|
|
|
|
}
|
2012-03-20 00:37:59 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_show_hide(Overlay_Bubble *bubble,
|
|
|
|
Eina_Bool visible)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(bubble, EINA_FALSE);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(bubble->obj, EINA_FALSE);
|
|
|
|
|
|
|
|
if (!visible) evas_object_hide(bubble->obj);
|
|
|
|
else if (bubble->pobj && !evas_object_visible_get(bubble->pobj))
|
|
|
|
{
|
|
|
|
evas_object_hide(bubble->obj);
|
|
|
|
visible = EINA_FALSE;
|
|
|
|
}
|
|
|
|
else
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_coord_to_canvas
|
|
|
|
(bubble->wsd, bubble->x, bubble->y, &(bubble->x), &(bubble->y));
|
|
|
|
_obj_place(bubble->obj, bubble->x - (bubble->w / 2),
|
|
|
|
bubble->y - (bubble->h / 2), bubble->w, bubble->h);
|
2012-05-23 03:29:03 -07:00
|
|
|
evas_object_raise(bubble->obj);
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
2012-05-23 03:29:03 -07:00
|
|
|
return visible;
|
2009-11-15 11:52:07 -08:00
|
|
|
}
|
2009-11-15 07:53:37 -08:00
|
|
|
|
2009-12-18 09:45:47 -08:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_free(Overlay_Bubble *bubble)
|
2009-11-15 07:53:37 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
2012-02-20 23:59:19 -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
|
|
|
evas_object_del(bubble->bx);
|
|
|
|
evas_object_del(bubble->sc);
|
|
|
|
evas_object_del(bubble->obj);
|
2012-07-19 13:26:09 -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
|
|
|
free(bubble);
|
2009-11-15 07:53:37 -08:00
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static Overlay_Bubble *
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_bubble_new(Elm_Map_Overlay *overlay)
|
2011-01-04 00:45:27 -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
|
|
|
Evas_Coord h;
|
|
|
|
const char *s;
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Bubble *bubble;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, NULL);
|
|
|
|
|
|
|
|
bubble = ELM_NEW(Overlay_Bubble);
|
|
|
|
bubble->wsd = overlay->wsd;
|
|
|
|
|
|
|
|
bubble->obj =
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_add(evas_object_evas_get((overlay->wsd)->obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_widget_theme_object_set
|
2012-11-25 22:32:53 -08:00
|
|
|
((overlay->wsd)->obj, bubble->obj, "map", "marker_bubble",
|
|
|
|
elm_widget_style_get((overlay->wsd)->obj));
|
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
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_event_callback_add(bubble->obj, EVAS_CALLBACK_MOUSE_DOWN,
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_clicked_cb, overlay);
|
2011-01-04 00:45:27 -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
|
|
|
bubble->sc = elm_scroller_add(bubble->obj);
|
|
|
|
elm_widget_style_set(bubble->sc, "map_bubble");
|
|
|
|
elm_scroller_content_min_limit(bubble->sc, EINA_FALSE, EINA_TRUE);
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_scroller_policy_set
|
|
|
|
(bubble->sc, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF);
|
|
|
|
elm_scroller_bounce_set
|
|
|
|
(bubble->sc, _elm_config->thumbscroll_bounce_enable, EINA_FALSE);
|
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
|
|
|
edje_object_part_swallow(bubble->obj, "elm.swallow.content", bubble->sc);
|
2011-01-04 00:45:27 -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
|
|
|
bubble->bx = elm_box_add(bubble->sc);
|
|
|
|
evas_object_size_hint_align_set(bubble->bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_size_hint_weight_set
|
|
|
|
(bubble->bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
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_box_horizontal_set(bubble->bx, EINA_TRUE);
|
|
|
|
elm_object_content_set(bubble->sc, bubble->bx);
|
|
|
|
|
|
|
|
s = edje_object_data_get(bubble->obj, "size_w");
|
|
|
|
if (s) bubble->w = atoi(s);
|
|
|
|
else bubble->w = 0;
|
|
|
|
|
|
|
|
edje_object_size_min_calc(bubble->obj, NULL, &(bubble->h));
|
|
|
|
s = edje_object_data_get(bubble->obj, "size_h");
|
|
|
|
if (s) h = atoi(s);
|
|
|
|
else h = 0;
|
2012-07-19 13:26:09 -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 (bubble->h < h) bubble->h = h;
|
|
|
|
|
|
|
|
bubble->lon = -1;
|
|
|
|
bubble->lat = -1;
|
|
|
|
bubble->x = -1;
|
|
|
|
bubble->y = -1;
|
2012-07-19 13:26:09 -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
|
|
|
return bubble;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_route_color_update(Overlay_Route *ovl,
|
|
|
|
Color c)
|
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-21 22:23:19 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_color_set(ovl->obj, c.r, c.g, c.b, c.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_route_hide(Overlay_Route *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_hide(ovl->obj);
|
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
|
|
|
|
_overlay_route_show(Overlay_Route *r)
|
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Path *p;
|
2012-07-19 13:26:09 -07:00
|
|
|
Eina_List *l;
|
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
|
|
|
Path_Node *n;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(r);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(r->wsd);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_polygon_points_clear(r->obj);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(r->nodes, l, 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
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
p = eina_list_nth(r->paths, n->idx);
|
|
|
|
if (!p) continue;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_region_to_coord_convert
|
|
|
|
(r->wsd, n->pos.lon, n->pos.lat, r->wsd->size.w, &p->x, &p->y);
|
|
|
|
_coord_to_canvas(r->wsd, p->x, p->y, &p->x, &p->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
|
|
|
}
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(r->paths, l, p)
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_polygon_point_add(r->obj, p->x - 3, p->y - 3);
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_REVERSE_FOREACH(r->paths, l, p)
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_polygon_point_add(r->obj, p->x + 3, p->y + 3);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
evas_object_show(r->obj);
|
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
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_route_free(Overlay_Route *route)
|
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
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Path *p;
|
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
|
|
|
Path_Node *n;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(route);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
evas_object_del(route->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(route->paths, p)
|
2012-07-19 13:26:09 -07:00
|
|
|
free(p);
|
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(route->nodes, 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
|
|
|
{
|
2014-01-21 17:12:44 -08:00
|
|
|
eina_stringshare_del(n->pos.address);
|
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
|
|
|
free(n);
|
|
|
|
}
|
2012-07-19 13:26:09 -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
|
|
|
free(route);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Overlay_Route *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_route_new(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
const Elm_Map_Route *route,
|
|
|
|
Color c)
|
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
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Path_Node *n;
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Route *ovl;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route, 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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Route);
|
|
|
|
ovl->wsd = sd;
|
|
|
|
ovl->obj =
|
2012-11-25 22:32:53 -08:00
|
|
|
evas_object_polygon_add(evas_object_evas_get(sd->obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->obj, sd->pan_obj);
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_route_color_update(ovl, c);
|
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
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(route->nodes, l, 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
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Path *path;
|
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
|
|
|
Path_Node *node;
|
|
|
|
|
|
|
|
node = ELM_NEW(Path_Node);
|
|
|
|
node->idx = n->idx;
|
|
|
|
node->pos.lon = n->pos.lon;
|
|
|
|
node->pos.lat = n->pos.lat;
|
|
|
|
if (n->pos.address) node->pos.address = strdup(n->pos.address);
|
|
|
|
ovl->nodes = eina_list_append(ovl->nodes, node);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
path = ELM_NEW(Path);
|
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
|
|
|
ovl->paths = eina_list_append(ovl->paths, path);
|
|
|
|
}
|
2012-07-19 13:26:09 -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
|
|
|
return ovl;
|
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_line_color_update(Overlay_Line *ovl,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_color_set(ovl->obj, c.r, c.g, c.b, c.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_line_hide(Overlay_Line *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (ovl->obj) evas_object_hide(ovl->obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_line_show(Overlay_Line *ovl)
|
|
|
|
{
|
|
|
|
Evas_Coord fx, fy, tx, ty;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd = ovl->wsd;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_region_to_coord_convert(sd, ovl->flon, ovl->flat, sd->size.w, &fx, &fy);
|
|
|
|
_region_to_coord_convert(sd, ovl->tlon, ovl->tlat, sd->size.w, &tx, &ty);
|
|
|
|
_coord_to_canvas(sd, fx, fy, &fx, &fy);
|
|
|
|
_coord_to_canvas(sd, tx, ty, &tx, &ty);
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_line_xy_set(ovl->obj, fx, fy, tx, ty);
|
|
|
|
evas_object_show(ovl->obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_line_free(Overlay_Line *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_del(ovl->obj);
|
|
|
|
free(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Overlay_Line *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_line_new(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
double flon,
|
|
|
|
double flat,
|
|
|
|
double tlon,
|
|
|
|
double tlat,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Line *ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Line);
|
|
|
|
ovl->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
ovl->flon = flon;
|
|
|
|
ovl->flat = flat;
|
|
|
|
ovl->tlon = tlon;
|
|
|
|
ovl->tlat = tlat;
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl->obj =
|
2012-11-25 22:32:53 -08:00
|
|
|
evas_object_line_add(evas_object_evas_get(sd->obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->obj, sd->pan_obj);
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_line_color_update(ovl, c);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_polygon_color_update(Overlay_Polygon *ovl,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_color_set(ovl->obj, c.r, c.g, c.b, c.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_polygon_hide(Overlay_Polygon *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (ovl->obj) evas_object_hide(ovl->obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_polygon_show(Overlay_Polygon *ovl)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Region *r;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
|
|
|
sd = ovl->wsd;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
|
|
|
evas_object_polygon_points_clear(ovl->obj);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(ovl->regions, l, r)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
Evas_Coord x, y;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_region_to_coord_convert(sd, r->lon, r->lat, sd->size.w, &x, &y);
|
|
|
|
_coord_to_canvas(sd, x, y, &x, &y);
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_polygon_point_add(ovl->obj, x, y);
|
|
|
|
}
|
|
|
|
evas_object_show(ovl->obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_polygon_free(Overlay_Polygon *ovl)
|
|
|
|
{
|
|
|
|
Region *r;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_del(ovl->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(ovl->regions, r)
|
2012-07-19 13:26:09 -07:00
|
|
|
free(r);
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
free(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Overlay_Polygon *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_polygon_new(Elm_Map_Data *sd, Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Polygon *ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Polygon);
|
|
|
|
ovl->wsd = sd;
|
|
|
|
ovl->obj =
|
2012-11-25 22:32:53 -08:00
|
|
|
evas_object_polygon_add(evas_object_evas_get(sd->obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->obj, sd->pan_obj);
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_polygon_color_update(ovl, c);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_circle_color_update(Overlay_Circle *ovl,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Object *obj;
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
obj = elm_layout_edje_get(ovl->obj);
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_color_set(obj, c.r, c.g, c.b, c.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_circle_hide(Overlay_Circle *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (ovl->obj) evas_object_hide(ovl->obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_circle_show(Overlay_Circle *ovl)
|
|
|
|
{
|
|
|
|
double r;
|
|
|
|
Evas_Coord x, y;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
|
|
|
sd = ovl->wsd;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
r = (ovl->ratio) * sd->size.w;
|
|
|
|
_region_to_coord_convert(sd, ovl->lon, ovl->lat, sd->size.w, &x, &y);
|
|
|
|
_coord_to_canvas(sd, x, y, &x, &y);
|
2012-03-22 03:40:04 -07:00
|
|
|
_obj_place(ovl->obj, x - r, y - r, r * 2, r * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_circle_free(Overlay_Circle *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_del(ovl->obj);
|
|
|
|
free(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Overlay_Circle *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_circle_new(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
double radius,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Circle *ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Circle);
|
|
|
|
ovl->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
ovl->lon = lon;
|
|
|
|
ovl->lat = lat;
|
|
|
|
ovl->radius = radius;
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl->ratio = radius / sd->size.w;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
ovl->obj = elm_layout_add(sd->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->obj, sd->pan_obj);
|
|
|
|
evas_object_stack_above(ovl->obj, sd->sep_maps_overlays);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set(ovl->obj, "map/circle", "base",
|
|
|
|
elm_widget_style_get(sd->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2013-03-01 18:04:31 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_circle_color_update(ovl, c);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_scale_color_update(Overlay_Scale *ovl,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_color_set(ovl->obj, c.r, c.g, c.b, c.a);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_overlay_scale_hide(Overlay_Scale *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (ovl->obj) evas_object_hide(ovl->obj);
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static void
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_scale_show(Overlay_Scale *ovl)
|
|
|
|
{
|
|
|
|
double text;
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord w;
|
2012-03-22 03:40:04 -07:00
|
|
|
char buf[32];
|
|
|
|
double meter;
|
2012-07-19 13:26:09 -07:00
|
|
|
double lon, lat;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
|
|
|
|
|
|
|
sd = ovl->wsd;
|
|
|
|
|
2012-10-09 01:18:28 -07:00
|
|
|
if ((int)(sizeof(_scale_tb)/sizeof(double)) <= sd->zoom)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
ERR("Zoom level is too high");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
elm_map_region_get(sd->obj, &lon, &lat);
|
2012-07-19 13:26:09 -07:00
|
|
|
meter =
|
2012-11-25 22:32:53 -08:00
|
|
|
sd->src_tile->scale_cb(sd->obj, lon, lat, sd->zoom);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
w = (_scale_tb[sd->zoom] / meter) * (sd->zoom_detail - sd->zoom + 1);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
text = _scale_tb[sd->zoom] / 1000;
|
|
|
|
if (text < 1) snprintf(buf, sizeof(buf), "%d m", (int)(text * 1000));
|
|
|
|
else snprintf(buf, sizeof(buf), "%d km", (int)text);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_layout_text_set(ovl->obj, "elm.text", buf);
|
2012-03-22 03:40:04 -07:00
|
|
|
_obj_place(ovl->obj, ovl->x, ovl->y, w, ovl->h);
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static void
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_scale_free(Overlay_Scale *ovl)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(ovl);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
evas_object_del(ovl->obj);
|
|
|
|
free(ovl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Overlay_Scale *
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_scale_new(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x,
|
|
|
|
Evas_Coord y,
|
|
|
|
Color c)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
|
|
|
const char *s;
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Scale *ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = ELM_NEW(Overlay_Scale);
|
|
|
|
ovl->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
ovl->x = x;
|
|
|
|
ovl->y = y;
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
ovl->obj = elm_layout_add(sd->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_member_add(ovl->obj, sd->pan_obj);
|
|
|
|
evas_object_stack_above(ovl->obj, sd->sep_maps_overlays);
|
2013-03-01 18:04:31 -08:00
|
|
|
if (!elm_layout_theme_set(ovl->obj, "map/scale", "base",
|
|
|
|
elm_widget_style_get(sd->obj)))
|
2013-12-25 20:03:55 -08:00
|
|
|
CRI("Failed to set layout!");
|
2013-03-01 18:04:31 -08:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
s = edje_object_data_get(elm_layout_edje_get(ovl->obj), "size_w");
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
if (s) ovl->w = atoi(s);
|
|
|
|
else ovl->w = 100;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
s = edje_object_data_get(elm_layout_edje_get(ovl->obj), "size_h");
|
|
|
|
if (s) ovl->h = atoi(s);
|
|
|
|
else ovl->h = 60;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
_overlay_scale_color_update(ovl, c);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
return 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
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_grouping(Eina_List *clas_membs,
|
|
|
|
Elm_Map_Overlay *boss)
|
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
|
|
|
{
|
|
|
|
Eina_List *l;
|
2012-03-21 22:23:19 -07:00
|
|
|
Elm_Map_Overlay *memb;
|
2012-07-19 13:26:09 -07:00
|
|
|
Eina_List *grp_membs = NULL;
|
2012-03-21 22:23:19 -07:00
|
|
|
int sum_x = 0, sum_y = 0, cnt = 0;
|
|
|
|
Evas_Coord bx = 0, by = 0, bw = 0, bh = 0;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(clas_membs);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(boss);
|
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (boss->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_coord_get(boss->ovl, &bx, &by, &bw, &bh);
|
2012-03-21 22:23:19 -07:00
|
|
|
else if (boss->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_coord_get(boss->ovl, &bx, &by, &bw, &bh);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(clas_membs, l, memb)
|
2012-03-21 22:23:19 -07:00
|
|
|
{
|
|
|
|
Evas_Coord x = 0, y = 0, w = 0, h = 0;
|
|
|
|
|
|
|
|
if (boss == memb || memb->grp->in) continue;
|
2012-07-19 13:26:09 -07:00
|
|
|
if ((memb->hide) || (memb->zoom_min > memb->wsd->zoom)) continue;
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (memb->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_coord_get(memb->ovl, &x, &y, &w, &h);
|
2012-03-21 22:23:19 -07:00
|
|
|
else if (memb->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_coord_get(memb->ovl, &x, &y, &w, &h);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (bw <= 0 || bh <= 0 || w <= 0 || h <= 0) continue;
|
|
|
|
if (ELM_RECTS_INTERSECT(x, y, w, h, bx, by,
|
|
|
|
bw * OVERLAY_GROUPING_SCALE,
|
|
|
|
bh * OVERLAY_GROUPING_SCALE))
|
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
|
|
|
{
|
|
|
|
// Join group.
|
2012-03-21 22:23:19 -07:00
|
|
|
memb->grp->boss = EINA_FALSE;
|
|
|
|
memb->grp->in = EINA_TRUE;
|
|
|
|
sum_x += x;
|
|
|
|
sum_y += y;
|
|
|
|
cnt++;
|
|
|
|
grp_membs = eina_list_append(grp_membs, memb);
|
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
|
|
|
}
|
2011-01-04 00:45:27 -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
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (cnt >= 1)
|
2011-01-04 00:45:27 -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
|
|
|
// Mark as boss
|
2012-03-21 22:23:19 -07:00
|
|
|
boss->grp->boss = EINA_TRUE;
|
|
|
|
boss->grp->in = EINA_TRUE;
|
|
|
|
sum_x = (sum_x + bx) / (cnt + 1);
|
|
|
|
sum_y = (sum_y + by) / (cnt + 1);
|
|
|
|
grp_membs = eina_list_append(grp_membs, boss);
|
|
|
|
_overlay_group_coord_member_update(boss->grp, sum_x, sum_y, grp_membs);
|
2012-05-23 03:29:03 -07:00
|
|
|
|
|
|
|
// Append group to all overlay list
|
2012-07-19 13:26:09 -07:00
|
|
|
boss->wsd->group_overlays =
|
|
|
|
eina_list_append(boss->wsd->group_overlays, boss->grp->overlay);
|
2011-01-04 00:45:27 -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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_show(Elm_Map_Overlay *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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd = overlay->wsd;
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (overlay->paused) return;
|
2012-07-19 13:26:09 -07:00
|
|
|
if ((overlay->grp) && (overlay->grp->klass) && (overlay->grp->klass->paused))
|
|
|
|
return;
|
2012-03-21 22:23:19 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
overlay->visible = EINA_TRUE;
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
overlay->visible = EINA_FALSE;
|
|
|
|
return;
|
2012-03-22 03:40:04 -07:00
|
|
|
}
|
2012-05-23 03:29:03 -07:00
|
|
|
if (overlay->grp)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
if ((overlay->grp->in) ||
|
2012-07-19 13:26:09 -07:00
|
|
|
(overlay->hide) || (overlay->zoom_min > sd->zoom))
|
|
|
|
overlay->visible = EINA_FALSE;
|
2012-05-23 03:29:03 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if ((overlay->grp->klass) &&
|
|
|
|
((overlay->grp->klass->hide) ||
|
|
|
|
(overlay->grp->klass->zoom_min > sd->zoom)))
|
|
|
|
overlay->visible = EINA_FALSE;
|
2012-05-23 03:29:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (overlay->type)
|
|
|
|
{
|
|
|
|
case ELM_MAP_OVERLAY_TYPE_DEFAULT:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_default_show(overlay->ovl);
|
|
|
|
else _overlay_default_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_GROUP:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_group_show(overlay->ovl);
|
|
|
|
else _overlay_group_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_BUBBLE:
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->visible =
|
|
|
|
_overlay_bubble_show_hide(overlay->ovl, overlay->visible);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_ROUTE:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_route_show(overlay->ovl);
|
|
|
|
else _overlay_route_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_LINE:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_line_show(overlay->ovl);
|
|
|
|
else _overlay_line_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_POLYGON:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_polygon_show(overlay->ovl);
|
|
|
|
else _overlay_polygon_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_CIRCLE:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_circle_show(overlay->ovl);
|
|
|
|
else _overlay_circle_hide(overlay->ovl);
|
|
|
|
break;
|
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
case ELM_MAP_OVERLAY_TYPE_SCALE:
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->visible) _overlay_scale_show(overlay->ovl);
|
|
|
|
else _overlay_scale_hide(overlay->ovl);
|
2013-10-13 22:40:35 -07:00
|
|
|
break;
|
2012-05-23 03:29:03 -07:00
|
|
|
default:
|
2012-07-19 13:26:09 -07:00
|
|
|
ERR("Invalid overlay type to show: %d", overlay->type);
|
2012-03-22 03:40:04 -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
|
|
|
}
|
|
|
|
|
2016-12-05 21:17:31 -08:00
|
|
|
static void
|
|
|
|
_copyright_place(Elm_Map_Data *sd)
|
|
|
|
{
|
|
|
|
Evas_Coord w, h;
|
|
|
|
Evas_Coord vw, vx, vy, vh;
|
|
|
|
|
|
|
|
_viewport_coord_get(sd, &vx, &vy, &vw, &vh);
|
|
|
|
_coord_to_canvas_no_rotation(sd, vx, vy, &vx, &vy);
|
|
|
|
evas_object_size_hint_min_get(sd->copyright, &w, &h);
|
|
|
|
_obj_place(sd->copyright, vx + vw - w, vy + vh - h, w, h);
|
|
|
|
}
|
|
|
|
|
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
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlay_place(Elm_Map_Data *sd)
|
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
|
|
|
{
|
|
|
|
Eina_List *l, *ll;
|
2012-03-21 22:23:19 -07:00
|
|
|
Elm_Map_Overlay *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
|
|
|
|
2013-04-10 04:28:22 -07:00
|
|
|
sd->group_overlays = eina_list_free(sd->group_overlays);
|
2012-05-23 03:29:03 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->overlays, l, overlay)
|
2011-01-04 00:45:27 -08:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
// Reset groups
|
2012-10-10 05:29:08 -07:00
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS) continue;
|
2012-03-21 22:23:19 -07:00
|
|
|
overlay->grp->in = EINA_FALSE;
|
|
|
|
overlay->grp->boss = EINA_FALSE;
|
2012-05-23 03:29:03 -07:00
|
|
|
_overlay_group_hide(overlay->grp);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
// Update overlays' coord
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_coord_update(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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_coord_update(overlay->ovl);
|
2011-01-04 00:45:27 -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
|
|
|
|
2014-01-21 20:20:15 -08:00
|
|
|
// Classify into group boss or follower
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->overlays, l, overlay)
|
2011-01-04 00:45:27 -08:00
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
Elm_Map_Overlay *boss;
|
|
|
|
Overlay_Class *clas;
|
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-21 22:23:19 -07:00
|
|
|
if (overlay->type != ELM_MAP_OVERLAY_TYPE_CLASS) continue;
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->hide || (overlay->zoom_min > sd->zoom)) continue;
|
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-21 22:23:19 -07:00
|
|
|
clas = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
if (clas->zoom_max < sd->zoom) continue;
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(clas->members, ll, boss)
|
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-21 22:23:19 -07:00
|
|
|
if (boss->type == ELM_MAP_OVERLAY_TYPE_CLASS) continue;
|
2012-07-19 13:26:09 -07:00
|
|
|
if (boss->hide || (boss->zoom_min > sd->zoom)) continue;
|
2012-03-21 22:23:19 -07:00
|
|
|
if (boss->grp->in) continue;
|
|
|
|
_overlay_grouping(clas->members, boss);
|
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
|
|
|
}
|
2011-01-04 00:45:27 -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
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
// Place group overlays and overlays
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->group_overlays, l, overlay)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_show(overlay);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->overlays, l, overlay)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_show(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 Evas_Object *
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_obj_get(const Elm_Map_Overlay *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
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_GROUP)
|
|
|
|
{
|
|
|
|
Overlay_Group *ovl = overlay->ovl;
|
|
|
|
Overlay_Default *df = ovl->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
return df->layout;
|
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2011-01-04 00:45:27 -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
|
|
|
Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
return ovl->layout;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("Not supported overlay type: %d", overlay->type);
|
|
|
|
return NULL;
|
2011-01-04 00:45:27 -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
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_xml_name_attrs_dump_cb(void *data,
|
|
|
|
const char *key,
|
|
|
|
const char *value)
|
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-07-19 13:26:09 -07:00
|
|
|
Name_Dump *dump = (Name_Dump *)data;
|
|
|
|
|
2012-10-10 05:29:08 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(dump, EINA_FALSE);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
|
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
|
|
|
|
2014-01-26 09:07:44 -08:00
|
|
|
if (!strncmp(key, NOMINATIM_ATTR_LON, strlen(NOMINATIM_ATTR_LON)))
|
2012-07-19 13:26:09 -07:00
|
|
|
dump->lon = _elm_atof(value);
|
2014-01-26 09:07:44 -08:00
|
|
|
else if (!strncmp(key, NOMINATIM_ATTR_LAT, strlen(NOMINATIM_ATTR_LAT)))
|
2012-07-19 13:26:09 -07:00
|
|
|
dump->lat = _elm_atof(value);
|
2014-01-26 09:07:44 -08:00
|
|
|
else if (!strncmp(key, NOMINATIM_ATTR_ADDRESS, strlen(NOMINATIM_ATTR_ADDRESS)))
|
2012-10-12 03:27:08 -07:00
|
|
|
{
|
|
|
|
if (!dump->address)
|
|
|
|
dump->address = strdup(value);
|
|
|
|
}
|
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
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_xml_route_dump_cb(void *data,
|
|
|
|
Eina_Simple_XML_Type type,
|
|
|
|
const char *value,
|
2014-01-06 06:30:02 -08:00
|
|
|
unsigned offset EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
unsigned length)
|
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_Dump *dump = data;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-10-10 05:29:08 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(dump, EINA_FALSE);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
|
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
|
|
|
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case EINA_SIMPLE_XML_OPEN:
|
|
|
|
case EINA_SIMPLE_XML_OPEN_EMPTY:
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
const char *attrs;
|
|
|
|
|
|
|
|
attrs = eina_simple_xml_tag_attributes_find(value, length);
|
|
|
|
if (!attrs)
|
|
|
|
{
|
|
|
|
if (!strncmp(value, YOURS_DISTANCE, length))
|
|
|
|
dump->id = ROUTE_XML_DISTANCE;
|
|
|
|
else if (!strncmp(value, YOURS_DESCRIPTION, length))
|
|
|
|
dump->id = ROUTE_XML_DESCRIPTION;
|
|
|
|
else if (!strncmp(value, YOURS_COORDINATES, length))
|
|
|
|
dump->id = ROUTE_XML_COORDINATES;
|
|
|
|
else dump->id = ROUTE_XML_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
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
|
|
|
case EINA_SIMPLE_XML_DATA:
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
char *buf = malloc(length);
|
|
|
|
|
|
|
|
if (!buf) return EINA_FALSE;
|
|
|
|
|
|
|
|
snprintf(buf, length, "%s", value);
|
2016-07-08 00:58:05 -07:00
|
|
|
if (dump->id == ROUTE_XML_DISTANCE)
|
|
|
|
{
|
|
|
|
dump->distance = _elm_atof(buf);
|
|
|
|
free(buf);
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (!(dump->description) && (dump->id == ROUTE_XML_DESCRIPTION))
|
2016-03-04 16:02:15 -08:00
|
|
|
dump->description = buf;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (dump->id == ROUTE_XML_COORDINATES)
|
2016-03-04 16:02:15 -08:00
|
|
|
dump->coordinates = buf;
|
2016-07-08 00:58:05 -07:00
|
|
|
else free(buf);
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
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
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
2012-07-19 13:26:09 -07:00
|
|
|
_xml_name_dump_cb(void *data,
|
|
|
|
Eina_Simple_XML_Type type,
|
|
|
|
const char *value,
|
2014-01-06 06:30:02 -08:00
|
|
|
unsigned offset EINA_UNUSED,
|
2012-07-19 13:26:09 -07:00
|
|
|
unsigned length)
|
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
|
|
|
{
|
|
|
|
Name_Dump *dump = data;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-10-10 05:29:08 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(dump, EINA_FALSE);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
|
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
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case EINA_SIMPLE_XML_OPEN:
|
|
|
|
case EINA_SIMPLE_XML_OPEN_EMPTY:
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
const char *attrs;
|
|
|
|
attrs = eina_simple_xml_tag_attributes_find(value, length);
|
|
|
|
if (attrs)
|
|
|
|
{
|
2014-01-26 09:07:44 -08:00
|
|
|
if (!strncmp(value, NOMINATIM_RESULT, strlen(NOMINATIM_RESULT)))
|
2012-07-19 13:26:09 -07:00
|
|
|
dump->id = NAME_XML_NAME;
|
|
|
|
else dump->id = NAME_XML_NONE;
|
|
|
|
|
|
|
|
eina_simple_xml_attributes_parse
|
|
|
|
(attrs, length - (attrs - value), _xml_name_attrs_dump_cb,
|
|
|
|
dump);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
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
|
|
|
case EINA_SIMPLE_XML_DATA:
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
char *buf = malloc(length + 1);
|
|
|
|
|
|
|
|
if (!buf) return EINA_FALSE;
|
|
|
|
snprintf(buf, length + 1, "%s", value);
|
2016-03-04 16:02:15 -08:00
|
|
|
if (dump->id == NAME_XML_NAME) dump->address = buf;
|
2016-07-08 01:00:48 -07:00
|
|
|
else free(buf);
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
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
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2012-10-12 03:27:08 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_xml_name_dump_list_cb(void *data,
|
|
|
|
Eina_Simple_XML_Type type,
|
|
|
|
const char *value,
|
|
|
|
unsigned offset,
|
|
|
|
unsigned length)
|
|
|
|
{
|
|
|
|
Elm_Map_Name_List *name_list = data;
|
|
|
|
Elm_Map_Name *name;
|
|
|
|
Name_Dump dump = {0, NULL, 0.0, 0.0};
|
|
|
|
_xml_name_dump_cb(&dump, type, value, offset, length);
|
|
|
|
if (dump.address)
|
|
|
|
{
|
2013-01-15 19:37:32 -08:00
|
|
|
name = calloc(1, sizeof(Elm_Map_Name));
|
|
|
|
if (!name) return EINA_FALSE;
|
2016-03-04 16:02:15 -08:00
|
|
|
name->address = dump.address;
|
2012-10-12 03:27:08 -07:00
|
|
|
name->lon = dump.lon;
|
|
|
|
name->lat = dump.lat;
|
|
|
|
name->wsd = name_list->wsd;
|
|
|
|
name_list->names = eina_list_append(name_list->names, name);
|
|
|
|
name->wsd->names = eina_list_append(name->wsd->names, name);
|
|
|
|
}
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
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
|
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
|
|
|
_kml_parse(Elm_Map_Route *r)
|
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
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
char **str;
|
|
|
|
double lon, lat;
|
2012-07-19 13:26:09 -07:00
|
|
|
unsigned int ele, idx;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(r);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(r->fname);
|
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
|
|
|
|
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_Dump dump = {0, r->fname, 0.0, NULL, 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
|
|
|
|
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
|
|
|
f = fopen(r->fname, "rb");
|
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 (f)
|
|
|
|
{
|
2014-01-10 23:19:25 -08:00
|
|
|
long sz;
|
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
|
|
|
|
|
|
|
fseek(f, 0, SEEK_END);
|
|
|
|
sz = ftell(f);
|
|
|
|
if (sz > 0)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
char *buf = malloc(sz + 1);
|
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 (buf)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
memset(buf, 0, sz + 1);
|
|
|
|
rewind(f);
|
2014-01-10 23:23:23 -08:00
|
|
|
if (fread(buf, 1, sz, f) == (size_t)sz)
|
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-07-19 13:26:09 -07:00
|
|
|
eina_simple_xml_parse
|
|
|
|
(buf, sz, EINA_TRUE, _xml_route_dump_cb, &dump);
|
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
|
|
|
}
|
2013-01-09 00:40:56 -08:00
|
|
|
free(buf);
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(f);
|
|
|
|
|
2016-12-20 15:17:01 -08:00
|
|
|
if (!EINA_DBL_CMP(dump.distance, 0)) r->info.distance = dump.distance;
|
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 (dump.description)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&r->info.waypoints, dump.description);
|
|
|
|
str = eina_str_split_full(dump.description, "\n", 0, &ele);
|
|
|
|
r->info.waypoint_count = ele;
|
|
|
|
for (idx = 0; idx < ele; idx++)
|
|
|
|
{
|
|
|
|
Path_Waypoint *wp = ELM_NEW(Path_Waypoint);
|
2012-07-19 13:26:09 -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 (wp)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
wp->wsd = r->wsd;
|
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
|
|
|
wp->point = eina_stringshare_add(str[idx]);
|
|
|
|
DBG("%s", str[idx]);
|
|
|
|
r->waypoint = eina_list_append(r->waypoint, wp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (str && str[0])
|
|
|
|
{
|
|
|
|
free(str[0]);
|
|
|
|
free(str);
|
|
|
|
}
|
2016-03-04 16:02:15 -08:00
|
|
|
free(dump.description);
|
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
|
|
|
}
|
|
|
|
else WRN("description is not found !");
|
|
|
|
|
|
|
|
if (dump.coordinates)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&r->info.nodes, dump.coordinates);
|
|
|
|
str = eina_str_split_full(dump.coordinates, "\n", 0, &ele);
|
|
|
|
r->info.node_count = ele;
|
|
|
|
for (idx = 0; idx < ele; idx++)
|
|
|
|
{
|
|
|
|
Path_Node *n = ELM_NEW(Path_Node);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
sscanf(str[idx], "%lf,%lf", &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 (n)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
n->wsd = r->wsd;
|
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
|
|
|
n->pos.lon = lon;
|
|
|
|
n->pos.lat = lat;
|
|
|
|
n->idx = idx;
|
|
|
|
DBG("%lf:%lf", lon, lat);
|
|
|
|
n->pos.address = NULL;
|
|
|
|
r->nodes = eina_list_append(r->nodes, n);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (str && str[0])
|
|
|
|
{
|
|
|
|
free(str[0]);
|
|
|
|
free(str);
|
|
|
|
}
|
2016-03-04 16:02:15 -08:00
|
|
|
free(dump.coordinates);
|
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
|
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_parse(Elm_Map_Name *n)
|
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-07-19 13:26:09 -07:00
|
|
|
FILE *f;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(n);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(n->fname);
|
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
|
|
|
|
|
|
|
Name_Dump dump = {0, NULL, 0.0, 0.0};
|
|
|
|
|
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
|
|
|
f = fopen(n->fname, "rb");
|
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 (f)
|
|
|
|
{
|
2014-01-10 23:19:25 -08:00
|
|
|
long sz;
|
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
|
|
|
|
|
|
|
fseek(f, 0, SEEK_END);
|
|
|
|
sz = ftell(f);
|
|
|
|
if (sz > 0)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
char *buf = malloc(sz + 1);
|
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 (buf)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
memset(buf, 0, sz + 1);
|
|
|
|
rewind(f);
|
2014-01-10 23:23:23 -08:00
|
|
|
if (fread(buf, 1, sz, f) == (size_t)sz)
|
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-07-19 13:26:09 -07:00
|
|
|
eina_simple_xml_parse
|
|
|
|
(buf, sz, EINA_TRUE, _xml_name_dump_cb, &dump);
|
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
|
|
|
}
|
2013-01-09 00:49:30 -08:00
|
|
|
free(buf);
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(f);
|
|
|
|
|
|
|
|
if (dump.address)
|
|
|
|
{
|
|
|
|
INF("[%lf : %lf] ADDRESS : %s", n->lon, n->lat, dump.address);
|
2016-03-04 16:02:15 -08:00
|
|
|
n->address = dump.address;
|
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
|
|
|
}
|
|
|
|
n->lon = dump.lon;
|
|
|
|
n->lat = dump.lat;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-12 03:27:08 -07:00
|
|
|
static void
|
|
|
|
_name_list_parse(Elm_Map_Name_List *nl)
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(nl);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(nl->fname);
|
|
|
|
|
|
|
|
f = fopen(nl->fname, "rb");
|
|
|
|
if (f)
|
|
|
|
{
|
2014-01-10 23:19:25 -08:00
|
|
|
long sz;
|
2012-10-12 03:27:08 -07:00
|
|
|
|
|
|
|
fseek(f, 0, SEEK_END);
|
|
|
|
sz = ftell(f);
|
|
|
|
if (sz > 0)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
char *buf = malloc(sz + 1);
|
2012-10-12 03:27:08 -07:00
|
|
|
if (buf)
|
|
|
|
{
|
2013-02-24 19:00:07 -08:00
|
|
|
memset(buf, 0, sz + 1);
|
|
|
|
rewind(f);
|
2014-01-10 23:23:23 -08:00
|
|
|
if (fread(buf, 1, sz, f) == (size_t)sz)
|
2012-10-12 03:27:08 -07:00
|
|
|
{
|
|
|
|
eina_simple_xml_parse
|
|
|
|
(buf, sz, EINA_TRUE, _xml_name_dump_list_cb, nl);
|
|
|
|
}
|
2013-02-19 01:04:45 -08:00
|
|
|
free(buf);
|
2012-10-12 03:27:08 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
2012-07-19 13:26:09 -07:00
|
|
|
_route_cb(void *data,
|
|
|
|
const char *file,
|
|
|
|
int status)
|
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-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Route *route;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-07-19 13:26:09 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(data);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(file);
|
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-07-19 13:26:09 -07:00
|
|
|
route = data;
|
|
|
|
sd = route->wsd;
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
|
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
|
|
|
|
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->job = NULL;
|
|
|
|
if (status == 200)
|
|
|
|
{
|
2016-03-22 15:58:18 -07:00
|
|
|
sd->src_route->route_parse_cb(route);
|
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
|
|
|
INF("Route request success from (%lf, %lf) to (%lf, %lf)",
|
|
|
|
route->flon, route->flat, route->tlon, route->tlat);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (route->cb) route->cb(route->data, sd->obj, route);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_ROUTE_LOADED, 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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("Route request failed: %d", status);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (route->cb) route->cb(route->data, sd->obj, NULL);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_ROUTE_LOADED_FAIL, 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
|
|
|
}
|
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-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
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,state,busy,stop", "elm");
|
|
|
|
}
|
|
|
|
|
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
|
2012-07-19 13:26:09 -07:00
|
|
|
_name_cb(void *data,
|
|
|
|
const char *file,
|
|
|
|
int status)
|
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-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Name *name;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-07-19 13:26:09 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(data);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(file);
|
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-07-19 13:26:09 -07:00
|
|
|
name = data;
|
|
|
|
sd = name->wsd;
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
|
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
|
|
|
|
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->job = NULL;
|
|
|
|
if (status == 200)
|
|
|
|
{
|
2016-03-22 15:58:18 -07:00
|
|
|
sd->src_name->name_parse_cb(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
|
|
|
INF("Name request success address:%s, lon:%lf, lat:%lf",
|
|
|
|
name->address, name->lon, name->lat);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (name->cb) name->cb(name->data, sd->obj, name);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_NAME_LOADED, 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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("Name request failed: %d", status);
|
2012-11-25 22:32:53 -08:00
|
|
|
if (name->cb) name->cb(name->data, sd->obj, NULL);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_NAME_LOADED_FAIL, 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
|
|
|
}
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
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,state,busy,stop", "elm");
|
|
|
|
}
|
|
|
|
|
2012-10-12 03:27:08 -07:00
|
|
|
static void
|
|
|
|
_name_list_cb(void *data,
|
|
|
|
const char *file,
|
|
|
|
int status)
|
|
|
|
{
|
|
|
|
Elm_Map_Name_List *name_list;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd;
|
2012-10-12 03:27:08 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(data);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(file);
|
|
|
|
|
|
|
|
name_list = data;
|
|
|
|
sd = name_list->wsd;
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
|
2012-10-12 03:27:08 -07:00
|
|
|
|
|
|
|
name_list->job = NULL;
|
|
|
|
if (status == 200)
|
|
|
|
{
|
2016-03-22 15:58:18 -07:00
|
|
|
sd->src_name->name_list_parse_cb(name_list);
|
2012-10-12 03:27:08 -07:00
|
|
|
INF("Name List request success address");
|
|
|
|
if (name_list->cb)
|
2012-11-25 22:32:53 -08:00
|
|
|
name_list->cb(name_list->data, wd->obj,
|
2012-10-12 03:27:08 -07:00
|
|
|
name_list->names);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(wd->obj, ELM_MAP_EVENT_NAME_LOADED, NULL);
|
2012-10-12 03:27:08 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("Name List request failed: %d", status);
|
|
|
|
if (name_list->cb)
|
2012-11-25 22:32:53 -08:00
|
|
|
name_list->cb(name_list->data, wd->obj, NULL);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(wd->obj, ELM_MAP_EVENT_NAME_LOADED_FAIL, NULL);
|
2012-10-12 03:27:08 -07:00
|
|
|
}
|
2012-11-25 22:32:53 -08:00
|
|
|
|
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
2012-10-12 03:27:08 -07:00
|
|
|
"elm,state,busy,stop", "elm");
|
|
|
|
free(name_list->fname);
|
|
|
|
free(name_list);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *
|
|
|
|
_prepare_download()
|
|
|
|
{
|
|
|
|
char fname[PATH_MAX];
|
|
|
|
|
2013-11-12 05:56:05 -08:00
|
|
|
snprintf(fname, sizeof(fname), "%s" CACHE_NAME_ROOT,
|
|
|
|
efreet_cache_home_get());
|
|
|
|
if (!ecore_file_exists(fname)) ecore_file_mkpath(fname);
|
2012-10-12 03:27:08 -07:00
|
|
|
return strdup(fname);
|
|
|
|
}
|
|
|
|
|
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 Elm_Map_Name *
|
2012-07-19 13:26:09 -07:00
|
|
|
_name_request(const Evas_Object *obj,
|
|
|
|
int method,
|
|
|
|
const char *address,
|
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
Elm_Map_Name_Cb name_cb,
|
|
|
|
void *data)
|
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
|
|
|
{
|
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
|
|
|
char *url;
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Name *name;
|
2012-10-12 03:27:08 -07:00
|
|
|
char *fname, fname2[PATH_MAX];
|
2012-06-12 07:50:15 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_name, NULL);
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 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
|
|
|
|
2012-10-12 03:27:08 -07:00
|
|
|
fname = _prepare_download();
|
2012-07-19 13:26:09 -07:00
|
|
|
url = sd->src_name->url_cb
|
2012-11-25 22:32:53 -08:00
|
|
|
(sd->obj, method, address, 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 (!url)
|
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
|
|
|
{
|
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
|
|
|
ERR("Name URL is NULL");
|
2012-10-12 03:27:08 -07:00
|
|
|
free(fname);
|
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
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
name = ELM_NEW(Elm_Map_Name);
|
|
|
|
name->wsd = sd;
|
2012-06-12 07:50:15 -07:00
|
|
|
snprintf(fname2, sizeof(fname2), "%s/%d", fname, rand());
|
|
|
|
name->fname = strdup(fname2);
|
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
|
|
|
name->method = method;
|
|
|
|
if (method == ELM_MAP_NAME_METHOD_SEARCH) name->address = strdup(address);
|
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
|
|
|
else if (method == ELM_MAP_NAME_METHOD_REVERSE)
|
|
|
|
{
|
|
|
|
name->lon = lon;
|
|
|
|
name->lat = lat;
|
|
|
|
}
|
|
|
|
name->cb = name_cb;
|
|
|
|
name->data = data;
|
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
|
|
|
|
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 (!ecore_file_download_full(url, name->fname, _name_cb, NULL, name,
|
2012-07-19 13:26:09 -07:00
|
|
|
&(name->job), sd->ua) || !(name->job))
|
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
|
|
|
{
|
|
|
|
ERR("Can't request Name from %s to %s", url, name->fname);
|
2014-01-21 18:08:47 -08:00
|
|
|
free(name->address);
|
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
|
|
|
free(name->fname);
|
|
|
|
free(name);
|
2012-10-12 03:27:08 -07:00
|
|
|
free(fname);
|
2014-04-03 03:16:14 -07:00
|
|
|
free(url);
|
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
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
INF("Name requested from %s to %s", url, name->fname);
|
|
|
|
free(url);
|
2012-10-12 03:27:08 -07:00
|
|
|
free(fname);
|
2011-04-07 23:14:10 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->names = eina_list_append(sd->names, name);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_NAME_LOAD, name);
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
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,state,busy,start", "elm");
|
|
|
|
return name;
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
|
|
|
|
2012-10-12 03:27:08 -07:00
|
|
|
static Eina_List *
|
|
|
|
_name_list_request(const Evas_Object *obj,
|
|
|
|
int method,
|
|
|
|
const char *address,
|
|
|
|
double lon,
|
|
|
|
double lat,
|
|
|
|
Elm_Map_Name_List_Cb name_cb,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
char *url;
|
|
|
|
Elm_Map_Name_List *name_list;
|
|
|
|
char *fname, fname2[PATH_MAX];
|
|
|
|
|
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_name, NULL);
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
2012-10-12 03:27:08 -07:00
|
|
|
|
|
|
|
fname = _prepare_download();
|
|
|
|
url = sd->src_name->url_cb
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->obj, method, address, lon, lat);
|
2012-10-12 03:27:08 -07:00
|
|
|
if (!url)
|
|
|
|
{
|
|
|
|
ERR("Name URL is NULL");
|
|
|
|
free(fname);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
name_list = ELM_NEW(Elm_Map_Name_List);
|
|
|
|
name_list->wsd = sd;
|
|
|
|
snprintf(fname2, sizeof(fname2), "%s/%d", fname, rand());
|
|
|
|
name_list->fname = strdup(fname2);
|
|
|
|
name_list->cb = name_cb;
|
|
|
|
name_list->data = data;
|
|
|
|
if (!ecore_file_download_full(url, name_list->fname, _name_list_cb,
|
|
|
|
NULL, name_list,
|
|
|
|
&(name_list->job), sd->ua) || !(name_list->job))
|
|
|
|
{
|
|
|
|
ERR("Can't request Name from %s to %s", url, name_list->fname);
|
|
|
|
free(name_list->fname);
|
|
|
|
free(name_list);
|
2014-04-03 03:16:14 -07:00
|
|
|
free(url);
|
2012-10-12 03:27:08 -07:00
|
|
|
free(fname);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
INF("Name requested from %s to %s", url, name_list->fname);
|
|
|
|
free(url);
|
|
|
|
free(fname);
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(wd->obj, ELM_MAP_EVENT_NAME_LOAD, name_list->names);
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
2012-10-12 03:27:08 -07:00
|
|
|
"elm,state,busy,start", "elm");
|
|
|
|
return name_list->names;
|
|
|
|
}
|
|
|
|
|
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_Event_Flags
|
2012-07-19 13:26:09 -07:00
|
|
|
_pinch_zoom_start_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *event_info EINA_UNUSED)
|
2011-04-17 23:42:47 -07:00
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(data, EVAS_EVENT_FLAG_NONE);
|
2011-04-17 23:42:47 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->pinch_zoom = sd->zoom_detail;
|
elm_map: block longpressed event when scrolled, zoomed, or rotated
Summary:
Currently, longpressed event can be called when map is
scrolled, zoomed or rotated. This might cause unintentional
result, because mouse need to be down at lease once to
execute scroll, zoom, or rotate, and longpressed event will start
when those events takes long enough time.
Reviewers: seoz, Hermet, woohyun, cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3195
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:42:35 -07:00
|
|
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
2012-07-19 13:26:09 -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
|
|
|
return EVAS_EVENT_FLAG_NONE;
|
|
|
|
}
|
2011-04-17 23:42:47 -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
|
|
|
static Evas_Event_Flags
|
2012-07-19 13:26:09 -07:00
|
|
|
_pinch_zoom_cb(void *data,
|
|
|
|
void *event_info)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
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-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EVAS_EVENT_FLAG_NONE);
|
|
|
|
|
|
|
|
if (!sd->paused)
|
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_Gesture_Zoom_Info *ei = event_info;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_zoom_do(sd, sd->pinch_zoom + ei->zoom - 1);
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
2012-07-19 13:26:09 -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
|
|
|
return EVAS_EVENT_FLAG_NONE;
|
|
|
|
}
|
2011-04-17 23:42:47 -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
|
|
|
static Evas_Event_Flags
|
2012-07-19 13:26:09 -07:00
|
|
|
_pinch_rotate_cb(void *data,
|
|
|
|
void *event_info)
|
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
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EVAS_EVENT_FLAG_NONE);
|
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-07-19 13:26:09 -07:00
|
|
|
if (!sd->paused)
|
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
|
|
|
{
|
|
|
|
int x, y, w, h;
|
|
|
|
Elm_Gesture_Rotate_Info *ei = event_info;
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
evas_object_geometry_get(sd->obj, &x, &y, &w, &h);
|
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-07-19 13:26:09 -07:00
|
|
|
sd->rotate.d = sd->rotate.a + ei->angle - ei->base_angle;
|
|
|
|
sd->rotate.cx = x + ((double)w * 0.5);
|
|
|
|
sd->rotate.cy = y + ((double)h * 0.5);
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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: block longpressed event when scrolled, zoomed, or rotated
Summary:
Currently, longpressed event can be called when map is
scrolled, zoomed or rotated. This might cause unintentional
result, because mouse need to be down at lease once to
execute scroll, zoom, or rotate, and longpressed event will start
when those events takes long enough time.
Reviewers: seoz, Hermet, woohyun, cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3195
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:42:35 -07:00
|
|
|
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
2012-07-19 13:26:09 -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
|
|
|
return EVAS_EVENT_FLAG_NONE;
|
2011-04-17 23:42:47 -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
|
|
|
static Evas_Event_Flags
|
2012-07-19 13:26:09 -07:00
|
|
|
_pinch_rotate_end_cb(void *data,
|
2014-01-06 06:30:02 -08:00
|
|
|
void *event_info EINA_UNUSED)
|
2011-04-07 23:14:10 -07:00
|
|
|
{
|
2013-04-24 04:41:37 -07:00
|
|
|
ELM_MAP_DATA_GET(data, sd);
|
2011-04-07 23:14:10 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EVAS_EVENT_FLAG_NONE);
|
|
|
|
|
|
|
|
sd->rotate.a = sd->rotate.d;
|
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
|
|
|
return EVAS_EVENT_FLAG_NONE;
|
|
|
|
}
|
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 void
|
2014-03-23 07:45:00 -07:00
|
|
|
_source_tile_set(Elm_Map_Data *sd,
|
2012-07-19 13:26:09 -07:00
|
|
|
const char *source_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
|
|
|
{
|
|
|
|
Source_Tile *s;
|
|
|
|
Eina_List *l;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(source_name);
|
|
|
|
|
|
|
|
if (sd->src_tile && !strcmp(sd->src_tile->name, source_name))
|
|
|
|
return;
|
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
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_tiles, l, s)
|
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 (!strcmp(s->name, source_name))
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->src_tile = s;
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-08-04 23:36:41 -07:00
|
|
|
if (!l)
|
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
|
|
|
{
|
|
|
|
ERR("source name (%s) is not found", source_name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->src_tile->zoom_max < sd->zoom)
|
|
|
|
sd->zoom = sd->src_tile->zoom_max;
|
|
|
|
else if (sd->src_tile->zoom_min > sd->zoom)
|
|
|
|
sd->zoom = sd->src_tile->zoom_min;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->src_tile->zoom_max < sd->zoom_max)
|
|
|
|
sd->zoom_max = sd->src_tile->zoom_max;
|
|
|
|
if (sd->src_tile->zoom_min > sd->zoom_min)
|
|
|
|
sd->zoom_min = sd->src_tile->zoom_min;
|
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
|
|
|
|
2016-12-05 21:17:31 -08:00
|
|
|
ELM_SAFE_FREE(sd->copyright, evas_object_del);
|
|
|
|
if (sd->src_tile->copyright_cb)
|
|
|
|
{
|
|
|
|
sd->copyright = sd->src_tile->copyright_cb(sd->obj);
|
|
|
|
if (sd->copyright)
|
|
|
|
{
|
|
|
|
evas_object_smart_member_add(sd->copyright, sd->pan_obj);
|
|
|
|
evas_object_stack_above(sd->copyright, sd->sep_maps_overlays);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_grid_all_clear(sd);
|
|
|
|
_grid_all_create(sd);
|
|
|
|
_zoom_do(sd, sd->zoom);
|
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
|
2014-03-23 07:45:00 -07:00
|
|
|
_source_route_set(Elm_Map_Data *sd,
|
2012-09-03 01:35:53 -07:00
|
|
|
const char *source_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
|
|
|
{
|
|
|
|
Source_Route *s;
|
2012-09-03 01:35:53 -07:00
|
|
|
Eina_List *l;
|
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
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(source_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
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
if (sd->src_route && !strcmp(sd->src_route->name, source_name))
|
|
|
|
return;
|
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
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_routes, l, s)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
if (!strcmp(s->name, source_name))
|
|
|
|
{
|
|
|
|
sd->src_route = s;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-08-04 23:36:41 -07:00
|
|
|
if (!l)
|
2012-09-03 01:35:53 -07:00
|
|
|
{
|
|
|
|
ERR("source name (%s) is not found", source_name);
|
|
|
|
return;
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-07 05:50:37 -08:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_source_name_set(Elm_Map_Data *sd,
|
2012-09-03 01:35:53 -07:00
|
|
|
const char *source_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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
Source_Name *s;
|
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
|
|
|
Eina_List *l;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(source_name);
|
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
if (sd->src_name && !strcmp(sd->src_name->name, source_name))
|
2012-07-19 13:26:09 -07:00
|
|
|
return;
|
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
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_names, l, s)
|
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 (!strcmp(s->name, source_name))
|
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_name = s;
|
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
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2016-08-04 23:36:41 -07:00
|
|
|
if (!l)
|
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
|
|
|
{
|
|
|
|
ERR("source name (%s) is not found", source_name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
2012-09-03 01:35:53 -07:00
|
|
|
_source_mod_cb(Eina_Module *m,
|
2012-07-19 13:26:09 -07:00
|
|
|
void *data)
|
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
|
|
|
{
|
|
|
|
const char *file;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Data *sd = data;
|
2015-09-02 03:20:04 -07:00
|
|
|
char *dir;
|
|
|
|
const char *subfile;
|
2012-09-03 01:35:53 -07:00
|
|
|
|
|
|
|
Elm_Map_Module_Source_Name_Func name_cb;
|
|
|
|
Elm_Map_Module_Tile_Url_Func tile_url_cb;
|
|
|
|
Elm_Map_Module_Tile_Scale_Func scale_cb;
|
2016-12-05 21:17:31 -08:00
|
|
|
Elm_Map_Module_Tile_Copyright_Func copyright_cb;
|
2012-09-03 01:35:53 -07:00
|
|
|
Elm_Map_Module_Tile_Zoom_Min_Func zoom_min;
|
|
|
|
Elm_Map_Module_Tile_Zoom_Max_Func zoom_max;
|
|
|
|
Elm_Map_Module_Tile_Geo_to_Coord_Func geo_to_coord;
|
|
|
|
Elm_Map_Module_Tile_Coord_to_Geo_Func coord_to_geo;
|
|
|
|
Elm_Map_Module_Route_Url_Func route_url_cb;
|
|
|
|
Elm_Map_Module_Name_Url_Func name_url_cb;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE);
|
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
|
|
|
|
|
|
|
file = eina_module_file_get(m);
|
2015-09-02 03:20:04 -07:00
|
|
|
if (!file) return EINA_FALSE;
|
|
|
|
|
|
|
|
dir = ecore_file_dir_get(file);
|
|
|
|
if (!dir) return EINA_FALSE;
|
|
|
|
subfile = ecore_file_file_get(dir);
|
|
|
|
if (!subfile)
|
|
|
|
{
|
|
|
|
free(dir);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
if (strcmp(subfile, MODULE_ARCH))
|
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
|
|
|
{
|
2015-09-02 03:20:04 -07:00
|
|
|
free(dir);
|
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
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
2015-09-02 03:20:04 -07:00
|
|
|
free(dir);
|
|
|
|
if (!eina_module_load(m)) return EINA_FALSE;
|
|
|
|
|
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_cb = eina_module_symbol_get(m, "map_module_source_name_get");
|
2012-09-03 01:35:53 -07:00
|
|
|
if ((!name_cb))
|
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
|
|
|
{
|
|
|
|
eina_module_unload(m);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Find TILE module
|
|
|
|
tile_url_cb = eina_module_symbol_get(m, "map_module_tile_url_get");
|
|
|
|
zoom_min = eina_module_symbol_get(m, "map_module_tile_zoom_min_get");
|
|
|
|
zoom_max = eina_module_symbol_get(m, "map_module_tile_zoom_max_get");
|
|
|
|
geo_to_coord = eina_module_symbol_get(m, "map_module_tile_geo_to_coord");
|
|
|
|
coord_to_geo = eina_module_symbol_get(m, "map_module_tile_coord_to_geo");
|
|
|
|
scale_cb = eina_module_symbol_get(m, "map_module_tile_scale_get");
|
2016-12-05 21:17:31 -08:00
|
|
|
copyright_cb = eina_module_symbol_get(m, "map_module_tile_copyright_get");
|
2012-09-03 01:35:53 -07:00
|
|
|
if (tile_url_cb && zoom_min && zoom_max && geo_to_coord && coord_to_geo &&
|
|
|
|
scale_cb)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
INF("Map TILE module is loaded \"%s\"", file);
|
|
|
|
Source_Tile *s;
|
|
|
|
s = ELM_NEW(Source_Tile);
|
|
|
|
s->name = name_cb();
|
|
|
|
s->url_cb = tile_url_cb;
|
|
|
|
s->zoom_min = zoom_min();
|
|
|
|
s->zoom_max = zoom_max();
|
|
|
|
s->geo_to_coord = geo_to_coord;
|
|
|
|
s->coord_to_geo = coord_to_geo;
|
|
|
|
s->scale_cb = scale_cb;
|
2016-12-05 21:17:31 -08:00
|
|
|
s->copyright_cb = copyright_cb;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_tiles = eina_list_append(sd->src_tiles, s);
|
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
|
|
|
}
|
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Find ROUTE module
|
|
|
|
route_url_cb = eina_module_symbol_get(m, "map_module_route_url_get");
|
|
|
|
if (route_url_cb)
|
|
|
|
{
|
|
|
|
INF("Map ROUTE module is loaded \"%s\"", file);
|
|
|
|
Source_Route *s;
|
2014-01-07 15:51:15 -08:00
|
|
|
s = ELM_NEW(Source_Route);
|
2012-09-03 01:35:53 -07:00
|
|
|
s->name = name_cb();
|
|
|
|
s->url_cb = route_url_cb;
|
2016-03-22 15:58:18 -07:00
|
|
|
s->route_parse_cb = eina_module_symbol_get(m, "map_module_route_source_parse");
|
|
|
|
if (!s->route_parse_cb)
|
|
|
|
s->route_parse_cb = _kml_parse;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_routes = eina_list_append(sd->src_routes, s);
|
|
|
|
}
|
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
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Find NAME module
|
|
|
|
name_url_cb = eina_module_symbol_get(m, "map_module_name_url_get");
|
|
|
|
if (name_url_cb)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
INF("Map NAME module is loaded \"%s\"", file);
|
|
|
|
Source_Name *s;
|
2014-01-07 15:51:15 -08:00
|
|
|
s = ELM_NEW(Source_Name);
|
2012-09-03 01:35:53 -07:00
|
|
|
s->name = name_cb();
|
|
|
|
s->url_cb = name_url_cb;
|
2016-03-22 15:58:18 -07:00
|
|
|
s->name_parse_cb = eina_module_symbol_get(m, "map_module_name_source_parse");
|
|
|
|
if (!s->name_parse_cb)
|
|
|
|
s->name_parse_cb = _name_parse;
|
|
|
|
s->name_list_parse_cb = eina_module_symbol_get(m, "map_module_name_list_source_parse");
|
|
|
|
if (!s->name_list_parse_cb)
|
|
|
|
s->name_list_parse_cb = _name_list_parse;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_names = eina_list_append(sd->src_names, s);
|
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
|
|
|
}
|
2012-09-03 01:35:53 -07:00
|
|
|
return EINA_TRUE;
|
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
|
|
|
}
|
|
|
|
|
2012-03-07 05:50:37 -08:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_source_all_unload(Elm_Map_Data *sd)
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
int idx = 0;
|
2012-09-03 01:35:53 -07:00
|
|
|
Source_Tile *s;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
for (idx = 0; sd->src_tile_names[idx]; idx++)
|
|
|
|
eina_stringshare_del(sd->src_tile_names[idx]);
|
2014-04-03 19:47:39 -07:00
|
|
|
free(sd->src_tile_names);
|
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
for (idx = 0; sd->src_route_names[idx]; idx++)
|
|
|
|
eina_stringshare_del(sd->src_route_names[idx]);
|
2014-04-03 19:47:39 -07:00
|
|
|
free(sd->src_route_names);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
for (idx = 0; sd->src_name_names[idx]; idx++)
|
|
|
|
eina_stringshare_del(sd->src_name_names[idx]);
|
2014-04-03 19:47:39 -07:00
|
|
|
free(sd->src_name_names);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-04-03 19:47:39 -07:00
|
|
|
EINA_LIST_FREE(sd->src_tiles, s)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(s->name);
|
|
|
|
free(s);
|
|
|
|
}
|
|
|
|
EINA_LIST_FREE(sd->src_routes, s)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(s->name);
|
|
|
|
free(s);
|
|
|
|
}
|
|
|
|
EINA_LIST_FREE(sd->src_names, s)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(s->name);
|
|
|
|
free(s);
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
eina_module_list_free(sd->src_mods);
|
2014-04-03 19:47:39 -07:00
|
|
|
eina_array_free(sd->src_mods);
|
2012-03-07 05:50:37 -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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_source_all_load(Elm_Map_Data *sd)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
Source_Tile *src_tile;
|
|
|
|
Source_Route *src_route;
|
|
|
|
Source_Name *src_name;
|
|
|
|
unsigned int idx;
|
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
|
|
|
Eina_List *l;
|
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Load hard coded TILE source
|
|
|
|
for (idx = 0; idx < (sizeof(src_tiles) / sizeof(Source_Tile)); idx++)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
src_tile = ELM_NEW(Source_Tile);
|
2014-04-03 19:47:39 -07:00
|
|
|
src_tile->name = eina_stringshare_add(src_tiles[idx].name);
|
2012-09-03 01:35:53 -07:00
|
|
|
src_tile->zoom_min = src_tiles[idx].zoom_min;
|
|
|
|
src_tile->zoom_max = src_tiles[idx].zoom_max;
|
|
|
|
src_tile->url_cb = src_tiles[idx].url_cb;
|
|
|
|
src_tile->geo_to_coord = src_tiles[idx].geo_to_coord;
|
|
|
|
src_tile->coord_to_geo = src_tiles[idx].coord_to_geo;
|
|
|
|
src_tile->scale_cb = src_tiles[idx].scale_cb;
|
2016-12-05 21:17:31 -08:00
|
|
|
src_tile->copyright_cb = src_tiles[idx].copyright_cb;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_tiles = eina_list_append(sd->src_tiles, src_tile);
|
|
|
|
}
|
|
|
|
// Load hard coded ROUTE source
|
|
|
|
for (idx = 0; idx < (sizeof(src_routes) / sizeof(Source_Route)); idx++)
|
|
|
|
{
|
|
|
|
src_route = ELM_NEW(Source_Route);
|
2014-04-03 19:47:39 -07:00
|
|
|
src_route->name = eina_stringshare_add(src_routes[idx].name);
|
2012-09-03 01:35:53 -07:00
|
|
|
src_route->url_cb = src_routes[idx].url_cb;
|
2016-03-22 15:58:18 -07:00
|
|
|
src_route->route_parse_cb = src_routes[idx].route_parse_cb;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_routes = eina_list_append(sd->src_routes, src_route);
|
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
|
|
|
}
|
2012-09-03 01:35:53 -07:00
|
|
|
// Load from hard coded NAME source
|
|
|
|
for (idx = 0; idx < (sizeof(src_names) / sizeof(Source_Name)); idx++)
|
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
|
|
|
{
|
2012-09-03 01:35:53 -07:00
|
|
|
src_name = ELM_NEW(Source_Name);
|
2014-04-03 19:47:39 -07:00
|
|
|
src_name->name = eina_stringshare_add(src_names[idx].name);
|
2012-09-03 01:35:53 -07:00
|
|
|
src_name->url_cb = src_names[idx].url_cb;
|
2016-03-22 15:58:18 -07:00
|
|
|
src_name->name_parse_cb = src_names[idx].name_parse_cb;
|
|
|
|
src_name->name_list_parse_cb = src_names[idx].name_list_parse_cb;
|
2012-09-03 01:35:53 -07:00
|
|
|
sd->src_names = eina_list_append(sd->src_names, src_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
|
|
|
}
|
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Load from modules
|
|
|
|
sd->src_mods = eina_module_list_get(sd->src_mods, MODULES_PATH, 1,
|
|
|
|
&_source_mod_cb, sd);
|
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
|
|
|
|
2012-09-03 01:35:53 -07:00
|
|
|
// Set default source
|
|
|
|
sd->src_tile = eina_list_nth(sd->src_tiles, 0);
|
|
|
|
sd->src_route = eina_list_nth(sd->src_routes, 0);
|
|
|
|
sd->src_name = eina_list_nth(sd->src_names, 0);
|
|
|
|
|
|
|
|
// Make name string of sources
|
|
|
|
idx = 0;
|
|
|
|
sd->src_tile_names = calloc((eina_list_count(sd->src_tiles) + 1),
|
|
|
|
sizeof(const char *));
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_tiles, l, src_tile)
|
2012-09-03 01:35:53 -07:00
|
|
|
{
|
|
|
|
eina_stringshare_replace(&sd->src_tile_names[idx], src_tile->name);
|
|
|
|
INF("source : %s", sd->src_tile_names[idx]);
|
|
|
|
idx++;
|
|
|
|
}
|
|
|
|
idx = 0;
|
|
|
|
sd->src_route_names = calloc((eina_list_count(sd->src_routes) + 1),
|
|
|
|
sizeof(const char *));
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_routes, l, src_route)
|
2012-09-03 01:35:53 -07:00
|
|
|
{
|
|
|
|
eina_stringshare_replace(&sd->src_route_names[idx], src_route->name);
|
|
|
|
INF("source : %s", sd->src_route_names[idx]);
|
|
|
|
idx++;
|
|
|
|
}
|
|
|
|
idx = 0;
|
|
|
|
sd->src_name_names = calloc((eina_list_count(sd->src_names) + 1),
|
|
|
|
sizeof(const char *));
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->src_names, l, src_name)
|
2012-09-03 01:35:53 -07:00
|
|
|
{
|
|
|
|
eina_stringshare_replace(&sd->src_name_names[idx], src_name->name);
|
|
|
|
INF("source : %s", sd->src_name_names[idx]);
|
|
|
|
idx++;
|
|
|
|
}
|
2012-03-07 05:50:37 -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
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_zoom_mode_set(Elm_Map_Data *sd, double zoom)
|
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
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
if (sd->mode == ELM_MAP_ZOOM_MODE_MANUAL)
|
|
|
|
{
|
|
|
|
if (sd->paused) _zoom_do(sd, zoom);
|
|
|
|
else _zoom_with_animation(sd, zoom, 10);
|
|
|
|
}
|
|
|
|
else
|
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 diff;
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord w, h;
|
|
|
|
Evas_Coord vw, vh;
|
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
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
w = sd->size.w;
|
|
|
|
h = sd->size.h;
|
|
|
|
_viewport_coord_get(sd, NULL, NULL, &vw, &vh);
|
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
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
if (sd->mode == ELM_MAP_ZOOM_MODE_AUTO_FIT)
|
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 ((w < vw) && (h < vh))
|
|
|
|
{
|
|
|
|
diff = 0.01;
|
|
|
|
while ((w < vw) && (h < vh))
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
zoom += diff;
|
2012-11-13 23:10:24 -08:00
|
|
|
w = pow(2.0, zoom) * sd->tsize;
|
|
|
|
h = pow(2.0, zoom) * sd->tsize;
|
2012-07-19 13:26:09 -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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
diff = -0.01;
|
|
|
|
while ((w > vw) || (h > vh))
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
zoom += diff;
|
2012-11-13 23:10:24 -08:00
|
|
|
w = pow(2.0, zoom) * sd->tsize;
|
|
|
|
h = pow(2.0, zoom) * sd->tsize;
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
2014-05-18 21:30:04 -07:00
|
|
|
zoom -= diff;
|
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
|
|
|
}
|
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-11-13 23:10:24 -08:00
|
|
|
else if (sd->mode == ELM_MAP_ZOOM_MODE_AUTO_FILL)
|
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 ((w < vw) || (h < vh))
|
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
|
|
|
diff = 0.01;
|
|
|
|
while ((w < vw) || (h < vh))
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
zoom += diff;
|
2012-11-13 23:10:24 -08:00
|
|
|
w = pow(2.0, zoom) * sd->tsize;
|
|
|
|
h = pow(2.0, zoom) * sd->tsize;
|
2012-07-19 13:26:09 -07: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
|
|
|
else
|
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
|
|
|
diff = -0.01;
|
|
|
|
while ((w > vw) && (h > vh))
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
zoom += diff;
|
2012-11-13 23:10:24 -08:00
|
|
|
w = pow(2.0, zoom) * sd->tsize;
|
|
|
|
h = pow(2.0, zoom) * sd->tsize;
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
2014-05-18 21:30:04 -07:00
|
|
|
zoom -= diff;
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
|
|
|
}
|
2012-11-13 23:10:24 -08:00
|
|
|
_zoom_do(sd, zoom);
|
2011-04-07 23:14:10 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-17 23:42:47 -07:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_region_show_bring_in(Elm_Map_Data *wsd, double lon, double lat, Eina_Bool bring_in)
|
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-11-13 23:10:24 -08:00
|
|
|
int x, y, w, h;
|
2011-04-17 23:42:47 -07:00
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(wsd);
|
2011-04-17 23:42:47 -07:00
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
_region_to_coord_convert
|
|
|
|
(wsd, lon, lat, wsd->size.w, &x, &y);
|
|
|
|
_viewport_coord_get(wsd, NULL, NULL, &w, &h);
|
|
|
|
x = x - (w / 2);
|
|
|
|
y = y - (h / 2);
|
2011-04-17 23:42:47 -07:00
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
if (bring_in) elm_interface_scrollable_region_bring_in(wsd->obj, x, y, w, h);
|
|
|
|
else elm_interface_scrollable_content_region_show(wsd->obj, x, y, w, h);
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
static void
|
2014-03-23 07:45:00 -07:00
|
|
|
_overlays_show(Elm_Map_Data *sd, Eina_List *overlays)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
double max_lon, min_lon, max_lat, min_lat, lon, lat;
|
|
|
|
int zoom, zoom_max;
|
|
|
|
Evas_Coord vw, vh;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlays);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
_region_max_min_get(overlays, &max_lon, &min_lon, &max_lat, &min_lat);
|
|
|
|
lon = (max_lon + min_lon) / 2;
|
|
|
|
lat = (max_lat + min_lat) / 2;
|
|
|
|
|
|
|
|
zoom = sd->src_tile->zoom_min;
|
|
|
|
_viewport_coord_get(sd, NULL, NULL, &vw, &vh);
|
|
|
|
if (sd->src_tile->zoom_max < sd->zoom_max)
|
|
|
|
zoom_max = sd->src_tile->zoom_max;
|
|
|
|
else zoom_max = sd->zoom_max;
|
|
|
|
while (zoom <= zoom_max)
|
|
|
|
{
|
|
|
|
Evas_Coord size, max_x, max_y, min_x, min_y;
|
|
|
|
|
|
|
|
size = pow(2.0, zoom) * sd->tsize;
|
|
|
|
_region_to_coord_convert
|
|
|
|
(sd, min_lon, max_lat, size, &min_x, &max_y);
|
|
|
|
_region_to_coord_convert
|
|
|
|
(sd, max_lon, min_lat, size, &max_x, &min_y);
|
|
|
|
if ((max_x - min_x) > vw || (max_y - min_y) > vh) break;
|
|
|
|
zoom++;
|
|
|
|
}
|
|
|
|
zoom--;
|
|
|
|
|
|
|
|
_zoom_do(sd, zoom);
|
|
|
|
_region_show_bring_in(sd, lon, lat, EINA_FALSE);
|
2012-03-22 03:40:04 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_pan_elm_pan_pos_set(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord x, Evas_Coord y)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
if ((x == psd->wsd->pan_x) && (y == psd->wsd->pan_y)) return;
|
|
|
|
|
|
|
|
psd->wsd->pan_x = x;
|
|
|
|
psd->wsd->pan_y = y;
|
|
|
|
|
|
|
|
evas_object_smart_changed(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_pan_elm_pan_pos_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd, Evas_Coord *x, Evas_Coord *y)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
if (x) *x = psd->wsd->pan_x;
|
|
|
|
if (y) *y = psd->wsd->pan_y;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_pan_elm_pan_pos_max_get(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord *x, Evas_Coord *y)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
Evas_Coord ow, oh;
|
|
|
|
|
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
|
|
|
|
ow = psd->wsd->size.w - ow;
|
|
|
|
oh = psd->wsd->size.h - oh;
|
|
|
|
|
|
|
|
if (ow < 0) ow = 0;
|
|
|
|
if (oh < 0) oh = 0;
|
|
|
|
if (x) *x = ow;
|
|
|
|
if (y) *y = oh;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_pan_elm_pan_pos_min_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *_pd EINA_UNUSED, Evas_Coord *x, Evas_Coord *y)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
if (x) *x = 0;
|
|
|
|
if (y) *y = 0;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_pan_elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd, Evas_Coord *w, Evas_Coord *h)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
if (w) *w = psd->wsd->size.w;
|
|
|
|
if (h) *h = psd->wsd->size.h;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
_elm_map_pan_efl_gfx_size_set(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
|
|
|
|
return;
|
|
|
|
|
|
|
|
efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
|
|
|
|
|
2013-04-24 04:41:37 -07:00
|
|
|
_sizing_eval(psd->wsd->obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
elm_map_zoom_mode_set(psd->wobj, psd->wsd->mode);
|
2012-11-13 23:10:24 -08:00
|
|
|
evas_object_smart_changed(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_map_pan_efl_canvas_group_group_calculate(Eo *obj, Elm_Map_Pan_Data *psd)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
|
|
|
Evas_Coord w, h;
|
|
|
|
|
|
|
|
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
|
|
|
if (w <= 0 || h <= 0) return;
|
|
|
|
|
|
|
|
_grid_place(psd->wsd);
|
2016-12-05 21:17:31 -08:00
|
|
|
if (psd->wsd->copyright)
|
|
|
|
_copyright_place(psd->wsd);
|
2012-11-13 23:10:24 -08:00
|
|
|
_overlay_place(psd->wsd);
|
|
|
|
_track_place(psd->wsd);
|
|
|
|
_calc_job(psd->wsd);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-10-10 20:39:05 -07:00
|
|
|
_elm_map_pan_efl_gfx_position_set(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
|
2012-11-13 23:10:24 -08:00
|
|
|
{
|
2016-10-10 20:39:05 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
|
|
|
|
return;
|
|
|
|
|
2016-10-17 03:28:14 -07:00
|
|
|
efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
|
2012-11-13 23:10:24 -08:00
|
|
|
evas_object_smart_changed(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2015-09-15 03:41:51 -07:00
|
|
|
_elm_map_elm_widget_on_focus(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
|
2013-06-06 09:13:37 -07:00
|
|
|
Eina_Bool int_ret = EINA_FALSE;
|
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
int_ret = elm_obj_widget_on_focus(efl_super(obj, MY_CLASS), NULL);
|
2014-03-23 07:45:00 -07:00
|
|
|
if (!int_ret) return EINA_FALSE;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
|
|
|
if (elm_widget_focus_get(obj))
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
edje_object_signal_emit
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, "elm,action,focus", "elm");
|
|
|
|
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
2012-03-07 05:50:37 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
edje_object_signal_emit
|
2012-11-25 22:32:53 -08:00
|
|
|
(wd->resize_obj, "elm,action,unfocus", "elm");
|
|
|
|
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
|
2012-03-07 05:50:37 -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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return EINA_TRUE;
|
2012-03-07 05:50:37 -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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_map_pan_efl_object_destructor(Eo *obj, Elm_Map_Pan_Data *psd)
|
2013-04-24 04:41:37 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_data_unref(psd->wobj, psd->wsd);
|
|
|
|
efl_destructor(efl_super(obj, MY_PAN_CLASS));
|
2013-04-24 04:41:37 -07:00
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_map_pan_class_constructor(Efl_Class *klass)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
evas_smart_legacy_type_register(MY_PAN_CLASS_NAME_LEGACY, klass);
|
|
|
|
}
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
#include "elm_map_pan.eo.c"
|
2012-11-25 22:32:53 -08:00
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
EOLIAN static Elm_Theme_Apply
|
2014-03-23 07:45:00 -07:00
|
|
|
_elm_map_elm_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED)
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, ELM_THEME_APPLY_FAILED);
|
|
|
|
Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED;
|
2016-08-15 06:44:41 -07:00
|
|
|
int_ret = elm_obj_widget_theme_apply(efl_super(obj, MY_CLASS));
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
if (!int_ret) return ELM_THEME_APPLY_FAILED;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2014-05-11 21:44:03 -07:00
|
|
|
|
|
|
|
elm_widget_theme_object_set
|
|
|
|
(obj, wd->resize_obj, "map", "base", elm_widget_style_get(obj));
|
|
|
|
|
2013-04-24 04:41:37 -07:00
|
|
|
_sizing_eval(obj);
|
2012-03-07 05:50:37 -08:00
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
return int_ret;
|
2012-03-07 05:50:37 -08:00
|
|
|
}
|
|
|
|
|
2014-04-14 22:52:06 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_key_action_move(Evas_Object *obj, const char *params)
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
2014-04-14 22:52:06 -07:00
|
|
|
const char *dir = params;
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2012-03-07 05:50:37 -08:00
|
|
|
Evas_Coord vh;
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Coord x, y;
|
2012-03-07 05:50:37 -08:00
|
|
|
Evas_Coord step_x, step_y, page_x, page_y;
|
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_content_pos_get(obj, &x, &y);
|
|
|
|
elm_interface_scrollable_step_size_get(obj, &step_x, &step_y);
|
|
|
|
elm_interface_scrollable_page_size_get(obj, &page_x, &page_y);
|
|
|
|
elm_interface_scrollable_content_viewport_geometry_get
|
|
|
|
(obj, NULL, NULL, NULL, &vh);
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2014-04-14 22:52:06 -07:00
|
|
|
if (!strcmp(dir, "left"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
x -= step_x;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "right"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
x += step_x;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "up"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
y -= step_y;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "down"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
y += step_y;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "prior"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
if (page_y < 0)
|
|
|
|
y -= -(page_y * vh) / 100;
|
|
|
|
else
|
|
|
|
y -= page_y;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "next"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
|
|
|
if (page_y < 0)
|
|
|
|
y += -(page_y * vh) / 100;
|
|
|
|
else
|
|
|
|
y += page_y;
|
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else return EINA_FALSE;
|
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_content_pos_set(obj, x, y, EINA_TRUE);
|
2014-04-14 22:52:06 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_key_action_zoom(Evas_Object *obj, const char *params)
|
|
|
|
{
|
|
|
|
ELM_MAP_DATA_GET(obj, sd);
|
|
|
|
const char *dir = params;
|
|
|
|
|
|
|
|
if (!strcmp(dir, "in"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_with_animation(sd, sd->zoom + 1, 10);
|
2012-03-07 05:50:37 -08:00
|
|
|
}
|
2014-04-14 22:52:06 -07:00
|
|
|
else if (!strcmp(dir, "out"))
|
2012-03-07 05:50:37 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_with_animation(sd, sd->zoom - 1, 10);
|
2012-03-07 05:50:37 -08:00
|
|
|
}
|
2014-03-23 07:45:00 -07:00
|
|
|
else return EINA_FALSE;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2014-04-14 22:52:06 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_elm_map_elm_widget_event(Eo *obj, Elm_Map_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info)
|
|
|
|
{
|
|
|
|
(void) src;
|
|
|
|
Evas_Event_Key_Down *ev = event_info;
|
2012-03-07 05:50:37 -08:00
|
|
|
|
2014-04-14 22:52:06 -07:00
|
|
|
if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE;
|
|
|
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
|
|
|
|
|
2015-12-21 04:55:23 -08:00
|
|
|
if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions))
|
2014-04-14 22:52:06 -07:00
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
2014-03-23 07:45:00 -07:00
|
|
|
return EINA_TRUE;
|
2012-03-07 05:50:37 -08:00
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_map_efl_canvas_group_group_add(Eo *obj, Elm_Map_Data *priv)
|
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
|
|
|
Evas_Coord minw, minh;
|
2014-03-23 07:45:00 -07:00
|
|
|
Elm_Map_Pan_Data *pan_data;
|
2013-02-16 05:39:59 -08:00
|
|
|
Evas_Object *edje;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2013-09-24 21:33:39 -07:00
|
|
|
elm_widget_sub_object_parent_add(obj);
|
2013-08-26 22:19:19 -07:00
|
|
|
|
2013-02-16 05:39:59 -08:00
|
|
|
edje = edje_object_add(evas_object_evas_get(obj));
|
2013-10-16 08:54:54 -07:00
|
|
|
elm_widget_resize_object_set(obj, edje, EINA_TRUE);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
elm_widget_theme_object_set
|
2013-02-16 05:39:59 -08:00
|
|
|
(obj, edje, "map", "base", elm_widget_style_get(obj));
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
priv->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));
|
|
|
|
evas_object_smart_member_add(priv->hit_rect, obj);
|
|
|
|
elm_widget_sub_object_add(obj, priv->hit_rect);
|
|
|
|
|
|
|
|
/* common scroller hit rectangle setup */
|
|
|
|
evas_object_color_set(priv->hit_rect, 0, 0, 0, 0);
|
|
|
|
evas_object_show(priv->hit_rect);
|
|
|
|
evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE);
|
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
|
|
|
elm_widget_can_focus_set(obj, EINA_TRUE);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
evas_object_event_callback_add
|
2013-04-24 04:41:37 -07:00
|
|
|
(obj, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_event_callback_add
|
2013-04-24 04:41:37 -07:00
|
|
|
(obj, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_event_callback_add
|
2013-04-24 04:41:37 -07:00
|
|
|
(obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_objects_set(obj, edje, priv->hit_rect);
|
|
|
|
elm_interface_scrollable_wheel_disabled_set(obj, EINA_TRUE);
|
|
|
|
elm_interface_scrollable_bounce_allow_set(obj, _elm_config->thumbscroll_bounce_enable, _elm_config->thumbscroll_bounce_enable);
|
2016-05-31 14:38:45 -07:00
|
|
|
elm_interface_scrollable_single_direction_set(obj, ELM_SCROLLER_SINGLE_DIRECTION_NONE);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
2013-04-24 04:41:37 -07:00
|
|
|
_changed_size_hints_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_animate_start_cb_set(obj, _scroll_animate_start_cb);
|
|
|
|
elm_interface_scrollable_animate_stop_cb_set(obj, _scroll_animate_stop_cb);
|
|
|
|
elm_interface_scrollable_scroll_cb_set(obj, _scroll_cb);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
priv->pan_obj = efl_add(MY_PAN_CLASS, evas_object_evas_get(obj));
|
|
|
|
pan_data = efl_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
|
|
|
|
efl_data_ref(obj, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
pan_data->wobj = obj;
|
2012-07-19 13:26:09 -07:00
|
|
|
pan_data->wsd = priv;
|
|
|
|
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_scrollable_extern_pan_set(obj, priv->pan_obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2013-02-16 05:39:59 -08:00
|
|
|
edje_object_size_min_calc(edje, &minw, &minh);
|
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_size_hint_min_set(obj, minw, minh);
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
priv->g_layer = elm_gesture_layer_add(obj);
|
|
|
|
if (!priv->g_layer)
|
|
|
|
ERR("elm_gesture_layer_add() failed");
|
|
|
|
|
|
|
|
elm_gesture_layer_attach(priv->g_layer, obj);
|
|
|
|
elm_gesture_layer_cb_set
|
|
|
|
(priv->g_layer, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START,
|
2013-04-24 04:41:37 -07:00
|
|
|
_pinch_zoom_start_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_gesture_layer_cb_set
|
|
|
|
(priv->g_layer, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_MOVE,
|
2013-04-24 04:41:37 -07:00
|
|
|
_pinch_zoom_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_gesture_layer_cb_set
|
|
|
|
(priv->g_layer, ELM_GESTURE_ROTATE, ELM_GESTURE_STATE_MOVE,
|
2013-04-24 04:41:37 -07:00
|
|
|
_pinch_rotate_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_gesture_layer_cb_set
|
|
|
|
(priv->g_layer, ELM_GESTURE_ROTATE, ELM_GESTURE_STATE_END,
|
2013-04-24 04:41:37 -07:00
|
|
|
_pinch_rotate_end_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_gesture_layer_cb_set
|
|
|
|
(priv->g_layer, ELM_GESTURE_ROTATE, ELM_GESTURE_STATE_ABORT,
|
2013-04-24 04:41:37 -07:00
|
|
|
_pinch_rotate_end_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
priv->sep_maps_overlays =
|
|
|
|
evas_object_rectangle_add(evas_object_evas_get(obj));
|
|
|
|
elm_widget_sub_object_add(obj, priv->sep_maps_overlays);
|
|
|
|
evas_object_smart_member_add(priv->sep_maps_overlays, priv->pan_obj);
|
|
|
|
|
|
|
|
priv->map = evas_map_new(EVAS_MAP_POINT);
|
|
|
|
|
|
|
|
_source_all_load(priv);
|
|
|
|
priv->zoom_min = priv->src_tile->zoom_min;
|
|
|
|
priv->zoom_max = priv->src_tile->zoom_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
|
|
|
// FIXME: Tile Provider is better to provide tile size!
|
2012-07-19 13:26:09 -07:00
|
|
|
priv->tsize = DEFAULT_TILE_SIZE;
|
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
|
|
|
|
|
|
|
srand(time(NULL));
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
priv->id = ((int)getpid() << 16) | id_num;
|
|
|
|
id_num++;
|
|
|
|
_grid_all_create(priv);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_do(priv, 0);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
priv->mode = ELM_MAP_ZOOM_MODE_MANUAL;
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2014-09-03 08:04:37 -07:00
|
|
|
if (!elm_need_efreet())
|
|
|
|
ERR("Efreet initialization failed!");
|
|
|
|
|
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 (!ecore_file_download_protocol_available("http://"))
|
2012-07-19 13:26:09 -07:00
|
|
|
ERR("Ecore must be built with curl support for the map widget!");
|
2016-12-05 21:17:31 -08:00
|
|
|
|
|
|
|
if (priv->src_tile->copyright_cb)
|
|
|
|
{
|
|
|
|
priv->copyright = priv->src_tile->copyright_cb(obj);
|
|
|
|
if (priv->copyright)
|
|
|
|
{
|
|
|
|
evas_object_smart_member_add(priv->copyright, priv->pan_obj);
|
|
|
|
evas_object_stack_above(priv->copyright, priv->sep_maps_overlays);
|
|
|
|
}
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_map_efl_canvas_group_group_del(Eo *obj, Elm_Map_Data *sd)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
|
|
|
Elm_Map_Route *r;
|
|
|
|
Elm_Map_Name *na;
|
|
|
|
Eina_List *l, *ll;
|
|
|
|
Evas_Object *track;
|
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH_SAFE(sd->routes, l, ll, r)
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_route_del(r);
|
|
|
|
|
|
|
|
eina_list_free(sd->routes);
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH_SAFE(sd->names, l, ll, na)
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_name_del(na);
|
|
|
|
|
|
|
|
eina_list_free(sd->names);
|
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH_SAFE(sd->overlays, l, ll, overlay)
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_del(overlay);
|
|
|
|
|
|
|
|
eina_list_free(sd->overlays);
|
|
|
|
eina_list_free(sd->group_overlays);
|
|
|
|
eina_list_free(sd->all_overlays);
|
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(sd->track, track)
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_del(track);
|
|
|
|
|
2014-01-21 06:16:41 -08:00
|
|
|
ecore_timer_del(sd->scr_timer);
|
|
|
|
ecore_timer_del(sd->long_timer);
|
|
|
|
eina_stringshare_del(sd->user_agent);
|
|
|
|
eina_hash_free(sd->ua);
|
|
|
|
ecore_timer_del(sd->zoom_timer);
|
2016-01-27 16:46:16 -08:00
|
|
|
_zoom_animator_set(sd, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
_grid_all_clear(sd);
|
|
|
|
// Removal of download list should be after grid clear.
|
2014-01-21 16:55:58 -08:00
|
|
|
ecore_idler_del(sd->download_idler);
|
2012-07-19 13:26:09 -07:00
|
|
|
eina_list_free(sd->download_list);
|
|
|
|
|
|
|
|
_source_all_unload(sd);
|
|
|
|
|
|
|
|
{
|
|
|
|
char buf[4096];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%s" CACHE_ROOT, efreet_cache_home_get());
|
|
|
|
if (!ecore_file_recursive_rm(buf))
|
|
|
|
ERR("Deletion of %s failed", buf);
|
|
|
|
}
|
|
|
|
|
2014-01-21 06:16:41 -08:00
|
|
|
ecore_timer_del(sd->loaded_timer);
|
2013-05-29 05:03:51 -07:00
|
|
|
if (sd->map) evas_map_free(sd->map);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
evas_object_del(sd->pan_obj);
|
|
|
|
sd->pan_obj = NULL;
|
|
|
|
|
2016-12-05 21:17:31 -08:00
|
|
|
ELM_SAFE_FREE(sd->copyright, evas_object_del);
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
2012-07-19 13:26:09 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-10-10 20:39:05 -07:00
|
|
|
_elm_map_efl_gfx_position_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
2016-10-10 20:39:05 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
|
|
|
|
return;
|
|
|
|
|
|
|
|
efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
evas_object_move(sd->hit_rect, x, y);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
_elm_map_efl_gfx_size_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord w, Evas_Coord h)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
- intercept
- smart resize (do stuff), super, super, super
- evas object resize
The new code is more like:
- intercept
- super, super, super, evas object resize
- do stuff
But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-11 00:54:31 -07:00
|
|
|
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
|
|
|
|
return;
|
|
|
|
|
|
|
|
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
evas_object_resize(sd->hit_rect, w, h);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_map_efl_canvas_group_group_member_add(Eo *obj, Elm_Map_Data *sd, Evas_Object *member)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_member_add(efl_super(obj, MY_CLASS), member);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
if (sd->hit_rect)
|
|
|
|
evas_object_raise(sd->hit_rect);
|
|
|
|
}
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_map_add(Evas_Object *parent)
|
2012-07-30 15:36:50 -07:00
|
|
|
{
|
2012-11-25 22:32:53 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2016-08-15 06:44:41 -07:00
|
|
|
Evas_Object *obj = efl_add(MY_CLASS, parent);
|
2012-11-25 22:32:53 -08:00
|
|
|
return obj;
|
2012-07-30 15:36:50 -07:00
|
|
|
}
|
|
|
|
|
2015-05-19 05:34:07 -07:00
|
|
|
EOLIAN static Eo *
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_map_efl_object_constructor(Eo *obj, Elm_Map_Data *sd)
|
2012-07-19 13:26:09 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
2012-11-25 22:32:53 -08:00
|
|
|
sd->obj = obj;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_IMAGE_MAP);
|
2015-05-19 05:34:07 -07:00
|
|
|
|
|
|
|
return obj;
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_zoom_set(Eo *obj, Elm_Map_Data *sd, int zoom)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
ELM_MAP_CHECK(obj);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
|
|
|
|
|
|
|
|
if (sd->mode != ELM_MAP_ZOOM_MODE_MANUAL) return;
|
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 (zoom < 0) zoom = 0;
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->zoom == zoom) return;
|
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
sd->calc_job.zoom = zoom;
|
|
|
|
sd->calc_job.zoom_mode_set = _zoom_mode_set;
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static int
|
|
|
|
_elm_map_zoom_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->zoom;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_zoom_mode_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Zoom_Mode mode)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if ((mode == ELM_MAP_ZOOM_MODE_MANUAL) && (sd->mode == !!mode)) return;
|
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
sd->mode = mode;
|
|
|
|
sd->calc_job.zoom = sd->zoom_detail;
|
|
|
|
sd->calc_job.zoom_mode_set = _zoom_mode_set;
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Zoom_Mode
|
|
|
|
_elm_map_zoom_mode_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->mode;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_zoom_max_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int zoom)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->zoom_max = zoom;
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static int
|
|
|
|
_elm_map_zoom_max_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, -1);
|
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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->zoom_max;
|
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-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_zoom_min_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int zoom)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(sd->src_tile);
|
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-07-19 13:26:09 -07:00
|
|
|
sd->zoom_min = zoom;
|
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-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static int
|
|
|
|
_elm_map_zoom_min_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, -1);
|
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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->zoom_min;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_region_bring_in(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
sd->calc_job.bring_in = EINA_TRUE;
|
|
|
|
sd->calc_job.lon = lon;
|
|
|
|
sd->calc_job.lat = lat;
|
|
|
|
sd->calc_job.region_show_bring_in = _region_show_bring_in;
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_region_show(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-11-13 23:10:24 -08:00
|
|
|
sd->calc_job.bring_in = EINA_FALSE;
|
|
|
|
sd->calc_job.lon = lon;
|
|
|
|
sd->calc_job.lat = lat;
|
|
|
|
sd->calc_job.region_show_bring_in = _region_show_bring_in;
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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
|
|
|
}
|
|
|
|
|
2014-05-28 01:08:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_region_zoom_bring_in(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int zoom, double lon, double lat)
|
|
|
|
{
|
|
|
|
_zoom_bring_with_animation(sd, zoom, lon, lat, ZOOM_ANIM_CNT, ZOOM_BRING_CNT);
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_region_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *lon, double *lat)
|
2012-11-25 22:32:53 -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 tlon, tlat;
|
2016-02-29 20:37:39 -08:00
|
|
|
Evas_Coord vx = 0, vy = 0, vw = 0, vh = 0;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_viewport_coord_get(sd, &vx, &vy, &vw, &vh);
|
|
|
|
_coord_to_region_convert
|
|
|
|
(sd, vx + vw / 2, vy + vh / 2, sd->size.w, &tlon, &tlat);
|
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 (lon) *lon = tlon;
|
|
|
|
if (lat) *lat = tlat;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_paused_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2013-10-05 01:14:50 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
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-07-19 13:26:09 -07:00
|
|
|
if (sd->paused == !!paused) return;
|
|
|
|
sd->paused = !!paused;
|
|
|
|
if (sd->paused)
|
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
|
|
|
{
|
2016-01-27 16:46:16 -08:00
|
|
|
if (_zoom_animator_set(sd, 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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_zoom_do(sd, sd->zoom);
|
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-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
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,state,busy,stop", "elm");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (sd->download_num >= 1)
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
2012-07-19 13:26:09 -07:00
|
|
|
"elm,state,busy,start", "elm");
|
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
|
|
|
}
|
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-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_elm_map_paused_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->paused;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_rotate_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double degree, Evas_Coord cx, Evas_Coord cy)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->rotate.d = degree;
|
|
|
|
sd->rotate.cx = cx;
|
|
|
|
sd->rotate.cy = cy;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2012-02-20 19:26:00 -08:00
|
|
|
}
|
2011-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_rotate_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double *degree, Evas_Coord *cx, Evas_Coord *cy)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (degree) *degree = sd->rotate.d;
|
|
|
|
if (cx) *cx = sd->rotate.cx;
|
|
|
|
if (cy) *cy = sd->rotate.cy;
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_wheel_disabled_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool disabled)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if ((!sd->wheel_disabled) && (disabled))
|
|
|
|
evas_object_event_callback_del_full
|
2013-04-24 04:41:37 -07:00
|
|
|
(obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
else if ((sd->wheel_disabled) && (!disabled))
|
|
|
|
evas_object_event_callback_add
|
2013-04-24 04:41:37 -07:00
|
|
|
(obj, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->wheel_disabled = !!disabled;
|
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-12-20 22:12:08 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_elm_map_wheel_disabled_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->wheel_disabled;
|
2011-12-20 22:12:08 -08:00
|
|
|
}
|
2010-03-09 08:27:46 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_tile_load_status_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, int *try_num, int *finish_num)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (try_num) *try_num = sd->try_num;
|
|
|
|
if (finish_num) *finish_num = sd->finish_num;
|
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] 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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_canvas_to_region_convert(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y, double *lon, double *lat)
|
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] 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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(lon);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(lat);
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_canvas_to_coord(sd, x, y, &x, &y);
|
|
|
|
_coord_to_region_convert(sd, x, y, sd->size.w, lon, lat);
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_region_to_canvas_convert(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat, Evas_Coord *x, Evas_Coord *y)
|
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
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(x);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(y);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
_region_to_coord_convert(sd, lon, lat, sd->size.w, x, y);
|
|
|
|
_coord_to_canvas(sd, *x, *y, x, y);
|
2012-03-07 05:50:37 -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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_user_agent_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, const char *user_agent)
|
2012-11-25 22:32:53 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(user_agent);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
eina_stringshare_replace(&sd->user_agent, user_agent);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (!sd->ua) sd->ua = eina_hash_string_small_new(NULL);
|
|
|
|
eina_hash_set(sd->ua, "User-Agent", sd->user_agent);
|
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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static const char*
|
|
|
|
_elm_map_user_agent_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
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
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->user_agent;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_source_set(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type, const char *source_name)
|
2012-11-25 22:32:53 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(source_name);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
if (type == ELM_MAP_SOURCE_TYPE_TILE) _source_tile_set(sd, source_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
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_ROUTE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_source_route_set(sd, source_name);
|
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_NAME)
|
|
|
|
_source_name_set(sd, source_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
|
|
|
else ERR("Not supported map source type: %d", type);
|
|
|
|
|
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-15 07:53:37 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static const char*
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_source_get(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_tile, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
if (type == ELM_MAP_SOURCE_TYPE_TILE) return sd->src_tile->name;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_ROUTE)
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->src_route->name;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_NAME)
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->src_name->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
|
|
|
else ERR("Not supported map source type: %d", type);
|
2014-03-23 07:45:00 -07:00
|
|
|
return 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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static const char**
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_sources_get(const Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Elm_Map_Source_Type type)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-23 07:45:00 -07:00
|
|
|
const char **ret;
|
|
|
|
ret = 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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
if (type == ELM_MAP_SOURCE_TYPE_TILE) ret = sd->src_tile_names;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_ROUTE)
|
2014-03-23 07:45:00 -07:00
|
|
|
ret = sd->src_route_names;
|
2012-07-19 13:26:09 -07:00
|
|
|
else if (type == ELM_MAP_SOURCE_TYPE_NAME)
|
2014-03-23 07:45:00 -07:00
|
|
|
ret = sd->src_name_names;
|
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
|
|
|
else ERR("Not supported map source type: %d", type);
|
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-11-25 22:32:53 -08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Route*
|
|
|
|
_elm_map_route_add(Eo *obj, Elm_Map_Data *sd, Elm_Map_Route_Type type, Elm_Map_Route_Method method, double flon, double flat, double tlon, double tlat, Elm_Map_Route_Cb route_cb, void *data)
|
|
|
|
{
|
|
|
|
Elm_Map_Route *ret;
|
|
|
|
ret = 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
|
|
|
char *url;
|
2012-07-19 13:26:09 -07:00
|
|
|
char *type_name;
|
|
|
|
Elm_Map_Route *route;
|
2012-06-12 07:50:15 -07:00
|
|
|
char fname[PATH_MAX], fname2[PATH_MAX];
|
2009-11-13 07:22:23 -08:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_route, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-06-12 07:50:15 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
snprintf(fname, sizeof(fname), "%s" CACHE_ROUTE_ROOT,
|
|
|
|
efreet_cache_home_get());
|
2012-06-12 07:50:15 -07:00
|
|
|
if (!ecore_file_exists(fname)) ecore_file_mkpath(fname);
|
|
|
|
}
|
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 (type == ELM_MAP_ROUTE_TYPE_MOTOCAR)
|
2012-07-19 13:26:09 -07:00
|
|
|
type_name = strdup(ROUTE_TYPE_MOTORCAR);
|
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
|
|
|
else if (type == ELM_MAP_ROUTE_TYPE_BICYCLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
type_name = strdup(ROUTE_TYPE_BICYCLE);
|
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
|
|
|
else if (type == ELM_MAP_ROUTE_TYPE_FOOT)
|
2012-07-19 13:26:09 -07:00
|
|
|
type_name = strdup(ROUTE_TYPE_FOOT);
|
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
|
|
|
else type_name = NULL;
|
2012-02-20 23:59:19 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
url = sd->src_route->url_cb(obj, type_name, method, flon, flat, tlon, tlat);
|
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 (!url)
|
|
|
|
{
|
|
|
|
ERR("Route URL is NULL");
|
2014-01-21 18:08:47 -08:00
|
|
|
free(type_name);
|
2014-03-23 07:45:00 -07:00
|
|
|
return ret;
|
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
|
|
|
}
|
2014-01-21 18:08:47 -08:00
|
|
|
free(type_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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
route = ELM_NEW(Elm_Map_Route);
|
|
|
|
route->wsd = sd;
|
2012-06-12 07:50:15 -07:00
|
|
|
snprintf(fname2, sizeof(fname2), "%s/%d", fname, rand());
|
|
|
|
route->fname = strdup(fname2);
|
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->type = type;
|
|
|
|
route->method = method;
|
|
|
|
route->flon = flon;
|
|
|
|
route->flat = flat;
|
|
|
|
route->tlon = tlon;
|
|
|
|
route->tlat = tlat;
|
|
|
|
route->cb = route_cb;
|
|
|
|
route->data = data;
|
|
|
|
|
|
|
|
if (!ecore_file_download_full(url, route->fname, _route_cb, NULL, route,
|
2012-07-19 13:26:09 -07:00
|
|
|
&(route->job), sd->ua) || !(route->job))
|
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
|
|
|
{
|
|
|
|
ERR("Can't request Route from %s to %s", url, route->fname);
|
|
|
|
free(route->fname);
|
|
|
|
free(route);
|
2014-04-03 03:16:14 -07:00
|
|
|
free(url);
|
2014-03-23 07:45:00 -07:00
|
|
|
return ret;
|
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
|
|
|
}
|
|
|
|
INF("Route requested from %s to %s", url, route->fname);
|
|
|
|
free(url);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->routes = eina_list_append(sd->routes, route);
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
(sd->obj, ELM_MAP_EVENT_ROUTE_LOAD, route);
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_signal_emit(wd->resize_obj,
|
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,state,busy,start", "elm");
|
2014-03-23 07:45:00 -07:00
|
|
|
ret = route;
|
|
|
|
|
|
|
|
return ret;
|
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-02-20 23:59:19 -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
|
|
|
EAPI void
|
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_del(Elm_Map_Route *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
|
|
|
{
|
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
|
|
|
Path_Waypoint *w;
|
|
|
|
Path_Node *n;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(route);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(route->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((route->wsd)->obj);
|
2012-07-19 13:26:09 -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
|
|
|
if (route->job) ecore_file_download_abort(route->job);
|
2011-12-12 19:48:18 -08:00
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(route->waypoint, w)
|
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
|
|
|
{
|
2014-01-21 17:12:44 -08:00
|
|
|
eina_stringshare_del(w->point);
|
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
|
|
|
free(w);
|
|
|
|
}
|
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
|
|
|
|
2013-03-08 20:23:42 -08:00
|
|
|
EINA_LIST_FREE(route->nodes, 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
|
|
|
{
|
2014-01-21 17:12:44 -08:00
|
|
|
eina_stringshare_del(n->pos.address);
|
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
|
|
|
free(n);
|
|
|
|
}
|
2011-05-11 18:54:01 -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
|
|
|
if (route->fname)
|
|
|
|
{
|
|
|
|
ecore_file_remove(route->fname);
|
|
|
|
free(route->fname);
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
route->wsd->routes = eina_list_remove(route->wsd->routes, route);
|
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
|
|
|
free(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
|
|
|
}
|
2011-04-01 04:26:58 -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
|
|
|
EAPI double
|
|
|
|
elm_map_route_distance_get(const Elm_Map_Route *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
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route, 0.0);
|
|
|
|
return route->info.distance;
|
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
|
|
|
}
|
2011-05-06 23:32:34 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EAPI const char *
|
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_node_get(const Elm_Map_Route *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
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route, NULL);
|
|
|
|
return route->info.nodes;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EAPI const char *
|
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_waypoint_get(const Elm_Map_Route *route)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route, NULL);
|
|
|
|
return route->info.waypoints;
|
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
|
|
|
}
|
2011-04-01 04:26:58 -07:00
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Name*
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_name_add(const Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, const char *address, double lon, double lat, Elm_Map_Name_Cb name_cb, void *data)
|
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
|
|
|
{
|
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 (address)
|
2014-03-23 07:45:00 -07:00
|
|
|
return _name_request(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0, 0,
|
2012-07-19 13:26:09 -07:00
|
|
|
name_cb, data);
|
|
|
|
else
|
2014-03-23 07:45:00 -07:00
|
|
|
return _name_request(obj, ELM_MAP_NAME_METHOD_REVERSE, NULL, 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
|
|
|
name_cb, data);
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2014-07-22 03:59:41 -07:00
|
|
|
EOLIAN static void
|
2015-06-25 04:21:00 -07:00
|
|
|
_elm_map_name_search(const Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, const char *address, Elm_Map_Name_List_Cb name_cb, void *data)
|
2012-10-12 03:27:08 -07:00
|
|
|
{
|
|
|
|
if (address)
|
|
|
|
_name_list_request(obj, ELM_MAP_NAME_METHOD_SEARCH, address, 0, 0,
|
|
|
|
name_cb, data);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
EAPI void
|
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_name_del(Elm_Map_Name *name)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(name);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(name->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((name->wsd)->obj);
|
2011-04-27 22:40:48 -07:00
|
|
|
|
2014-01-21 18:08:47 -08:00
|
|
|
ecore_file_download_abort(name->job);
|
|
|
|
free(name->address);
|
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 (name->fname)
|
|
|
|
{
|
|
|
|
ecore_file_remove(name->fname);
|
|
|
|
free(name->fname);
|
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
name->wsd->names = eina_list_remove(name->wsd->names, 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
|
|
|
free(name);
|
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
|
|
|
}
|
|
|
|
|
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
|
|
|
EAPI const char *
|
|
|
|
elm_map_name_address_get(const Elm_Map_Name *name)
|
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
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(name->wsd, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((name->wsd)->obj) 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
|
|
|
|
|
|
|
return name->address;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_name_region_get(const Elm_Map_Name *name,
|
|
|
|
double *lon,
|
|
|
|
double *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
|
|
|
{
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(name);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(name->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((name->wsd)->obj);
|
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
|
|
|
|
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 (lon) *lon = name->lon;
|
|
|
|
if (lat) *lat = name->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
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
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
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_DEFAULT;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xff;
|
|
|
|
overlay->c.g = 0xff;
|
|
|
|
overlay->c.b = 0xff;
|
|
|
|
overlay->c.a = 0xff;
|
2012-03-21 22:23:19 -07:00
|
|
|
overlay->ovl = _overlay_default_new(overlay, lon, lat, overlay->c, 1);
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
|
|
|
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Eina_List *
|
|
|
|
_elm_map_overlays_get(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-05-23 03:29:03 -07:00
|
|
|
Eina_List *l;
|
|
|
|
Elm_Map_Overlay *ovl;
|
|
|
|
|
2013-04-10 04:28:22 -07:00
|
|
|
sd->all_overlays = eina_list_free(sd->all_overlays);
|
2012-05-23 03:29:03 -07:00
|
|
|
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->overlays, l, ovl)
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->all_overlays = eina_list_append(sd->all_overlays, ovl);
|
2012-10-01 00:36:27 -07:00
|
|
|
EINA_LIST_FOREACH(sd->group_overlays, l, ovl)
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->all_overlays = eina_list_append(sd->all_overlays, ovl);
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return sd->all_overlays;
|
2012-05-23 03:29:03 -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
|
|
|
EAPI void
|
|
|
|
elm_map_overlay_del(Elm_Map_Overlay *overlay)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2011-04-27 22:40:48 -07:00
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-03-02 04:10:48 -08:00
|
|
|
((overlay->wsd)->obj, ELM_MAP_EVENT_OVERLAY_DEL, overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->del_cb)
|
|
|
|
overlay->del_cb
|
2012-11-25 22:32:53 -08:00
|
|
|
(overlay->del_cb_data, (overlay->wsd)->obj, overlay);
|
2012-06-16 05:50:54 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (overlay->grp)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (overlay->grp->klass)
|
|
|
|
elm_map_overlay_class_remove(overlay->grp->klass, overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_group_free(overlay->grp);
|
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
|
|
|
}
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_free(overlay->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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_bubble_free(overlay->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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_free(overlay->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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_ROUTE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_route_free(overlay->ovl);
|
2012-03-22 03:40:04 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_LINE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_line_free(overlay->ovl);
|
2012-03-22 03:40:04 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_POLYGON)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_polygon_free(overlay->ovl);
|
2012-03-22 03:40:04 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CIRCLE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_circle_free(overlay->ovl);
|
2012-03-22 03:40:04 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_SCALE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_scale_free(overlay->ovl);
|
2012-03-21 22:23:19 -07:00
|
|
|
else ERR("Invalid overlay type: %d", overlay->type);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->wsd->overlays = eina_list_remove(overlay->wsd->overlays, overlay);
|
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
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
|
|
|
|
|
|
|
free(overlay);
|
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
|
|
|
EAPI Elm_Map_Overlay_Type
|
|
|
|
elm_map_overlay_type_get(const Elm_Map_Overlay *overlay)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, ELM_MAP_OVERLAY_TYPE_NONE);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, ELM_MAP_OVERLAY_TYPE_NONE);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) ELM_MAP_OVERLAY_TYPE_NONE;
|
2012-02-20 23:59:19 -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
|
|
|
return overlay->type;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_data_set(Elm_Map_Overlay *overlay,
|
|
|
|
void *data)
|
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] 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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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
|
|
|
|
|
|
|
overlay->data = data;
|
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
|
|
|
EAPI void *
|
|
|
|
elm_map_overlay_data_get(const Elm_Map_Overlay *overlay)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) NULL;
|
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
|
|
|
return overlay->data;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
|
|
|
|
2009-12-18 13:28:06 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_hide_set(Elm_Map_Overlay *overlay,
|
|
|
|
Eina_Bool hide)
|
2009-12-18 13:28:06 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2011-04-27 22:40:48 -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
|
|
|
if (overlay->hide == !!hide) return;
|
|
|
|
overlay->hide = hide;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2009-12-18 13:28:06 -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
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_map_overlay_hide_get(const Elm_Map_Overlay *overlay)
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, EINA_FALSE);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, EINA_FALSE);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) EINA_FALSE;
|
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
|
|
|
|
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
|
|
|
return overlay->hide;
|
2009-11-13 07:22:23 -08:00
|
|
|
}
|
2009-11-15 07:53:37 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_displayed_zoom_min_set(Elm_Map_Overlay *overlay,
|
|
|
|
int zoom)
|
2009-12-18 13:28:06 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2009-11-15 07:53:37 -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
|
|
|
overlay->zoom_min = zoom;
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2011-01-10 21:48:28 -08:00
|
|
|
}
|
2011-08-03 14:05:20 -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
|
|
|
EAPI int
|
|
|
|
elm_map_overlay_displayed_zoom_min_get(const Elm_Map_Overlay *overlay)
|
2009-11-15 07:53:37 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, 0);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, 0);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) 0;
|
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
|
|
|
|
|
|
|
return overlay->zoom_min;
|
2009-11-15 07:53:37 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_paused_set(Elm_Map_Overlay *overlay,
|
|
|
|
Eina_Bool paused)
|
2009-11-15 07:53:37 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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 (overlay->paused == !!paused) return;
|
|
|
|
overlay->paused = paused;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2009-11-15 07:53:37 -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
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_map_overlay_paused_get(const Elm_Map_Overlay *overlay)
|
2011-04-17 23:42:47 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, EINA_FALSE);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, EINA_FALSE);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) EINA_FALSE;
|
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
|
|
|
|
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
|
|
|
return overlay->paused;
|
2011-04-17 23:42:47 -07:00
|
|
|
}
|
2009-11-15 07:53:37 -08:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_map_overlay_visible_get(const Elm_Map_Overlay *overlay)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, EINA_FALSE);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, EINA_FALSE);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) EINA_FALSE;
|
2012-05-23 03:29:03 -07:00
|
|
|
|
|
|
|
return overlay->visible;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
EAPI void
|
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_show(Elm_Map_Overlay *overlay)
|
2011-04-17 23:42:47 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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
|
|
|
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
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
|
|
|
{
|
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
|
|
|
Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
elm_map_region_show
|
2012-11-25 22:32:53 -08:00
|
|
|
((overlay->wsd)->obj, ovl->lon, ovl->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
|
|
|
}
|
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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
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
|
|
|
{
|
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
|
|
|
Overlay_Bubble *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
|
|
|
elm_map_region_show
|
2012-11-25 22:32:53 -08:00
|
|
|
((overlay->wsd)->obj, ovl->lon, ovl->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
|
|
|
}
|
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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
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
|
|
|
{
|
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
|
|
|
Overlay_Class *ovl = overlay->ovl;
|
|
|
|
double lon, lat, max_lo, min_lo, max_la, min_la;
|
2012-07-19 13:26:09 -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
|
|
|
_region_max_min_get(ovl->members, &max_lo, &min_lo, &max_la, &min_la);
|
|
|
|
lon = (max_lo + min_lo) / 2;
|
|
|
|
lat = (max_la + min_la) / 2;
|
2012-11-25 22:32:53 -08:00
|
|
|
elm_map_region_show((overlay->wsd)->obj, 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
|
|
|
}
|
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
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
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-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2011-04-21 01:55:02 -07:00
|
|
|
}
|
|
|
|
|
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
|
|
|
EAPI void
|
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_overlays_show(Eina_List *overlays)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlays);
|
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(eina_list_count(overlays));
|
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
|
|
|
|
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
|
|
|
overlay = eina_list_data_get(overlays);
|
|
|
|
|
2012-11-13 23:10:24 -08:00
|
|
|
overlay->wsd->calc_job.overlays = overlays;
|
|
|
|
overlay->wsd->calc_job.overlays_show = _overlays_show;
|
|
|
|
|
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
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
|
|
|
}
|
|
|
|
|
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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_region_set(Elm_Map_Overlay *overlay,
|
|
|
|
double lon,
|
|
|
|
double lat)
|
2009-11-15 07:53:37 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
|
|
|
{
|
|
|
|
Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
ovl->lon = lon;
|
|
|
|
ovl->lat = lat;
|
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
|
|
|
{
|
|
|
|
Overlay_Bubble *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
ovl->pobj = 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
|
|
|
ovl->lon = lon;
|
|
|
|
ovl->lat = lat;
|
|
|
|
}
|
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
2009-12-20 08:34:45 -08:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2009-11-15 07:53:37 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_region_get(const Elm_Map_Overlay *overlay,
|
|
|
|
double *lon,
|
|
|
|
double *lat)
|
2009-11-18 13:07:01 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2011-04-01 04:26:58 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_GROUP)
|
|
|
|
{
|
|
|
|
Overlay_Group *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-05-23 03:29:03 -07:00
|
|
|
if (lon) *lon = ovl->lon;
|
|
|
|
if (lat) *lat = ovl->lat;
|
2012-03-21 22:23:19 -07:00
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
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
|
|
|
{
|
|
|
|
const Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
if (lon) *lon = ovl->lon;
|
|
|
|
if (lat) *lat = ovl->lat;
|
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_BUBBLE)
|
|
|
|
{
|
|
|
|
const Overlay_Bubble *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
if (lon) *lon = ovl->lon;
|
|
|
|
if (lat) *lat = ovl->lat;
|
|
|
|
}
|
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
2009-11-18 13:07:01 -08:00
|
|
|
}
|
|
|
|
|
2011-03-10 02:19:32 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_icon_set(Elm_Map_Overlay *overlay,
|
|
|
|
Evas_Object *icon)
|
2011-03-10 02:19:32 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(icon);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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
|
|
|
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_icon_update(overlay->ovl, icon);
|
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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_icon_update(overlay->ovl, icon);
|
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
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2011-03-10 02:19:32 -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
|
|
|
EAPI const Evas_Object *
|
|
|
|
elm_map_overlay_icon_get(const Elm_Map_Overlay *overlay)
|
2009-11-18 13:07:01 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) 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
|
|
|
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
|
|
|
{
|
|
|
|
const Overlay_Default *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
return ovl->icon;
|
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
|
|
|
}
|
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
|
|
|
{
|
|
|
|
const Overlay_Class *ovl = overlay->ovl;
|
2012-07-19 13:26:09 -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
|
|
|
return ovl->icon;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("Not supported overlay type: %d", overlay->type);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-11-18 13:07:01 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_content_set(Elm_Map_Overlay *overlay,
|
|
|
|
Evas_Object *content)
|
2009-11-18 13:07:01 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(content);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2009-11-18 13:07:01 -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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_content_update(overlay->ovl, content, overlay);
|
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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_content_update(overlay->ovl, content);
|
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
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(overlay->wsd->pan_obj);
|
2009-11-18 13:07:01 -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
|
|
|
EAPI const Evas_Object *
|
|
|
|
elm_map_overlay_content_get(const Elm_Map_Overlay *overlay)
|
2009-11-18 13:07:01 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(overlay->wsd, NULL);
|
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj) 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
|
|
|
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
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
|
|
|
{
|
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
|
|
|
const Overlay_Default *ovl = overlay->ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl->content;
|
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
|
|
|
}
|
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
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
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
|
|
|
{
|
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
|
|
|
const Overlay_Class *ovl = overlay->ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl->content;
|
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
|
|
|
}
|
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
|
|
|
else
|
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
|
|
|
{
|
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
|
|
|
ERR("Not supported overlay type: %d", overlay->type);
|
|
|
|
return 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-18 13:07:01 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_color_set(Elm_Map_Overlay *overlay,
|
|
|
|
int r,
|
|
|
|
int g,
|
|
|
|
int b,
|
|
|
|
int a)
|
2009-11-18 13:07:01 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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-21 22:23:19 -07:00
|
|
|
overlay->c.r = r;
|
|
|
|
overlay->c.g = g;
|
|
|
|
overlay->c.b = b;
|
|
|
|
overlay->c.a = a;
|
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_color_update(overlay->ovl, overlay->c);
|
2012-03-21 22:23:19 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_color_update(overlay->ovl, overlay->c);
|
2012-03-21 22:23:19 -07:00
|
|
|
else if (overlay->type == ELM_MAP_OVERLAY_TYPE_ROUTE)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_route_color_update(overlay->ovl, overlay->c);
|
2012-03-21 22:23:19 -07:00
|
|
|
else
|
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-21 22:23:19 -07:00
|
|
|
ERR("Not supported overlay type: %d", overlay->type);
|
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-18 13:07:01 -08:00
|
|
|
}
|
|
|
|
|
2009-12-07 10:05:04 -08:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_color_get(const Elm_Map_Overlay *overlay,
|
|
|
|
int *r,
|
|
|
|
int *g,
|
|
|
|
int *b,
|
|
|
|
int *a)
|
2009-11-21 14:38:07 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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 (overlay->type == ELM_MAP_OVERLAY_TYPE_ROUTE)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
if (r) *r = overlay->c.r;
|
|
|
|
if (g) *g = overlay->c.g;
|
|
|
|
if (b) *b = overlay->c.b;
|
|
|
|
if (a) *a = overlay->c.a;
|
|
|
|
}
|
2012-03-21 22:23:19 -07:00
|
|
|
else ERR("Not supported overlay type: %d", overlay->type);
|
2009-11-21 14:38:07 -08:00
|
|
|
}
|
2009-11-18 13:07:01 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_get_cb_set(Elm_Map_Overlay *overlay,
|
|
|
|
Elm_Map_Overlay_Get_Cb get_cb,
|
|
|
|
void *data)
|
2009-12-20 08:34:45 -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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
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
|
|
|
|
|
|
|
overlay->cb = get_cb;
|
|
|
|
overlay->cb_data = data;
|
2012-03-21 22:23:19 -07:00
|
|
|
|
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_CLASS)
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_class_cb_set(overlay->ovl, get_cb, data);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
2012-06-16 05:50:54 -07:00
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_del_cb_set(Elm_Map_Overlay *overlay,
|
|
|
|
Elm_Map_Overlay_Del_Cb del_cb,
|
|
|
|
void *data)
|
2012-06-16 05:50:54 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2012-06-16 05:50:54 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->del_cb = del_cb;
|
|
|
|
overlay->del_cb_data = data;
|
2012-06-16 05:50:54 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_class_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
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
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_CLASS;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_class_new(sd);
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xff;
|
|
|
|
overlay->c.g = 0xff;
|
|
|
|
overlay->c.b = 0xff;
|
2012-03-21 22:23:19 -07:00
|
|
|
overlay->c.a = 0xff;
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2009-12-20 08:34:45 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_class_append(Elm_Map_Overlay *klass,
|
|
|
|
Elm_Map_Overlay *overlay)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Class *class_ovl;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass);
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((klass->wsd)->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(klass->type == ELM_MAP_OVERLAY_TYPE_CLASS);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
class_ovl = klass->ovl;
|
|
|
|
if (eina_list_data_find(class_ovl->members, overlay))
|
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
|
|
|
{
|
2012-03-21 22:23:19 -07:00
|
|
|
ERR("Already added overlay into clas");
|
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
|
|
|
return;
|
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
class_ovl->members = eina_list_append(class_ovl->members, overlay);
|
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
|
|
|
|
2012-03-21 22:23:19 -07:00
|
|
|
// Update group by class
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->grp->klass = klass;
|
|
|
|
_overlay_group_icon_update(overlay->grp, class_ovl->icon);
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_group_content_update(overlay->grp, class_ovl->content, overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_group_color_update(overlay->grp, klass->c);
|
|
|
|
_overlay_group_cb_set(overlay->grp, klass->cb, klass->data);
|
2012-03-21 22:23:19 -07:00
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
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
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_icon_update(overlay->ovl, class_ovl->icon);
|
|
|
|
_overlay_default_class_content_update
|
|
|
|
(overlay->ovl, class_ovl->content);
|
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
|
|
|
}
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(klass->wsd->pan_obj);
|
2009-12-20 08:34:45 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_class_remove(Elm_Map_Overlay *klass,
|
|
|
|
Elm_Map_Overlay *overlay)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Class *ovl;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass);
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((klass->wsd)->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(klass->type == ELM_MAP_OVERLAY_TYPE_CLASS);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = klass->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
|
|
|
ovl->members = eina_list_remove(ovl->members, overlay);
|
2012-03-21 22:23:19 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->grp->klass = NULL;
|
2012-03-21 22:23:19 -07:00
|
|
|
_overlay_group_icon_update(overlay->grp, NULL);
|
2012-10-12 07:51:45 -07:00
|
|
|
_overlay_group_content_update(overlay->grp, NULL, NULL);
|
2012-03-21 22:23:19 -07:00
|
|
|
if (overlay->type == ELM_MAP_OVERLAY_TYPE_DEFAULT)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
_overlay_default_class_icon_update(overlay->ovl, NULL);
|
|
|
|
_overlay_default_class_content_update(overlay->ovl, NULL);
|
2012-03-21 22:23:19 -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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(klass->wsd->pan_obj);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_class_zoom_max_set(Elm_Map_Overlay *klass,
|
|
|
|
int zoom)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Class *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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(klass->wsd);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((klass->wsd)->obj);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(klass->type == ELM_MAP_OVERLAY_TYPE_CLASS);
|
|
|
|
|
|
|
|
ovl = klass->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
|
|
|
if (ovl->zoom_max == !!zoom) return;
|
|
|
|
ovl->zoom_max = zoom;
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(klass->wsd->pan_obj);
|
2009-12-20 08:34:45 -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
|
|
|
EAPI int
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_class_zoom_max_get(const Elm_Map_Overlay *klass)
|
2009-12-20 10:48:31 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
const Overlay_Class *ovl;
|
|
|
|
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(klass, OVERLAY_CLASS_ZOOM_MAX);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(klass->wsd, OVERLAY_CLASS_ZOOM_MAX);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((klass->wsd)->obj) OVERLAY_CLASS_ZOOM_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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
|
|
|
(klass->type == ELM_MAP_OVERLAY_TYPE_CLASS, OVERLAY_CLASS_ZOOM_MAX);
|
|
|
|
|
|
|
|
ovl = klass->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
|
|
|
return ovl->zoom_max;
|
2009-12-20 10:48:31 -08:00
|
|
|
}
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
EAPI Eina_List *
|
|
|
|
elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Group *ovl;
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(grp, NULL);
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(grp->wsd, NULL);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((grp->wsd)->obj) NULL;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
|
|
|
(grp->type == ELM_MAP_OVERLAY_TYPE_GROUP, NULL);
|
|
|
|
|
|
|
|
ovl = grp->ovl;
|
2012-03-22 03:40:04 -07:00
|
|
|
return ovl->members;
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_bubble_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2009-12-20 12:40:55 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
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
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_BUBBLE;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xff;
|
|
|
|
overlay->c.g = 0xff;
|
|
|
|
overlay->c.b = 0xff;
|
|
|
|
overlay->c.a = 0xff;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_bubble_new(overlay);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, 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-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2009-12-20 12:40:55 -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
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_bubble_follow(Elm_Map_Overlay *bubble,
|
|
|
|
const Elm_Map_Overlay *parent)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Bubble *ovl;
|
|
|
|
Evas_Object *pobj;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(parent);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((bubble->wsd)->obj);
|
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
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(bubble->type == ELM_MAP_OVERLAY_TYPE_BUBBLE);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = bubble->ovl;
|
|
|
|
pobj = _overlay_obj_get(parent);
|
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 (!pobj) return;
|
|
|
|
|
|
|
|
ovl->pobj = pobj;
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(bubble->wsd->pan_obj);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_bubble_content_append(Elm_Map_Overlay *bubble,
|
|
|
|
Evas_Object *content)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Bubble *bb;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(content);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((bubble->wsd)->obj);
|
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
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(bubble->type == ELM_MAP_OVERLAY_TYPE_BUBBLE);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
bb = bubble->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
|
|
|
elm_box_pack_end(bb->bx, content);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(bubble->wsd->pan_obj);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_map_overlay_bubble_content_clear(Elm_Map_Overlay *bubble)
|
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Bubble *bb;
|
|
|
|
|
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
|
|
|
EINA_SAFETY_ON_NULL_RETURN(bubble);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((bubble->wsd)->obj);
|
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
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(bubble->type == ELM_MAP_OVERLAY_TYPE_BUBBLE);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
bb = bubble->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
|
|
|
elm_box_clear(bb->bx);
|
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-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(bubble->wsd->pan_obj);
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_route_add(Eo *obj, Elm_Map_Data *sd, const Elm_Map_Route *route)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route, NULL);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(route->wsd, NULL);
|
|
|
|
EINA_SAFETY_ON_FALSE_RETURN_VAL
|
|
|
|
(obj == (route->wsd)->obj, 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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
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
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_ROUTE;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0x11;
|
|
|
|
overlay->c.g = 0x11;
|
|
|
|
overlay->c.b = 0xcc;
|
|
|
|
overlay->c.a = 0xcc;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_route_new(sd, route, overlay->c);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_line_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double flon, double flat, double tlon, double tlat)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_LINE;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0x11;
|
|
|
|
overlay->c.g = 0xcc;
|
|
|
|
overlay->c.b = 0x11;
|
|
|
|
overlay->c.a = 0xcc;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_line_new(sd, flon, flat, tlon, tlat, overlay->c);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_polygon_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_POLYGON;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xcc;
|
|
|
|
overlay->c.g = 0x77;
|
|
|
|
overlay->c.b = 0x11;
|
|
|
|
overlay->c.a = 0xcc;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_polygon_new(sd, overlay->c);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2012-03-22 03:40:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-07-19 13:26:09 -07:00
|
|
|
elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay,
|
|
|
|
double lon,
|
|
|
|
double lat)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Overlay_Polygon *ovl;
|
|
|
|
Region *r;
|
|
|
|
|
2012-03-22 03:40:04 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(overlay);
|
2012-11-25 22:32:53 -08:00
|
|
|
ELM_MAP_CHECK((overlay->wsd)->obj);
|
2012-03-22 03:40:04 -07:00
|
|
|
EINA_SAFETY_ON_FALSE_RETURN(overlay->type == ELM_MAP_OVERLAY_TYPE_POLYGON);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
ovl = overlay->ovl;
|
|
|
|
r = ELM_NEW(Region);
|
2012-03-22 03:40:04 -07:00
|
|
|
r->lon = lon;
|
|
|
|
r->lat = lat;
|
|
|
|
ovl->regions = eina_list_append(ovl->regions, r);
|
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(ovl->wsd->pan_obj);
|
2012-03-22 03:40:04 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_circle_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, double lon, double lat, double radius)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_CIRCLE;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xcc;
|
|
|
|
overlay->c.g = 0x11;
|
|
|
|
overlay->c.b = 0x11;
|
|
|
|
overlay->c.a = 0xcc;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_circle_new(sd, lon, lat, radius, overlay->c);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2012-03-22 03:40:04 -07:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Elm_Map_Overlay*
|
|
|
|
_elm_map_overlay_scale_add(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y)
|
2012-03-22 03:40:04 -07:00
|
|
|
{
|
2012-07-19 13:26:09 -07:00
|
|
|
Elm_Map_Overlay *overlay;
|
|
|
|
|
|
|
|
overlay = ELM_NEW(Elm_Map_Overlay);
|
|
|
|
overlay->wsd = sd;
|
2012-03-22 03:40:04 -07:00
|
|
|
overlay->type = ELM_MAP_OVERLAY_TYPE_SCALE;
|
2013-08-30 21:32:52 -07:00
|
|
|
overlay->c.r = 0xff;
|
|
|
|
overlay->c.g = 0xff;
|
|
|
|
overlay->c.b = 0xff;
|
|
|
|
overlay->c.a = 0xff;
|
2012-07-19 13:26:09 -07:00
|
|
|
overlay->ovl = _overlay_scale_new(sd, x, y, overlay->c);
|
|
|
|
overlay->grp = _overlay_group_new(sd);
|
|
|
|
sd->overlays = eina_list_append(sd->overlays, overlay);
|
2012-03-22 03:40:04 -07:00
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
evas_object_smart_changed(sd->pan_obj);
|
2014-03-23 07:45:00 -07:00
|
|
|
return overlay;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static Evas_Object*
|
|
|
|
_elm_map_track_add(Eo *obj, Elm_Map_Data *sd, void *emap)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2013-11-12 05:56:05 -08:00
|
|
|
#ifdef ELM_EMAP
|
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
|
|
|
EMap_Route *emapr = emap;
|
2012-07-19 13:26:09 -07:00
|
|
|
Evas_Object *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
|
|
|
|
2012-07-19 13:26:09 -07:00
|
|
|
route = elm_route_add(obj);
|
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_route_emap_set(route, emapr);
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->track = eina_list_append(sd->track, 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
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
return route;
|
2011-11-20 07:00:43 -08:00
|
|
|
#else
|
2012-07-19 13:26:09 -07:00
|
|
|
(void)obj;
|
2014-03-23 07:45:00 -07:00
|
|
|
(void)sd;
|
2012-07-19 13:26:09 -07:00
|
|
|
(void)emap;
|
2014-03-23 07:45:00 -07:00
|
|
|
return NULL;
|
2011-11-20 07:00:43 -08:00
|
|
|
#endif
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_elm_map_track_remove(Eo *obj EINA_UNUSED, Elm_Map_Data *sd, Evas_Object *route)
|
2009-12-20 08:34:45 -08:00
|
|
|
{
|
2013-11-12 05:56:05 -08:00
|
|
|
#ifdef ELM_EMAP
|
2012-07-19 13:26:09 -07:00
|
|
|
sd->track = eina_list_remove(sd->track, 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
|
|
|
evas_object_del(route);
|
2011-11-20 07:00:43 -08:00
|
|
|
#else
|
2012-07-19 13:26:09 -07:00
|
|
|
(void)obj;
|
2014-03-23 07:45:00 -07:00
|
|
|
(void)sd;
|
2012-07-19 13:26:09 -07:00
|
|
|
(void)route;
|
2011-11-20 07:00:43 -08:00
|
|
|
#endif
|
2009-12-20 08:34:45 -08:00
|
|
|
}
|
2012-07-19 13:26:09 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_map_class_constructor(Efl_Class *klass)
|
2014-03-23 07:45:00 -07:00
|
|
|
{
|
2013-11-07 06:29:38 -08:00
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-07-25 01:33:19 -07:00
|
|
|
EOLIAN const Elm_Atspi_Action *
|
|
|
|
_elm_map_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Map_Data *pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
static Elm_Atspi_Action atspi_actions[] = {
|
|
|
|
{ "move,prior", "move", "prior", _key_action_move},
|
|
|
|
{ "move,next", "move", "next", _key_action_move},
|
|
|
|
{ "move,left", "move", "left", _key_action_move},
|
|
|
|
{ "move,right", "move", "right", _key_action_move},
|
|
|
|
{ "move,up", "move", "up", _key_action_move},
|
|
|
|
{ "move,down", "move", "down", _key_action_move},
|
|
|
|
{ "zoom,in", "zoom", "in", _key_action_zoom},
|
|
|
|
{ "zoom,out", "zoom", "out", _key_action_zoom},
|
|
|
|
{ NULL, NULL, NULL, NULL }
|
|
|
|
};
|
|
|
|
return &atspi_actions[0];
|
|
|
|
}
|
|
|
|
|
2014-03-23 07:45:00 -07:00
|
|
|
#include "elm_map.eo.c"
|