I have an 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?

1 Answer 1


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!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.