Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From my understanding polymaps uses po.features() or po.geoJson to display polygons on a map.

  • The former you embed your polygons in the javascript.
  • The latter, you embed your polygons in a .json file and load them in.

So how can I pull directly from the database?


share|improve this question
To answer my own question and for those interested - this was a gamechanging blog post(s) – Jordan Arseno May 14 '11 at 5:17
glad that post helped! could you either close the question, or post that as the response and include any details from the post that are relevant so other folks can follow the same path of enlightenment? Thanks! – scw May 15 '11 at 6:28
Yesterday, I couldn't answer my own question due to reputation. Today, I can! Thanks @scw, see below. – Jordan Arseno May 15 '11 at 7:06
up vote 1 down vote accepted

As per @scw's request:

I was getting caught up in the URL templating system used by polymaps' url() function. The fact that you hand it a string that ends in /{Z}/{X}/{Y}.json was illusive. Naturally, I thought it pointed to a single .json file residing on a server - it is quite the contrary. This URL template is actually passed through a system called TileStache on the server, which pulls in relevant polygons from the database. You can find an excellent explanation on the GoalFinch blog.

share|improve this answer

Your Answer


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.