5

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?

Thanks!

3
  • To answer my own question and for those interested - this was a gamechanging blog post(s) May 14, 2011 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, 2011 at 6:28
  • Yesterday, I couldn't answer my own question due to reputation. Today, I can! Thanks @scw, see below. May 15, 2011 at 7:06

1 Answer 1

1

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.

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.