Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2458] Android Ti.Maps removing annotation issues 4.3.0 with clusters

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-01-25T23:35:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMap
Labelsn/a
ReporterMike Stancliffe
AssigneeYordan Banev
Created2018-08-21T21:15:32.000+0000
Updated2019-01-25T23:35:08.000+0000

Description

removeAllAnnotations seems to work with the exception of it does not update the view, until you change the view (for example zoom in or out) then all annotations disappear. You can see this by uncommenting in add and remove function. removeAnnotation(s) has no effect, in the example code we try to remove annotations prior to adding new set or when we click remove annotations button. When this is uncommented it just keeps adding annotations everytime with cluster counts going up. You can see this by uncommenting in add and remove function.

Attachments

FileDateSize
index.js2018-08-21T21:15:13.000+00001373
index.xml2018-08-21T21:15:28.000+0000268

Comments

  1. Hans Knöchel 2018-08-22

    Does this also occur with Android v4.3.1 which we just released yesterday? You can download it [here](https://github.com/appcelerator-modules/ti.map/releases/tag/android-4.3.1).
  2. Mike Stancliffe 2018-08-22

    Tried with 4.3.1 and now there seem to be more issues with annotations than before. Now adding annotations does not update until zooming(or other actions I assume, much like removing in 4.3.0) and now all ways I tried to remove annotations(removeAllAnnotations, removeAnnotation(s)) throws errors. I used the same code I attached originally. [ERROR]  TiExceptionHandler: (main) [56216,62649] /alloy/controllers/index.js:107 [ERROR]  TiExceptionHandler: $.map.removeAnnotations(points), [ERROR]  TiExceptionHandler: ^ [ERROR]  TiExceptionHandler: Error: Attempt to invoke virtual method 'void com.google.android.gms.maps.model.Marker.remove()' on a null object reference [ERROR]  TiExceptionHandler: at Button.remove (/alloy/controllers/index.js:107:7) [ERROR]  TiExceptionHandler: at Button.value (ti:/events.js:49:21) [ERROR]  TiExceptionHandler: at Button.value (ti:/events.js:101:19) [ERROR]  TiExceptionHandler: [ERROR]  TiExceptionHandler: ti.map.TiUIMapView.removeAnnotation(TiUIMapView.java:590) [ERROR]  TiExceptionHandler: ti.map.ViewProxy.handleRemoveAnnotation(ViewProxy.java:543) [ERROR]  TiExceptionHandler: ti.map.ViewProxy.handleRemoveAnnotations(ViewProxy.java:534) [ERROR]  TiExceptionHandler: ti.map.ViewProxy.removeAnnotations(ViewProxy.java:522) [ERROR]  TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR]  TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63) [ERROR]  TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:969) [ERROR]  TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1194) [ERROR]  TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:394) [ERROR]  TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:101) [ERROR]  V8Exception: Exception occurred at /alloy/controllers/index.js:107: Uncaught Error: Attempt to invoke virtual method 'void com.google.android.gms.maps.model.Marker.remove()' on a null object reference
  3. Yordan Banev 2018-08-29

    PR: https://github.com/appcelerator-modules/ti.map/pull/245

JSON Source