2

I have 270 000 points on a map. If you zoom out, the site hangs for a very long time and sometime the page just crash.

I use Cartaro with Drupal. https://www.drupal.org/project/cartaro Cartaro is a Drupal module, tha uses PostGis, GeoServer (drupal), GeoWebCache and Openlayers (for Drupal). Database is postgresql. In Ol i used Geoserver WMS for Layer.

This is my first attemt at all of the above, so im a very big noob. Hope the info provided is ok, or else, please ask again

Right now, i have the OL to zoom in automaticly on the user, so not so many points are loaded. I use bounding box, and the page loads instant. But the problem is, if the user zooms out a bit, the server dies or lag severly.

Im new to this, but stumbled over minscale and maxscale. Could that be my solution ? How and where do i insert minscale and maxscale ?

  • Welcome! Please provide information about how your data is stored. Database, shapefile, etc? – ragnvald Mar 16 '15 at 17:21
  • 1
    Hi I use Cartaro module. Cartaro uses PostGis, GeoServer, GeoWebCache and Openlayers. Database is postgresql. In Ol i used Geoserver WFS for Layer. Sorry for the missing info. This is my first attemt at all of the above, so im a very big noob. Hope the info provided is ok, or else, please ask again. – Anders Ross Mar 16 '15 at 18:20
  • Cartaro is a Drupal Module, so OL is also the Drupal version. – Anders Ross Mar 16 '15 at 18:28
  • just add the info in your original posting. You can edit it and add the above information in the question. This makes it easier for others to read the question/answer pair later :-) – ragnvald Mar 16 '15 at 20:20
1

You need to either restrict the zoom to a workable area or alternatively restrict the amount of painted features.

There's a Zoom restrictions for non-base layers. behavior which can be enabled in the map configuration. Maybe it's okay to only display features when the user zoomed close.

Alternatively, use the Cluster Features behavior to reduce the amount of painting by grouping features with close proximity. See http://demo.cartaro.org/admin/structure/openlayers/maps/list/swisstopo/edit for a similar case. Your layer needs to be delivered as WFS (raw features) as a prerequisite, though.

If you want to stick to WMS and have your map on all zoom levels, you should consider filtering the features to paint. A custom SLD can archive that but that's not a simple as the previously mentioned approaches.

  • Thanks, that helped me a lot. Selected WFS and turned cluster features on and made zoom restrictions to layer. – Anders Ross Mar 18 '15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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