Hi,

I have some design question about current OL.Format.KML implementation,
of the networklink element and it's usage.

Current implementation of usage of KML format in OpenLayers is, that you
define vector layer, url, strategies (which  can modify the url),
protocol (Script would be nice, but HTTP in this case) and format
(OL.Format.KML).

1) Strategy (e.g. OL.Strategy.BBOX) can add (using defaultFilter for
example) bounding box element to the URL (&bbox=minx,miny,maxx,maxy) or
other parameters (as said, using defaultFilter and custom filterToParams
method). Again: the url of the KML file *can be modified*.

The KML read() method parses the comming data. But KML does not need to
include any features, but just some raw dataset definition with network
link, from where the features can be downloaded. The target can be
server component, which serves dynamically desired features, based on
incomming parameters (e.g. bbox, but also time and others). Some of the
parameters are appended to the URL for example by Google Earth
automatically.

BUT OpenLayers.Format.KML does not enable (or I did not found any way
how to do that) way, how to append custom parameters to network-link
url. In the format, there is no reference to the layer - the format is
not "aware of" any mapping context. And so, it is not possible to apply
any filter/strategy to network-link KML.

And I would consider this as missing feature. I've found some solution
to this (manually adding layer attribute to the format and redefine the
OpenLayers.Format.KML.fetchLink(href) method (and fix the href). But is
that the proper way?

I hope, you understand my point, thanks for your comments.

Jachym


-- 
Jachym Cepicky
Help Service - Remote Sensing s.r.o.
jachym.cepi...@gmail.com
HS-RS: jac...@hsrs.cz http://bnhelp.cz
http://les-ejk.cz

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Dev mailing list
d...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to