I have a very large KML file with hundreds of placemarks. How do I parse the file and create single files from each placemark using PHP? I want to use each placemark one at a time and user开发者_如何学编程s cannot download 12MB of KML before viewing one placemark - unless I can parse the file serverside and only serve up the required placemark to my page, but that is still a huge overhead on the server. What is the correct way to do this?
I think the best would be to parse once the file and insert the features in a database.From there you can serve the features either by costructing dynamically kml's or by other more preferabble ways such as by sending xml or json to the client.
精彩评论