Code Monkey home page Code Monkey logo

clusterkraf's People

Contributors

carltonwhitehead avatar fmedlin avatar sloy avatar syntaxyz avatar yorb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clusterkraf's Issues

Loading spinner sometimes stays on when returning to SampleActivity from TwoToastersActivity

Steps to reproduce

  1. Start sample app in Normal Mode
  2. Zoom until Two Toasters office is drawn as a single marker
  3. Tap the Two Toasters office marker to open the TwoToastersActivity
  4. Navigate back to SampleActivity (hardware back button or ActionBar up)
  5. If loading spinner is not already spinning indefinitely, repeat steps 3 and 4 (sometimes it doesn't happen on the first try, but will on the second as long as the camera position doesn't change)

Expected results

Either no loading spinner is shown at all, or the loading spinner is only visible very briefly (substantially less than one second)

Actual results

The loading spinner is shown forever, or until the camera position is changed

Add function to Zoom to Bounds when click in Cluster which has Info Window shown already

OK, let me describe step by step how to archive it.

In advanced mode

  1. Cluster click behavior: choose Show Info Window
  2. Cluster Info Window Click behavior: choose Zoom to Bounds
  3. Open the Sample Activity. Click on a cluster, then the Info Window will be shown.
    In this case, if click the Info Window will perform Zoom to Bounds.
  4. I want to have an option, when the Info Window is shown, we can also click on Cluster to perform Zoom to Bounds action. At the moment, click on Cluster when Info Window is shown does nothing.

Thank you for great mapping cluster library.

Clustering on max zoom

I have two pins really near to each other and I set a bit larger "distance to join cluster". Than I tap on a cluster consisting of these two pins. It zooms, but pins stay clustered. It would be great that when zoom reaches max level, all clusters would be expanded.

NullPointerException in sample app ToastedMarkerOptionsChooser on certain devices

java.lang.NullPointerException
at android.graphics.Bitmap.copy(Bitmap.java:400)
at com.twotoasters.clusterkraf.sample.ToastedMarkerOptionsChooser.getClusterBitmap(ToastedMarkerOptionsChooser.java:95)
at com.twotoasters.clusterkraf.sample.ToastedMarkerOptionsChooser.choose(ToastedMarkerOptionsChooser.java:67)
at com.twotoasters.clusterkraf.ClusterTransitionsAnimation.addMarker(ClusterTransitionsAnimation.java:243)
at com.twotoasters.clusterkraf.ClusterTransitionsAnimation.onAnimationStart(ClusterTransitionsAnimation.java:201)
at com.nineoldandroids.animation.ValueAnimator.start(ValueAnimator.java:937)
at com.nineoldandroids.animation.ValueAnimator.start(ValueAnimator.java:951)
at com.nineoldandroids.animation.ObjectAnimator.start(ObjectAnimator.java:385)
at com.twotoasters.clusterkraf.ClusterTransitionsAnimation.animate(ClusterTransitionsAnimation.java:52)
at com.twotoasters.clusterkraf.Clusterkraf.transitionClusters(Clusterkraf.java:175)
at com.twotoasters.clusterkraf.Clusterkraf.access$16(Clusterkraf.java:173)
at com.twotoasters.clusterkraf.Clusterkraf$ClusterTransitionsBuildingTaskHost.onClusterTransitionsBuildingTaskPostExecute(Clusterkraf.java:506)
at com.twotoasters.clusterkraf.ClusterTransitionsBuildingTask.onPostExecute(ClusterTransitionsBuildingTask.java:53)
at com.twotoasters.clusterkraf.ClusterTransitionsBuildingTask.onPostExecute(ClusterTransitionsBuildingTask.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:417)
at android.os.AsyncTask.access$300(AsyncTask.java:127)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)

Make markers filterable based on title/credential?

Is there any ability to filter the markers currently being shown? I need to filter the markers that are shown/clustered, with the ability to also remove that filter and show every marker. Is that possible in the library? I tried to add a delete method to the library in order to remove markers from the clusters (to go in hand with the add method), but the clustering didn't seem to update at all.

NoClassDefFoundError

I got the project running with Android Studio but it seems there are some references missing :

    java.lang.NoClassDefFoundError: com.twotoasters.clusterkraf.ClusterTransitionsAnimation

