[mapguide-trac] #1589: Ajax Quick Plot: Capture box cannot move or rotate when base layers exist

MapGuide Open Source trac_mapguide at osgeo.org
Thu Jan 27 03:01:59 EST 2011


#1589: Ajax Quick Plot: Capture box cannot move or rotate when base layers exist
---------------------------+------------------------------------------------
   Reporter:  wuma         |       Owner:  Mars Wu
       Type:  defect       |      Status:  new    
   Priority:  high         |   Milestone:  2.3    
  Component:  AJAX Viewer  |     Version:         
   Severity:  major        |    Keywords:         
External_id:  1377366      |  
---------------------------+------------------------------------------------
 If there are base layers existing in a MapDefinition, then the quick plot
 capture box cannot move or rotate in Ajax viewer.

 The reason is like below:
 When quick plot capture box is active, to determine if the capture box
 should be dragged with the mouse move, there is code detecting if the
 mouse pointer is in the capture box area, it is a "if a point is in a
 rectangle" check. To do this check, the mouse pointer position will be
 converted to map units.

 To convert mouse's position to map units, we need to consider the
 "offsetTop" of the "map". The code used map container div whose is with id
 "img1" to calculate the offsetTop recursively. While <div id="img1"> is a
 "relative positioned" element, its offsetTop will be affected by its
 previous sibling: <div id="tilePlanes">. When there are base layers, then
 <div id="tilePlanes"> will contain tiles which fulfill the screen. It
 makes the <div id="img1"> 's offsetTop is always the windown's height
 which is wrong.

 The correct way is: instead of getting the offsetTop from <div id="img1">
 recursively, I should get it from <img id="mapImage1"> which is the map
 image and always fulfill the viewer.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1589>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list