Skip to main content
added 345 characters in body
Source Link

YouIt's not clear what you are trying to achieve. Normally, the bounds of a projection are defined as global, unless the projection is specialised, like UK's BNG where the coordinate system only covers the UK.

If you want to prevent the user panning outside a certain zone, then the thing to set is restrictedExtent.

However, there's no easy way to get this bounding box from the server. All I could think to do this by creatingwould be to have a hidden Vector layer with no visibility, populatingpopulate it from your layerthe server, and then callinguse the getDataExtent() method to extract a bounding box. However, it seems a bit wastefulmessy and expensive.

You could do this by creating a Vector layer with no visibility, populating it from your layer, and then calling getDataExtent(). However, it seems a bit wasteful and expensive.

It's not clear what you are trying to achieve. Normally, the bounds of a projection are defined as global, unless the projection is specialised, like UK's BNG where the coordinate system only covers the UK.

If you want to prevent the user panning outside a certain zone, then the thing to set is restrictedExtent.

However, there's no easy way to get this bounding box from the server. All I could think to do would be to have a hidden Vector layer, populate it from the server, and use the getDataExtent() method to extract a bounding box. However, it seems a bit messy and expensive.

Post Undeleted by drunkenwagoner
Post Deleted by drunkenwagoner
Source Link

You could do this by creating a Vector layer with no visibility, populating it from your layer, and then calling getDataExtent(). However, it seems a bit wasteful and expensive.