{"action":"closed","issue":{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/468","labels_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/468/comments","events_url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/issues/468/events","html_url":"https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/468","id":64982634,"number":468,"title":"map.addPolyline()","user":{"login":"celron","id":7539817,"avatar_url":"https://avatars.githubusercontent.com/u/7539817?v=3","gravatar_id":"","url":"https://api.github.com/users/celron","html_url":"https://github.com/celron","followers_url":"https://api.github.com/users/celron/followers","following_url":"https://api.github.com/users/celron/following{/other_user}","gists_url":"https://api.github.com/users/celron/gists{/gist_id}","starred_url":"https://api.github.com/users/celron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celron/subscriptions","organizations_url":"https://api.github.com/users/celron/orgs","repos_url":"https://api.github.com/users/celron/repos","events_url":"https://api.github.com/users/celron/events{/privacy}","received_events_url":"https://api.github.com/users/celron/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wf9a5m75/phonegap-googlemaps-plugin/labels/need%20more%20information","name":"need more information","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-28T20:12:14Z","updated_at":"2015-03-28T22:55:57Z","closed_at":"2015-03-28T22:55:57Z","body":"when I use <b>color: grey</b>, the routine will crash \r\n03-28 15:44:53.333: W/System.err(25102): java.lang.reflect.InvocationTargetException\r\n03-28 15:44:53.333: W/System.err(25102): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n03-28 15:44:53.343: W/System.err(25102): \tat java.lang.reflect.Method.invoke(Method.java:515)\r\n03-28 15:44:53.343: W/System.err(25102): \tat plugin.google.maps.MyPlugin.execute(MyPlugin.java:49)\r\n03-28 15:44:53.343: W/System.err(25102): \tat plugin.google.maps.GoogleMaps$3.run(GoogleMaps.java:263)\r\n03-28 15:44:53.343: W/System.err(25102): \tat android.os.Handler.handleCallback(Handler.java:733)\r\n03-28 15:44:53.343: W/System.err(25102): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n03-28 15:44:53.343: W/System.err(25102): \tat android.os.Looper.loop(Looper.java:146)\r\n03-28 15:44:53.343: W/System.err(25102): \tat android.app.ActivityThread.main(ActivityThread.java:5752)\r\n03-28 15:44:53.343: W/System.err(25102): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n03-28 15:44:53.343: W/System.err(25102): \tat java.lang.reflect.Method.invoke(Method.java:515)\r\n03-28 15:44:53.343: W/System.err(25102): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)\r\n03-28 15:44:53.353: W/System.err(25102): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)\r\n03-28 15:44:53.353: W/System.err(25102): \tat dalvik.system.NativeStart.main(Native Method)\r\n03-28 15:44:53.353: W/System.err(25102): Caused by: org.json.JSONException: Value null at color of type org.json.JSONObject$1 cannot be converted to JSONArray\r\n03-28 15:44:53.353: W/System.err(25102): \tat org.json.JSON.typeMismatch(JSON.java:100)\r\n03-28 15:44:53.353: W/System.err(25102): \tat org.json.JSONObject.getJSONArray(JSONObject.java:553)\r\n03-28 15:44:53.353: W/System.err(25102): \tat plugin.google.maps.PluginPolyline.createPolyline(PluginPolyline.java:42)\r\n\r\nIt appears that whatever routine you used to get the color changed from 1.2.4, where this worked.  I think this color parser is an android routine.  \r\n\r\nI can use <b>gray</b> instead, however I believe that it is better to use a default color if the color parser can't find a color rather than leave it null and crash, or maybe return an error.\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10150174-map-addpolyline?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F637500&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}