Details
-
Type:
Bug
-
Status: Closed
-
Priority:
None
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 6.1.0
-
Component/s: None
-
Labels:
-
Story Points:3
-
Sprint:2017 Sprint 11 SDK
Description
When adding pins on to a map using the ti.map module after they have been removed the application throws an error.
Test Steps:
- Create a Titanium project
- Copy the the following files in the attachments section from this ticket in to the project (app.js and CurvyRoutes.JS) under the resources directory
- Download the map module from https://github.com/appcelerator-modules/ti.map
- Build the android module from the repo you just downloaded (This can be done by going in to ti.map/android from the CLI and running the following command appc run --build-only
- Go to the dist folder which will be created and then extract the module and add it to your existing modules
- Add the ti.map module in to your project
- Run the application
- Go to annotation test
- press the RM ALL button
- You should see all pins being removed
- Press the ADD ALL button
- Application will crash
Expected result
Pins should be added without any issues.
Actual result
Application crashes and the following error is shown:
[ERROR] : TiExceptionHandler: (main) [4126,11648] ----- Titanium Javascript Runtime Error ----- |
[ERROR] : TiExceptionHandler: (main) [0,11648] - In /app.js:416,6 |
[ERROR] : TiExceptionHandler: (main) [0,11648] - Message: Uncaught Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference |
[ERROR] : TiExceptionHandler: (main) [0,11648] - Source: map.addAnnotations([anno, anno2, anno3, anno4]); |
[ERROR] : V8Exception: Exception occurred at /app.js:416: Uncaught Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference |
[ERROR] : V8Exception: Attempt to invoke virtual method 'com.google.android.gms.maps.model.MarkerOptions com.google.android.gms.maps.model.MarkerOptions.position(com.google.android.gms.maps.model.LatLng)' on a null object reference |