Hi Wyo,
On 30/12/10 07:38, Wyo wrote:
Is it possible to display a compressed KML file directly with OL? Or
is there a Javacript unzip function anywhere? I'd rather like to use
the compressed form since files are rather large. Does anybody have a
code sample?
If your files are rather large, make sure you have on-the-fly gzip
compression enabled in your web server. That will reduce that time to
transport the KML file from the server to the browser. If the files are
really big, your browser will probably take considerable time parsing
the document.
If you *really, really* want to use KMZ files (for other reasons than
making your big KML files smaller), you can try using a modified
proxy.cgi that unzips KMZ files on the fly on the server. This can be
helpful if you want your visitors to view arbitrary KMZ URLs from within
your OL app. See [2] for an example proxy.cgi. Use at your own risk.
Besides can OL extract data like name from a KML? I'd like to show its
name when hovering over a track.
Yes. Have a look at this other thread: [1]. You'll need to add a 'label'
attribute to your StyleMap, something like:
...
label: "Name: ${name}"
...
Regards, Roald
[1]
http://osgeo-org.1803224.n2.nabble.com/KML-styling-with-ExtendedData-td5871434.html
[2] http://osgeo.pastebin.com/tK4ZsfXR
Wyo
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users