java - Best way to manage my own paths in Google Maps Android API -


i have mobile application have own paths have put in map, best way manage paths? kml files paths , upload them map or specific database purpose?

well, i'm using simple sqlite database , works fine, first save locations real types in database , can save locations on list of latlgn objects or on hashmap string key , marker object, example:

private void getlatlgns() {

    dbconnection dbc = new dbconnection(this, "mapsdb", null, 1);      sqlitedatabase db = dbc.getwritabledatabase();      cursor c = db.rawquery("select latitude,longitude records", null);     if(c.movetofirst()){          {             alllatlng.add(new latlng(double.parsedouble(c.getstring(0)), double.parsedouble(c.getstring(1))));         }while (c.movetonext());     }     db.close(); }     

private void addingmarkers {

for (int x= 0; x < alllatlng.size() ; x++) {         hashmarkers.put(string.valueof(x), mmap.addmarker(new markeroptions()                 .position(alllatlng.get(x)));         log.d("position:", x + " " + alllatlng.get(x).latitude + " " + alllatlng.get(x).longitude);     } 

}


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -