I'm using OpenLayers to display OpenStreetMap maps. (Though, I'd assume this should be general enough to work for any map product...)
I'm displaying some very sophisticated vector overlays, and the amount and resolution of the features I'm returning from the server via GeoJSON to overlay has proven too much for many computers.
What I'd like to do now instead is to only send data befitting the resolution of the current zoom. This should be relatively easy to do using the getResolution
and calculateBounds
methods on the Map
object. calculateBounds
returns a Bounds object that then can be transformed between the map projection and display projection.
How do I transform the resolution into my desired projection (4326 in this case)? Is there a built in way of doing this or do I have to run the resolution against a known formula?