Hey,
Little stuck here people..
I have (thanks to the help of Paul here) accessed my sqlite database and plotted a point on the map. My problem is it will not goto the next record and plot that as well. I've included a link to my data but it for some reason won't work. Eventually I can use my select query to filter things down using WHERE statements, but at the moment, I'm happy just to have the few items I have in my db working... Here is also a copy of the debug.
Thanks.
http://pastie.org/1561185
-- debug -- [INFO] Test/1.0 (1.5.1.16bbb92) [DEBUG] Analytics is enabled = YES 2011-02-14 13:17:01.934 Test[61515:207] [DEBUG] Reachability Flag Status Change: -R -----l- networkStatusForFlags [DEBUG] loading: /Users/renzoscarparo/Desktop/MAWL/Test/Resources/app.js, resource: Users/renzoscarparo/Desktop/MAWL/Test/Resources/app_js [INFO] Found Lat: -38.014157 and long 144.386068 [DEBUG] application booted in 35.107017 ms 2011-02-14 13:17:06.941 Test[61515:9603] [DEBUG] Reachability Flag Status Change: -R -----l- networkStatusForFlags [DEBUG] Session did end with error (null) [INFO] Application has exited from Simulator -- end debug --
1 Answer
Renzo
The problem is that you are overwriting each previous lattest and longtest variable value with the next record in your query result. Hence, the only annotation you will actually create is your last one.
To resolve this, move the createAnnotation() statement inside of your while loop. To see examples, that use a similar approach, of programmatically creating views, see Using Tableviews.
Hope this helps.
Cheers
Your Answer
Think you can help? Login to answer this question!