开发者

KML scalability? Use KML to show and filter 1600+ points in Android?

开发者 https://www.devze.com 2023-01-24 21:38 出处:网络
Will you guys tell me whether or not this solution will work before I spend a lot of time learning/researching KML?(It looks like I need to learn it at some point, but I have a deadline to meet, first

Will you guys tell me whether or not this solution will work before I spend a lot of time learning/researching KML? (It looks like I need to learn it at some point, but I have a deadline to meet, first.)

Background - I need to plot 1662 points on a map that fall into 7 categories. I would like to show all, as well as filter/show only categories that the user chooses.

My first attempt at this used the Google Maps API. I created GeoPoints, added them to an ItemizedOverlay, and then added the ItemizedOverlay to the map. That works great for a few points. 100 points only took 3 seconds. By the time I got up to 400 points, things really started to slow down (like 30 seconds or so). I loaded all 1662, and it took 15 minutes!

1) Why does this take so long? Does the API make a call to Google Maps for each point?

2) I found KML as a possible alternative. How well does KML scale? Will it be able to plot and load 1600+ points? If not, can you recommend another solution?

3) How do you recommend I go about filtering my categories? Currently, I plan on loading each category to a layer. I found references to hiding/showing layers, so I'm going to try to do that. Is this a good approach?

4) How can I add buttons? Can/should I add them to an overlay? If not, is it possible to have the map open in a MapView and 开发者_如何学Cthen control the filter/show with Android Buttons?

I'm sorry if my questions sound basic. I will continue researching and learning on my own. However, I want to know whether or not my solution will work at all before I waste another week going down another dead end.

Thanks in advance! :)


I don't know anything about Android, but I am working on a project where I generate KML output from a Java application. I'm not sure what kind of constraints you have when working with Android Java, but if you can you should try the following open source library:

JAK - Java API for KML

It will make the KML creation fairly easy. I can't answer your question about scalability on Android since I have no experience with it.

0

精彩评论

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

关注公众号