yuvaraj119 / android-maps-extensions

android-maps-extensions
0 stars 0 forks source link

Markers are not visible. #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Looks like non clustered markers are not drawing after move via camera 
animation.

Steps:
- initial state is zoomed;
- see 01_initial_state;
- start to move camera via next code 
CameraUpdate cameraUpdate = 
CameraUpdateFactory.newLatLngBounds(builder.build(), 20);
- see 02_after_camera_animation, it's wrong;
- try to zoom out via map button "-" markers clustering, but single still 
missing;
- see 03_after_zoom_out, it's wrong;
- scroll (drug) map and missing single markers will apear;
- see 04_after_scroll, it's correct.

Original issue reported on code.google.com by igor.goz...@gmail.com on 15 Aug 2013 at 1:48

Attachments:

GoogleCodeExporter commented 9 years ago
Hey Igor,

This looks serious. Which version of the library are you using?

Can you provide a more complete code to reproduce this issue?

Original comment by maciek.g...@gmail.com on 15 Aug 2013 at 3:09

GoogleCodeExporter commented 9 years ago
I used latest version from master branch.
I attached project with issue. It is based on demo, quick and dirty 
implementation, sorry :).

Steps to reproduce.
- start app and wait until it will be zoomed to Warsaw (1.png);
- click on Issue 29 and see markers (2.png);
- zoom out via maps "-" button (3.png);
- scroll horizontal/vertical to see missed marker (4.png);

Lets me know if you need something else.

Original comment by igor.goz...@gmail.com on 15 Aug 2013 at 4:35

Attachments:

GoogleCodeExporter commented 9 years ago
Great. Thanks. I'll have a look into it.

Original comment by maciek.g...@gmail.com on 15 Aug 2013 at 4:36

GoogleCodeExporter commented 9 years ago
Got it reproduced. Clusters were not refreshed when using 
addMarkersDynamically, when they were not initially not on screen and they 
didn't join after zoom out.

For a quick fix go to GridClusteringStrategy.joinClusters and replace

            if (clusterList.size() == 1) {
                ClusterMarker cluster = clusterList.get(0);
                newClusters.put(key, cluster);
            } else {

with

            if (clusterList.size() == 1) {
                ClusterMarker cluster = clusterList.get(0);
                newClusters.put(key, cluster);
                if (!addMarkersDynamically || isPositionInVisibleClusters(clusterList.get(0).getMarkersInternal().get(0).getPosition())) {
                    refresh(cluster);
                }
            } else {

Similar code will be popped in for the next release.

Have to check the same for zoom in and no-split clusters.

Thanks for the report.

Original comment by maciek.g...@gmail.com on 15 Aug 2013 at 7:17

GoogleCodeExporter commented 9 years ago
Thanks for quick fix.

Original comment by igor.goz...@gmail.com on 16 Aug 2013 at 8:07

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/android-maps-extensions/source/detail?r=30198f716aadc6f
759186426def7f10eda7c748c&name=develop

Original comment by maciek.g...@gmail.com on 17 Aug 2013 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by maciek.g...@gmail.com on 23 Aug 2013 at 10:33