Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You'll want to store them in either a SQLite database or some other form of data storage, and then you can pull them in and place them on the map with an ItemizedOverlay, see <em><a href="http://developer.android.com/resources/tutorials/views/hello-mapview.html">Google Map View</a></em> (a tutorial).</p> <p><strong>Create your array from a database cursor</strong></p> <pre><code>Cursor cursor = mDbHelper.getItems(); cursor.moveToFirst(); List&lt;CatchItem&gt; catchList = new ArrayList&lt;CatchItem&gt;(); if (cursor != null &amp;&amp; cursor.getCount() &gt; 0) { for (int i = 0; i &lt; cursor.getCount(); i++) { CatchItem item = new CatchItem(); item.Latitude = cursor.getDouble(cursor.getColumnIndex("latitude")); item.Longitude = cursor.getDouble(cursor.getColumnIndex("longitude")); catchList.add(item); cursor.moveToNext(); } } </code></pre> <p><strong>ItemizedOverlay</strong></p> <pre><code>List&lt;Overlay&gt; overlays = mMaps.getOverlays(); overlays.clear(); CatchesItemizedOverlay catchOverlays = new CatchesItemizedOverlay(getResources().getDrawable(R.drawable.map_markeroverlay_blue72), this); for (int i = 0; i &lt; catchList.size(); i++) { double lat = catchList.get(i).Latitude; double lng = catchList.get(i).Longitude; GeoPoint geopoint = new GeoPoint((int)(lat*1E6), (int)(lng*1E6)); catchOverlays.addOverlay(new CatchOverlayItem(this, geopoint, catchList.get(i))); } overlays.add(catchOverlays); </code></pre> <p><code>CatchesItemizedOverlay</code> is my own extended <code>ItemizedOverlay</code> (I needed custom functionality). The catchList object is just a custom object that has latitude and longitude.</p> <p>Hopefully this works for you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload