Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have an OpenLayers app to plot point features, but need to read in a very detailed multipolygon vector layer to plot an accurate location.

I'm currently loading the polygon layer via TinyOWS. I've set maxZoom to 2000 in OpenLayers and am using BBOX strategy. When I zoom in the first load is ok, but the whole layer gets loaded and I can see it when I zoom out despite the maxZoom.

The application now runs too slowly.

I'm new to this and wondered if someone could point me in the right direction. I got som pointers here: Different level of detail(layers) on different zoom level at OpenLayers map and here: OpenLayers GML Polygon Performance

Here's the WFS call for the polygon layer:

pos_skotsel = new OpenLayers.Layer.Vector("Pos_Skötsel", {
    strategies : [new OpenLayers.Strategy.BBOX()],
    projection: new OpenLayers.Projection("EPSG:4326"),
    protocol: new OpenLayers.Protocol.WFS({
        version: "1.1.0",
        srsName: "EPSG:4326",
        url: "http://XX.XXX.XXX.XXX/cgi-bin/tinyows",
        featurePrefix: "tows",
        featureNS :  "http://www.tinyows.org/",
        featureType: "XXXX",
        maxScale: 2500,
        geometryName: "geom"
    })
}); 

map.addLayers([gphy, wfs, pos_skotsel]);

Thanks in advance,

Mini

share|improve this question
add comment

1 Answer 1

I've worked out I need to serve this polygon layer as WMS - which I've done with geoserver - now loading reasonably quickly. Mini

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.