title: Adding Markers in Background while Looping through ArrayList
body: <p>I add Markers to a <code>googleMap</code> from an <code>ArrayList</code> 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.</p>
  
  <p>Here is how I do it:</p>
  
  <pre><code>    final HashMap&lt;Marker, NearLocation&gt; markerIdMap = new HashMap&lt;Marker, NearLocation&gt;();
      for (final NearLocation result : MainActivity.nearLocationList) {
  
              // Do all the hard work here
  
      }
  </code></pre>
  
  <p>How can I do this somehow dynamically, after the map loads and it populates them as they are produced?  I am not sure if I can do that by doing some of the work in the background, then when the marker is complete move it to the UI thread to add.</p>
  
  <p>I know how to do this INDIVIDUALLY with an <code>AsyncTask</code>.  Not sure though while I am looping through...</p>