at com.twotoasters.clusterkraf.Clusterkraf.(Clusterkraf.java:56)

My build.gradle file

apply plugin: 'android-library'


repositories {
    mavenCentral()
}


dependencies {
compile group: 'com.google.android.gms', name: 'play-services', version: '3.1.36'

    compile files('libs/nineoldandroids-2.4.0.jar')
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            res.srcDirs = ['res']
        }
    }
}

Would be great to get some Feedback :)

Possibility of multiple Clusterized Icons

Hi,
My question is about the possibility of multiple icons in clusters, based on data.
Example: I have POI -s on map, base on it's types it can have different types of icons. But I couldn't find out how to do that in ClusterKraf. As I know we can customise the icon in overrided "choose" function in extended MarkerOptionsChooser. But there I do not have which POI is under customisation. InputPoints can be only reached by index, cannot get the container array list itself, so if i iterate it with index (getInputPointAtOffset(index)) it can easily overrun. I have no other idea how to get current InputPoint, which can hold the type of the input point.
Thanks,
peter

problem of showing clustered icon instead of a single marker icon

Hi,
I just tried to add this library to my project which has more than two thousands markers and it works good except that when I zoom to see my single markers outside of the clusters, it shows the single marker but it seem that it still is inside the cluster and shows the clustered icon and also '2' number on the icon which indicates it has 2 markers but I'm sure it is just one marker.
Do you have any clue why this may happen ?

Thanks in advance

Multiple clusters groups

I'm trying to implement X different clusters which are loaded asynchronously, i'm doing it fine so far but i just encountered a problem with the Cluster click animation behavior. When the first category cluster is loaded on map the click listener works fine but when i add two different categories the animation binds only on the first while the second stop working properly

Unsupported as v3 supports clustering is not true

Readme says not to use and is no longer supported as v3 has clustering support. This is not true, there is no V3 for Android.

Also worth mentioning that google does have a utility lib to support clustering, it is however crazy slow.

Library is having application icon and theme

As the main application will already have application icon and theme in place. While building the app fails with following

Error:(39, 9) Attribute application@icon value=(@drawable/launcher_icon) from AndroidManifest.xml:39:9
Error:(41, 9) Attribute application@theme value=(@style/Theme.rctheme) from AndroidManifest.xml:41:9
is also present at com.twotoasters.clusterkraf:library:1.0.2:5:115 value=(@style/AppTheme)
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:37:5 to override
Error:Execution failed for task ':handset:processDebugManifest'.

Manifest merger failed with multiple errors, see logs

Possible Resolution
replace the manifest

current one

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
</application>

new one

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

Markers don't always clear

I noticed that calling clear on Clusterkraf doesn't always clear the markers. This behavior is observed on 2.33 device.

Cursor and show tooltip default

Hello

I use this library and it is really great.
I have not found a way to initialize default cursors to display a tooltip with showInfoWindow() method
Is there the possibility to do so?

Thank you in advance,

Info Windows dissapear when the map is panned.

It seems that a cluster transition is started whenever the map is panned, regardless of whether clusters need to be transitioned, leading to a call to clusterkaf.removePreviousMarkers() which removes the markers. This means that if someone clicks on a marker to show its info-window, and then tries to pan the map to see more of the info-window, the info-window will dissapear.

I've been looking at trying to fix this issue. I'm not sure it's an easy one. So I'm reporting it.

ConcurrentModificationException in ClustersBuilder.addAll()

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
at com.twotoasters.clusterkraf.ClustersBuilder.addAll(ClustersBuilder.java:54)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:34)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
... 3 more

Make clustering serializable?

Hi great work on this project - I really like it. I was just wondering in order to avoid recalculating clusters each time the map is initialised could the clusters be serialized in some manner? I'm working on a app that has over 4K locations and the calculation of the initial clusters means it can take over 30 seconds for anything to appear on the map.

ConcurrentModificationException from multiple add()'s

I'm thinking this is from calling add() multiple times back to back... instead of using addAll()

java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
at com.twotoasters.clusterkraf.ClustersBuilder.addAll(ClustersBuilder.java:54)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:34)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.