I'm trying to create a map of all parcels in a state. In my state, this is several million parcels.

In their current format, they are encoded as topojson and divided up by county. I'd like to show only a certain county's parcels at a time, preferably when the user is zoomed in on that county.

Is there a way to achieve this? I'm open to alternative map libraries / ideas.

  • two questions for you: 1) is it necessary for you to show this data as vectors, i.e. topojson? 2) What do you mean by: "they ... and divided up by county"? – Devdatta Tengshe Jul 3 '14 at 1:47

If you just want to limit the layers from showing beyond a certain point, you could apply scale dependency to the layer by using code similar to below that gets run each time the user zooms in or out:

//Show or Hide layer based on a certain zoom level
function onZoomend(){
    if (map.getZoom() >= 11) {
    else {

map.on('zoomend', onZoomend);
  • The problem is, the full statewide layer of polygons is about 500MB. I want to load a subset of those polygons based on what part of the map the user is currently looking at. So, for example, if the user is looking at a neighborhood of Milwaukee county, I want only polygons in that county (or, ideally, whatever extent is on screen) to be loaded. – CaitlinW Jun 30 '14 at 21:56

The way I handle this is by using GeoServer and displaying using WMS (as images) and interacting as vectors (using WFS). See this map for an example.

You can use GeoServer to create vector tiles for you, if you really want to render vectors client-side.

Another option is to use a service like MapBox or CartoDB to handle the the tiling of the data for you. They have additional services that will handle styling too.

If you want to roll your own, look into one of the vector tiling systems, like TileStache.

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.