samedi 8 août 2015

Retrieve array of data from SQLite, retrieve attributes from array, and add attributes into an array and create a polyline

I am able to retrieve a List from my database with routeID, routeName, lat and lng like so:

    DatabaseRouteHelper db = new DatabaseRouteHelper(this);
    List<Route> routesWithSameID;
    Intent routeID = getIntent();
    int routeid = routeID.getIntExtra("routeID", 0);

    routesWithSameID = db.getAllRoutesWithSameID(routeid);

I am wondering how can I extract all the lat and lngs (getLat() and getLng()) and add them into another array list so it only has the lat and lngs for me to be able to create a polyline?

Aucun commentaire:

Enregistrer un commentaire