Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

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

1 Answer 1

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

 
discard

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.