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

I got this XYZ server where I get my maptiles.

Now, when the user is at zoom level 1 ( closest). I want it to execute a command that gets the current viewport from the map and Queries my PostGIS database to get the geometry points that are contained within that viewport.

How could this get done? and what is the best way to display this data as fast as possible on the map?

Thank you in advance :)

share|improve this question
up vote 1 down vote accepted

Combining the map.getExtent() together with'moveend') - And then parsing the results to the SQL and use postgis method ST_Within might work for me! Yet to be tested in full!

share|improve this answer
i can confirm that this worked. – Christer Feb 21 '13 at 10:26

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.