[OpenLayers-Dev] Load a VectorLayer from more than one URL (load several xml files to just one layer)
Ander Pijoan
ander.pijoan at deusto.es
Wed Apr 24 03:48:00 PDT 2013
Hi all
I am using OpenLayers to display some data downloaded from the Overpass
API. Unfortunately some times the amount of data I ask for is quite big so
the Overpass API gets the timeout and I don't receive the answer.
So my idea is to chop the query to Overpass API into some pieces, and load
its results in the same layer.
Currently I am downloading the data like this:
var layer = new OpenLayers.Layer.Vector(Name, {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: *query*,
format: new OpenLayers.Format.OSM()
}),
renderers: ["Canvas", "SVG", "VML"]
});
I saw that there is some TODOs about making OpenLayers able to download
some WMS layers at a time by inserting a URL array in 'url' parameter.
Is there some good way to do this with the actual code? Something like :
var layer = new OpenLayers.Layer.Vector(Name, {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url:* [query1, query2, query3, query4]*,
format: new OpenLayers.Format.OSM()
}),
renderers: ["Canvas", "SVG", "VML"]
});
Which would be the better way to download all this files into just one
layer?
Thank you very much.
--
Ander Pijoan Lamas
Research Assistant, Deustotech
Computer Science Engineer
University of Deusto
E-mail: ander.pijoan at deusto.es
Phone: +34 664471228
in: http://www.linkedin.com/profile/view?id=162888312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20130424/1a9093ca/attachment.html>
More information about the Dev
mailing list