Commit Graph

181 Commits

Author SHA1 Message Date
Bluezery 4de5c80ede From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map

I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2

Marker only supports layout style overlay. So only icon and image are
suitable for marker.  For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types.  And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions.  (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class.  (Same functionality as previous
maker class.)

There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.

After this patch, I will fix signals and function names before
elementary 1.0 releases.




SVN revision: 68672
2012-03-05 04:18:33 +00:00
Sanjeev BA 4b20052170 Fix up elm_route have min_max API consistent with the rest of elm.
Signed-off-by: Sanjeev BA <eflelev8@gmail.com>

SVN revision: 68379
2012-02-24 05:48:27 +00:00
WooHyun Jung 5ac0eac84d elementar/elm_map : Patch from Bluezery.
===============================
Previsouly i have tested rotation with old version of gesture layer in
touch devices.
Recent gesture layer gives somewhat different event information. So I
fixed it accordingly.
I tested this patch in touch-enabled device.


SVN revision: 68263
2012-02-22 11:40:09 +00:00
WooHyun Jung 6f3a1c3b3f elementary/elm_map : Include some signals to the signal group.
SVN revision: 68262
2012-02-22 11:22:18 +00:00
Daniel Juyung Seo ddec0677d0 elm elm_map.c: Fixed build break when emap is installed. Patch by
Taehwan Kim <ohpowel@gmail.com>

On Tue, Feb 21, 2012 at 8:02 PM, Bluezery <ohpowel@gmail.com> wrote:
> Hello,
>
> Previous my giant patches made build errors when EMAP is enabled. This
> patch fixed this.
> 'ox'  & 'oy' is almost useless values (-1 or 0 value).  I will fix and
> upgrade all things related EMAP later.
> Please review this patch

SVN revision: 68214
2012-02-21 11:19:09 +00:00
Bluezery acf31ec4cd 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 08:01:22 +00:00
Carsten Haitzler 6636c616bf aah we'll take bluz' patch then instead of my fixing
SVN revision: 68206
2012-02-21 07:59:19 +00:00
Carsten Haitzler cbcdc8f8da fix some naming in elm_map as i suggested before.
SVN revision: 68195
2012-02-21 03:40:52 +00:00
Carsten Haitzler 4d730745f7 aaand other part of bluez map commit. easier to fix formatting in svn.
SVN revision: 68194
2012-02-21 03:26:00 +00:00
Bluezery 80a3a87fa9 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-18 03:55:40 +00:00
Hyoyoung Chang 7e32a93988 From: Hyoyoung Chang <hyoyoung@gmail.com>
Subject: [E-devel] [patch] elm_map - bugfix small errors
Date: Mon, 9 Jan 2012 20:00:02 +0900

Dear all

After run map menu in elementary_test, i found some minor errors
1. some passing data ptr is wrong at obj_rotate_zoom
2. clipped part isn't set by rect

thanks


SVN revision: 67190
2012-01-13 23:45:53 +00:00
Daniel Juyung Seo 34fd5bbeeb elm map: Fixed formatting. What's up map! Here is your formatting fix!
SVN revision: 67011
2012-01-10 06:43:57 +00:00
Bluezery b291d3c5be From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Smooth stepping of wheel & pinch
gesture

When elm_map doing zooming by using wheel gesture, scroller is resized
if it exceeds certain limit.
But current limit value is 2.0 & 1.0, actually those should be below
2.0 and above 1.0.
The reason is that resizing means exactly 2.0 or 1.0. So if it is
above 1.99x,  it can be 2.0 and can be resized.
In addition, pinch.level & pinch.diff values should not be 1.0 or 2.0
for more accuracy. It should be half of previous pinch level or two
times of that.



SVN revision: 66658
2011-12-30 02:57:17 +00:00
Bluezery 5f6adf21b6 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Pause progressbar animator when
map is paused


When map is paused by using elm_map_paused_set(), all existing
animations is stopped.
(ref:
http://docs.enlightenment.org/auto/elementary/group__Map.html#ga6ab43ef6429140f8cccbd3669c5ed52e)
But progress bar can be still running before all download requests are
completed. It is equal to user expectations.

I have fixed this.
if paused is TRUE, stop progress bar.
If paused is FALSE, start progress bar if download requests are
remained.



SVN revision: 66585
2011-12-28 04:18:59 +00:00
ChunEon Park 90d1d1635e elementary/map - a trivial change.
SVN revision: 66560
2011-12-27 05:43:04 +00:00
Bluezery 4658b25be4 elementary/map
Dear all,

I have found a bug that calculation fails when view port size is
bigger than map size.
For example, if map size is 256x256 but view port size is 798x798
(when zoom level is a 1), center longitude & latitude is out bound
from normal longitude & latitude.
I have fixed it.
Please review this patch.

Signed-Off-By: Bluezery <ohpowel@gmaill.com>
Signed-Off-By: ChunEon Park <hermet@hermet.pe.kr>



SVN revision: 66526
2011-12-26 11:03:18 +00:00
Bluezery 6e25241d32 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Fix mouse down event propagation

It's simple bug fix for propagate mouse down event via long press
event properly.



SVN revision: 66503
2011-12-26 03:50:33 +00:00
Bluezery e4936563be From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Mouse wheel bug fix

There is mouse wheel bug. Actually I have made it in previous patch :p

When using mouse wheel, tile size was changed between 0.5 ~ 2.0 before
zoom level is changed. But actually it should be changed between
1.0 ~ 2.0. I have fixed it. If tile size is below 1.0,  it does zoom-out.
And if tile size is above 2.0, it does zoom-in.



SVN revision: 66459
2011-12-22 07:54:59 +00:00
Bluezery 4a5b33941c From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Apply elm gesture


elm_map implement pinch gesture by using evas mouse event. But it made
codes too complicated and dirty.
So I have changed pinch gesture by using elm_gesture. wheel zooming is
also improved somewhat.
From now on, configuration change related elm_gesture easily applied
to elm_map and we can see more smooth zooming :D

Anyway, els_scroller have bugs when the scrolling event & the resize
event occurs at the same time.
So, some dirty codes are added for preventing jumping to strange positions.
Later it will be removed when the bugs are fixed.



SVN revision: 66413
2011-12-21 06:12:08 +00:00
Bluezery 1e5c64bba1 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(3) Simplify grid_load()
There exists 3 state for grid items. i.e., downloaded, downloading,
none states.
grid_load() does followings:
1. if a grid item does not exist, create it.
2. update a tile (if downloaded) or queues for download (if none) or
nothing  (if downloading)



SVN revision: 66153
2011-12-13 09:07:00 +00:00
Bluezery 66a391e67f From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(2) Revoking gi->have
I restore the gi->have values. The removal of this is my mistake.
gi->have is needed because I cannot know whether this file is
downloading (just opened and not written) or downloaded state even if
image file exists.



SVN revision: 66141
2011-12-13 08:39:01 +00:00
Bluezery d328f8b4c7 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(1) Grid Management
There are no caching mechanism in current elm_map.
So, too many network resources are wasted because elm_map keeps only
two grids and already downloaded images are downloaded again and
again. (This also slows the map loading speed)
I have changed this grid management policy.

I have done followings.
1. Create all grids (all zoom levels) when elm_map_add() is called (No
memory overhead because of sparse matrix)
2. Clear all grids when map object is deleted.
3. Loads necessary grids and unloads unused grids when zoom level is
changed.

Changed grid management have one weakness that memory and tmp size can
grow bigger while map object is live.
I think it may need API such as elm_map_cache_size_set().



SVN revision: 66140
2011-12-13 08:31:55 +00:00
Bluezery 4231f82a56 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

Grid Management
There are no caching mechanism in current elm_map.
So, too many network resources are wasted because elm_map keeps only
two grids and already downloaded images are downloaded again and
again. (This also slows the map loading speed)
I have changed this grid management policy.

I have done followings.
1. Create all grids (all zoom levels) when elm_map_add() is called (No
memory overhead because of sparse matrix)
2. Clear all grids when map object is deleted.
3. Loads necessary grids and unloads unused grids when zoom level is
changed.

Changed grid management have one weakness that memory and tmp size can
grow bigger while map object is live.
I think it may need API such as elm_map_cache_size_set().



SVN revision: 66131
2011-12-13 03:48:18 +00:00
ChunEon Park 2a3bb21c44 elementary/map
Sorry, I have forgotten adding comments to my patch.
OSM recommends to requesting map images distributively.
Please refere http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

I used 3 input parameters for selecting one from a, b, c or 1, 2, 3, 4
tile servers.
I attached patch with comments.

Signed-Off-By: TaeHwan Kim(ohpowel@gmail.com)
Signed-Off-By: ChunEon Park(hermet@hermet.pe.kr)



SVN revision: 65892
2011-12-05 09:00:04 +00:00
Bluezery 944ecff8f1 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Remove unnecessary flags

There are too may flags in elm_map. Most of them are duplicated and unnecessary.
I have removed "want", "download", "have" variables.

I use gi->job instead of "want" & "download".
I use ecore_file_exists() instead of "have" flags.



SVN revision: 65890
2011-12-05 07:30:31 +00:00
Daniel Juyung Seo 7a50ddb3d5 elm map: Moved zoom_min_get()/zoom_max_get() to source_init() to
simplify code. Patch by Bluezery <ohpowel@gmail.com>


SVN revision: 65730
2011-12-01 03:54:52 +00:00
Daniel Juyung Seo 0bb9c1e212 elm map: Fixed memory leaks in _nominatim_url_cb() function. Patch by
Bluezery <ohpowel@gmail.com>


SVN revision: 65712
2011-11-30 08:37:55 +00:00
Daniel Juyung Seo 7cd22aa075 elm map: Add error handling to see the definite error log because
sometimes evas_object_image_file_set() is failed. Patch by Bluezery
<ohpowel@gmail.com>


SVN revision: 65707
2011-11-30 05:00:56 +00:00
Cedric BAIL 0c63e7b2d4 elementary: support build without Ecore_IMF and/or without Ecore_Con.
SVN revision: 65449
2011-11-20 15:00:43 +00:00
Boris Faure 1112d30a41 elm: change elm_object_content_part_set/get/unset to elm_object_part_content_set/get/unset
SVN revision: 65349
2011-11-17 21:02:31 +00:00
ChunEon Park 952fb9e124 elementary/map - patched by Bluezery(ohpowel@gmail.com)
Hi,

There are bugs that map removes list elements when using
EINA_LIST_FOREACH or EINA_LIST_REVERSE_FOREACH.
We should use EINA_LIST_FOREACH_SAFE or EINA_LIST_REVERSE_FOREACH_SAFE
instead for above case.
Please review belows



SVN revision: 65069
2011-11-11 16:29:15 +00:00
Bluezery 84f0b47a95 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [elm_map] ecore_file_download_full() should be used
properly

elm_map only checked that returned job is NULL.
But ecore_file_download_full() returns EINA_FALSE when error occurred.
So return value should be checked for proper usage.
Please review this simple bug fix



SVN revision: 64794
2011-11-06 06:11:57 +00:00
Kim Yunhan a5fd615233 From: Kim Yunhan <spbear@gmail.com>
Subject: [E-devel] [elm_map] Fix up too many connections at the same
time.


Currently, elm_map requests all visible map image tile to map server
at the
same time.
If the scene is turned off while panning or zooming, it will be
aborted on
HTTP requests.
But it already sent to map server, and it already made useless HTTP
connections.
So if you pan scrolling quickly, elm_map try to download and abort too
many
HTTP
connections repeatedly.

If you have stable and high-throughput data connection, it doesn't
matter
on your side.
However map server will get high load, It is sufficient reason to block
you.
In another case, if you have poor data connection such as 3G
connection, it
has less
throughput and it causes delay of downloading. And finally, the device
is
as full as
HTTP connections even you already aborted. It makes low-performance
issue on
your device.

I wrote a patch for solving this situation.
The idea is simple.

1. I limited number of maximum HTTP request on elm_map side.
2. If maximum HTTP request is exceed, keep requests on Eina_List.
3. If each image downloading is completed, try to download recent
request.
   (Because it has strong possibility for your screen)
   4. At the same time, invisible request will be removed.
      (It doesn't make HTTP connection yet)
      
      I tested many times on my desktop and device.
      It works for me. And elm_map's performance is improved
appreciably on 3G
connections.



SVN revision: 64685
2011-11-03 11:07:03 +00:00
Carsten Haitzler 48699797d6 and set have to false in other error cases.
SVN revision: 64599
2011-11-01 02:38:28 +00:00
Bluezery 6632d5a21f From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch] elm_map: add image loading error handling

I made a bug fix for elm_map.
When a downloaded image has an error, ,  elm_map removes a file and goes on
just like download succeeded .
However, it is not success, so it should be marked as FALSE for later retry.



SVN revision: 64598
2011-11-01 02:35:40 +00:00
ChunEon Park f856c0e9fe elementary - slider, scroller, progressbar, radio
applied elm_object_content_set/get/unset APIs. 



SVN revision: 64542
2011-10-31 02:56:03 +00:00
Daniel Juyung Seo d8cb0b4a88 elm map: Fixed internal function name.
SVN revision: 64537
2011-10-31 00:15:10 +00:00
Daniel Juyung Seo bafe9c7426 elm: Use appropriate add/del_full for evas event callbacks.
SVN revision: 64536
2011-10-31 00:13:32 +00:00
ChunEon Park dc180b67ce elementary/layout - deprecated elm_layout_content_set/get_unset
SVN revision: 64403
2011-10-26 00:46:16 +00:00
Mike McCormack beafec3884 elementary: Improve include file modularity
Move stuff out of elm_priv.h

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 63900
2011-10-07 05:56:07 +00:00
Daniel Juyung Seo 787ad89b67 elm map: Coding convention.
SVN revision: 63513
2011-09-21 10:44:06 +00:00
Kim Yunhan 38fe934526 Elementary map : fix zoom-out bug
From: Kim Yunhan <spbear@gmail.com>

When you test elm_map with mouse wheel, it worked abnormally because of some bug.
So I made some more patch for fixing it.
This patch file also includes a previous patch (zoom-out issue).



SVN revision: 63510
2011-09-21 07:04:34 +00:00
Sangho Park 237c6e0961 Elementary map : a bug fix for zoom-out in elm_map by Kim Yunhan
I wrote a patch that handles a bug while zooming-out in elm_map.
When I try to zoom out, some tiles are broken.
But it is hard to notice because broken frame disappears quickly.

I investigated in a few days.
And I realize that there are something wrong.
When map is zoomed out, a tile is shrunk by evas_object_resize().
But evas_map handles its texture by just its origin image size not a shrunk size.
If evas_object's width & height is shrunk, I have to handle for its texture.


SVN revision: 63509
2011-09-21 06:20:28 +00:00
Mike Blumenkrantz 1dd49971d1 I can't think of any more clever names so we'll go with the old standard: really?
SVN revision: 62158
2011-08-05 23:14:17 +00:00
Mike Blumenkrantz d4da47741f really? part 3: the rereturn of really?
SVN revision: 62156
2011-08-05 23:11:28 +00:00
Bruno Dilly e8a286efb3 Elementary: Map Documentation
SVN revision: 62074
2011-08-03 21:05:20 +00:00
Jonas M. Gastal 0352f299d0 Elementary: A ton of random doc fixes.
SVN revision: 62066
2011-08-03 19:07:43 +00:00
Carsten Haitzler 8803910b36 make ecore_con a default requirement for elm.
SVN revision: 61789
2011-07-27 05:59:01 +00:00
Sangho Park 43bce580a5 Elementary Map: check status of ecore_file_download result
SVN revision: 61515
2011-07-20 02:07:47 +00:00
Mike McCormack 252c052ea7 elementary: elementary_config.h is a local include
Using #include <elementary_config.h> will fail if
elementary has never been installed.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 61220
2011-07-11 01:22:19 +00:00