Hello,
I just subscribe to the list hoping to find solution to my actual concern.
I try to load some osm data (~50Mo) into a vector layer. But it is a little slow.

So I made a python script to extract a bbox of the .osm file with osmosis. This give something like that:
            var pistesLayer = new OpenLayers.Layer.Vector("Pistes", {
                strategies: [new OpenLayers.Strategy.BBOX()],
                styleMap: myStyles,
                protocol: new OpenLayers.Protocol.HTTP({
url: 'getBbox.py/6.26/46.66/6.35/46.69', //<-- relative or absolute URL to your .osm file
                        format: new OpenLayers.Format.OSM()
                }),
                projection: new OpenLayers.Projection("EPSG:4326")
            });
The python and osmosis part works, getBbox.py/6.26/46.66/6.35/46.69 return me an .osm file.
However, OpenLayer does not load it.
I also tried OpenLayers.Strategy.Fixed(), but then I don't see osmosis running at all.

Any suggestion?

PS: There is probably a better way to do it, but this is the first that cross my mind. If you have any efficient suggestion to load a extract of an .osm dataset into a vector layer, any help would be appreciated.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to