Hi, I have created a KML file with a separate color for each state in US using the Quantum GIS(QGIS) tool.and the file size is around 2 MB. I want to load the Map with this KML file layer overlayed on the Map.Its loading fine without any issues,However its showing a Popup dialog to the user,that this script is executing a longer time ,so Internet Explorer is displaying the message as "Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run your computer become unresponsive." to select Yes/No.if we select No script will run and it loads the colors correctly.To avoid this warning message So i tried setting the timeout in the javascript which did not make any difference seems like the below code is causing the issue. new OpenLayers.Protocol.HTTP({ url: "http://servername/kml/US.kml", format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) Is there any way we can fix this? Please post your suggestions how to load it if the kml file is larger. asked 16 Jul '12, 10:33 VenuGopal |
Use smaller KML file, e.g. this (500K): http://geocommons.com/maps/new?overlay_id=21424 answered 16 Jul '12, 10:45 Frederik Ramm ♦ Hi,Thanks for your reply,How would I get the lesser size KML File?
(16 Jul '12, 11:28)
VenuGopal
|
The two most common practices to overcome the problem of slow large KML files and OpenLayers are:
permanent link
This answer is marked "community wiki".
answered 04 Apr '13, 17:02 Lambertus |