I am trying to create an Openlayers map that will display thousands of polygons. And when the user clicks on each, I want some of the metadata to display. Working with this large of a dataset seems like it will be challenging. But I am trying to figure out if there is a standard way to go about this. At this point, I am think I should either

  1. display my polygons with WMS and use getfeatureinfo
  2. Display with WFS, Load with Strategy.BBOX, and use GetFeature to get meatadata.

Is there a logical way I am missing to load all of this data into a map and have a good speed. I was looking at this page and trying to figure out what they did: http://protectedplanet.net/

2 Answers 2


I don't like the BBOX strategy as I think it might be slow due to the amount of requests that may be generated.

I would use a combination of both things you mentioned.

display polygons with WMS and use getfeatureinfo... then use WFS, to load outline the feature when clicked on and/or get more information from the database.

protectedplanet.net doesn't use openlayers just google maps. They are probably storing all the information in a KML/KMZ.

  • Great Thanks! I guess I am on the right track then. But I am wondering if protectedplanted is using KML, should I be doing that for its speed? And is that KML data being served by WFS?
    – KyleK
    Aug 20, 2012 at 18:02
  • I don't know for sure if it's KML, just a guess. But if it is it's not being served by WFS because WFS uses GML. The thing about using google apis and KML is that you need to have that KML on a public URL where EVERYONE can see it. If that's not a problem, then maybe you can try it. This is because google absorbs this KML into their servers and returns it back to the API. For these two reasons, I cannot use google maps API because of the sensitivity of some projects.
    – CaptDragon
    Aug 20, 2012 at 18:30
  • You can limit access to your public KML URL to only allow a user agent that presents the Google KML parser string.
    – Sarge
    Aug 24, 2012 at 11:55

The main approach here is to separate rasterization with interaction. One approach (that I'm partially responsible for) is UTFGrid, which has been used by NPR, etc and is integrated into TileMill and Mapnik. It's also used by CartoDB and Google Maps uses a similar approach for Fusion Tables.

Protected planet uses raster tiles as well (for instance, this one: ) and has a live server behind it for point-based queries (for instance, this one).

Re: CaptDragon: there's no WFS or KML involved.

WMS and WFS will not give you anywhere near good enough performance for a public site. The BBOX strategy will not work if you let users zoom.

  • FYI: You can cache a WMS raster service which will give you tiles.
    – CaptDragon
    Aug 20, 2012 at 18:34
  • 1
    Yes, but that's not the main problem here, it's interactivity. You can't cache the way that WFS/WMS GetFeature works because they aren't designed to be cached tilewise.
    – tmcw
    Aug 20, 2012 at 18:47
  • I cache my CSW, WFS and WMS GetFeature, GetRecord, etc results all the time. These are just standards of format for interoperability and do not dictate where the source, whether cached or not, is stored.
    – CaptDragon
    Aug 20, 2012 at 19:05
  • A typical WFS GetFeature request is a request for a single coordinate; a cache for that request is only good for exact matches - which are rare in terms of user interaction. Alternatives like UTFGrid cache tiles of data and can optimistically fill the cache, unlike a cache for potentially millions of single coordinates. In this way the standard does dictate its cache-friendliness.
    – tmcw
    Aug 20, 2012 at 19:17
  • Wow- Thanks for all the help. Being that I am using OpenLayers and my map is in 4326 (which is not supported by TileMill), would you recommend CartoDB as a means to store and access my data though this?
    – KyleK
    Aug 20, 2012 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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