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.

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
add comment

1 Answer

up vote 1 down vote accepted

Combining the map.getExtent() together with map.events.register('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
add comment

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.