Skip to content Skip to sidebar Skip to footer

Android Mapview Json Array Adding Array Of Points

I am creating a map application that receives a list of coords from a JSON array. I @Override dispatchTouchEvent to find the coords from the map and then execute an ASYNCTask to ge

Solution 1:

You should add the items in the UI thread, not in background.

Solution 2:

Try to use onPostExecute method of the AsyncTask. It is related to UI thread so you can modify the MapView.

Let's move add method from doInBackground to onPostExecute.

Moreover, you ought to add

mapView.invalidate()

as last line of the method onPostExecute()

Post a Comment for "Android Mapview Json Array Adding Array Of Points"