google maps - Android: Got right lat and long but markers are printed at the wrong place -


i'm fetching 's stores in "göteborg" , adding marker on mapview. problem code markers bunched in africa.

i've checked coordinates correct isnt that.

anyone know what's problem is?

    df = ((classhandler)getapplication()).getstoredatabadefacade();      cursor plotstore = df.getallstorepos("göteborg");     startmanagingcursor(plotstore);     plotstore.movetofirst();      while(plotstore.isafterlast() == false){          geopoint addstore = new geopoint(plotstore.getcolumnindex("lat"), plotstore.getcolumnindex("long"));         //overlayitem overlayitem = new overlayitem(addstore, plotstore.getstring(plotstore.getcolumnindex("_id")), plotstore.getstring(plotstore.getcolumnindex("address")));         overlayitem overlayitem = new overlayitem(addstore, plotstore.getstring(plotstore.getcolumnindex("_id")), plotstore.getstring(plotstore.getcolumnindex("address")));          itemizedstoreoverlay.addoverlay(overlayitem);         storeoverlays.add(itemizedstoreoverlay);         plotstore.movetonext();     } 

doesn't getcolumnindex return index of column within cursor, rather value @ index? seem using correctly id:

plotstore.getstring(plotstore.getcolumnindex("_id")) 

but not lat , long:

plotstore.getcolumnindex("lat") 

try changing (and "long") to:

plotstore.getint(plotstore.getcolumnindex("lat")) 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -