Step #1: Pass a Cursor to your ItemizedOverlay that contains your coordinates, retrieved from your database
Step #2: Implement size() in your ItemizedOverlay to return getCount() from the Cursor Step #3: Implement getItem() in your ItemizedOverlay to moveToPosition() on the Cursor, read out the latitude and longitude, convert to microdegrees, create a GeoPoint, and return it Step #4: Use the ItemizedOverlay on your MapView On Fri, Aug 19, 2011 at 9:30 AM, Alaeddine Ghribi <[email protected]> wrote: > I created an SQlite database to store on it all latitudes and > longitudes to display them in map. For the add of the values i didn't > encouter any problem, i used this code: > > CoordBD CoordBd = new CoordBD(this); > Coordo coordo = new Coordo(36.869686,10.315642 ); > CoordBd.open(); > CoordBd.insertCoordo(coordo); > > But i don't know how to insert them one by one in map, i usually/ > manually make this: > > GeoPoint point2 = new > GeoPoint(microdegrees(36.86774),microdegrees(10.305302)); > pinOverlay.addPoint(point2); > How to browse all the database and add all the Geopoints > automatically? > Thank you. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.9 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

