NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

0
1

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's gravatar image

VenuGopal
16899
accept rate: 0%


Use smaller KML file, e.g. this (500K): http://geocommons.com/maps/new?overlay_id=21424

permanent link

answered 16 Jul '12, 10:45

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

  1. Convert the KML to images and serve them using a WMS.
  2. Store the KML In a WFS server and query the server using the BBOX strategy.
permanent link
This answer is marked "community wiki".

answered 04 Apr '13, 17:02

Lambertus's gravatar image

Lambertus
1213
accept rate: 0%

edited 04 Apr '13, 17:04

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×535
×49

question asked: 16 Jul '12, 10:33

question was seen: 8,141 times

last updated: 04 Apr '13, 17:04

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum