I did something similar in WherOnEarth application. We have a SQLCE database that we store the data in and then load the stuff that is near by.
Background reading: http://www.silverlightshow.net/items/Windows-Phone-7.1-Local-SQL-Database.aspx & http://www.jeffblankenburg.com/2011/11/30/31-days-of-mango-day-30-local-database/
I have a sdf file that I ship with the app, a Data class shown below
[Table]
public class PointData : IPositionElement, INotifyPropertyChanged
{
[Column]
public string Description { get; set; }
[Column]
public double Latitude { get; set; }
[Column]
public double Longitude { get; set; }
Then we I read the points that are near by I get them with the following:
(from ht in _context.Points
where ht.Latitude >= bottomLeft.Latitude && ht.Latitude <= topRight.Latitude &&
ht.Longitude >= bottomLeft.Longitude && ht.Longitude <= topRight.Longitude
select ht
).ToArray();
This approach was fast enough for me (i.e. it took less time to get the items out of the sdf file than it did to position them on the screen an ddo all the other associated maths with that. Admitedly I wasnt trying to get 300000 items from the DB. There were more optimizations that I could have done in relation to indexing and things like that, but as I said it was quick enough at the moment so I will revisit it at some point later.