Opened 14 years ago
Closed 14 years ago
#1585 closed defect (fixed)
Zoom Rectange doesn't work properly in Ajax viewer
Reported by: | wuma | Owned by: | Mars Wu |
---|---|---|---|
Priority: | low | Milestone: | 2.3 |
Component: | AJAX Viewer | Version: | |
Severity: | trivial | Keywords: | |
Cc: | External ID: | 1380783 |
Description
With "Zoom Rectangle" command active, if I digitize a rectangle on screen which has a ratio of (width / height) < ratio of (map width / map height) The map will zoom to a wrong scale. (see attached screen shot) The zoomed map should contain all features in the zoom rectangle.
Attachments (2)
Change History (6)
by , 14 years ago
Attachment: | zoom_to_rectangle.jpg added |
---|
comment:1 by , 14 years ago
by , 14 years ago
Attachment: | zoom_rectangle.patch added |
---|
comment:2 by , 14 years ago
External ID: | → 1380783 |
---|
comment:3 by , 14 years ago
Milestone: | 2.2 → 2.3 |
---|---|
Version: | 2.2.0 |
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The reason is: in function ExecuteRectangleTool, the scale calculation and zoom is done this way:
In screen space, coordinates increase from top-left corner to bottom-right corner, while in map CS space, the coordinates increase from bottom-left corner to top-right corner. As a result, mcsH will be a negative number. While in above function, it is used as a positive number. Then the calculated scale is wrong.