[OpenLayers-Trac] [OpenLayers] #340: maxExtent interpretation

OpenLayers trac at openlayers.org
Tue Jul 31 12:46:12 EDT 2007


#340: maxExtent interpretation
----------------------+-----------------------------------------------------
  Reporter:  tschaub  |       Owner:  tschaub    
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.5 Release
 Component:  Map      |     Version:             
Resolution:           |    Keywords:             
----------------------+-----------------------------------------------------
Comment (by tschaub):

 I have a new position on this.  Since we already have a "very loose"
 interpretation of maxExtent, I think it's easiest to add a new property
 that controls pan/zoom behavior.  I've been using a restrictedExtent
 property that gets interpreted "loosely" according to my definition above.

 In terms of a "strict" interpretation, I don't think it works well with
 OL.  For example, I don't think it makes sense that the resolution (or
 zoom if you must) of the map change with a window resize.  We have a fixed
 set of resolutions - in my mind the map center is the other absolute.  We
 can try hard to keep the extent within some defined bounds, but I think we
 should respect resolutions first and map center second.

 A bit more on resolution/center: if a user is browsing map with viewport
 that is some percentage of the window width (say 100%) and they want to
 bookmark their position - I think they assume that when they return to
 that bookmarked location, the center and resolution are the same -
 regardless of the size of their browser window.  Given a map with data
 that is resolution dependent (certain data only shown at certain
 resolutions), we get in to real trouble if one person says "I see layer X
 when I zoom to 10" and another person says "I see layer Y when I zoom to
 10".  This would occur on variable sized maps with a "strict"
 interpretation of maxExtent with regard to map browsing.

 So, I'm in favor of respecting resolution/center and of adding a
 restrictedExtent property that gets interpreted "loosely" with regard to
 map browsing.  This would leave the current behavior untouched.  Then, it
 might make sense to revisit this at 3.0.

 If nobody has any better proposal (patch), I'll add a patch for
 restrictedExtent for 2.5.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/340#comment:12>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list