开发者

How to store lots of longitudes/latitudes on an Android device

I am looking into writing an Android app that has a database of approximately 2000 longitudes and latitudes which are effectively hard coded.

I assume that once my app is installed, I can put this information into the SQLite database, but how should I distribute this information when the app is downloaded?

One option I thought of was some kind of Patricia Trie to minimise the size of the data (the points will be in a number of clusters, rather than evenly distributed), but I'm not sure whether such a collection would work when there are two associated numbers to store, al开发者_运维技巧ong with perhaps some other information such as place name.

Does anyone have any thoughts, input or suggestions?

Rich


2000 ints is not many.

In fact I recently tried to load up my web app that has similar numbers for lat lon. I realized i need to optimize a bit, but its load time wasn't completely terrible.

You may want to just request the data you need at any given moment. There must be some other data associated with the lat lons that can help you with that... or maybe you should only display pins within some boundary of lat lon, like +1,-1 in every direction of the center of your map or something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