Adding Markers in Background while Looping through ArrayList
问题 I add Markers to a googleMap from an ArrayList of Objects. There are about 250 markers; I even have to convert them to bitmaps to customize them. It's a pretty resource intensive task. BUT It seriously blocks my UI thread. Here is how I do it: final HashMap<Marker, NearLocation> markerIdMap = new HashMap<Marker, NearLocation>(); for (final NearLocation result : MainActivity.nearLocationList) { // Do all the hard work here } How can I do this somehow dynamically, after the map loads and it