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 am new to the forum and to OpenLayers. I did a search of this forum and looked at some examples, but I could not quite figure out the answer to my question - please forgive me if I have overlooked a pre-existing answer.

My goal is to plot a large number (tens to hundreds of thousands) of markers on a map. For performance reasons, I would like to be able to send the boundaries of the current view to my external database, query the database for the points within those boundaries, and then construct a KML file to send back to OpenLayers to display on the map. This seems to me to be pretty similar to what is done when OpenLayers determines which tiles to display, and I was wondering if anybody could point me to where I might start looking in order to implement this.

Note: I would like to adopt the above approach due to performance issues I encountered while testing a similar idea with the Google Maps API - managing that many points in the browser's memory seemed to be very slow.

Thank you for any suggestions you may have, I very much appreciate the help!

-Rob

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

"For performance reasons, I would like to be able to send the boundaries of the current view to my external database, query the database for the points within those boundaries"

The statrategy OpenLayers.Strategy.BBOX would fit your needs; you can find an example at http://goo.gl/tYTnV. Another OpenLayers example you can find useful is this one: OSM + Google Maps + KML Reprojection

share|improve this answer
add comment

For performance reasons, I would like to be able to send the boundaries of the current view to my external database, query the database for the points within those boundaries, and then construct a KML file to send back to OpenLayers to display on the map.

If users can zoom out, this will not work. See previous discussion.

share|improve this answer
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.