[fusion-trac] #492: If a point feature is set as the selection then
the map zooms to the scale 1:1
Fusion
trac_fusion at osgeo.org
Tue Nov 22 00:23:22 EST 2011
#492: If a point feature is set as the selection then the map zooms to the scale
1:1
--------------------------+-------------------------------------------------
Reporter: yangte | Owner: yangte
Type: defect | Status: new
Priority: P3 | Milestone: 2.3
Component: MapGuide | Version: 2.0
Severity: Minor | Keywords: setSelection, setExtents, 1:1
External_id: 1383396.01 | State: New
Browser: All | Os: Windows
--------------------------+-------------------------------------------------
If a point feature is set as the selection then the map zooms to a scale
of 1:1. The map should not zoom so far to a point feature. It would be
rarely that 1:1 is useful for a GIS user.
Steps to reproduce:[[BR]]
1. Create a layer based on a point feature and add it to a map[[BR]]
2. View the map in fusion web layout[[BR]]
3. Use the ‘Query’ widget to find one of the features on the point
layer[[BR]]
4. Select one of the found features in the Results list and then click the
‘Select’ button[[BR]]
5. Map is zoomed to 1:1[[BR]]
6. Same thing happens when the setSelection javascript function is
called.[[BR]]
7. Same thing happens if a point feature is manually selected and then
‘Zoom Selection’ is used[[BR]]
8. Same thing happens when choosing a result from the ‘Search’
widget[[BR]]
all these functions will call the js function "setExtents" in Map.js,
when the parameter "oExtents" is a point which should be a rectangle, it
will zoom to 1:1, to prevent this situation, I suggest to add a check like
this:
[[BR]]
{{{
if(oExtents.bottom == oExtents.top && oExtents.left == oExtents.right)
{
this.oMapOL.panTo(new OpenLayers.LonLat(oExtents.left, oExtents.top));
}
}}}
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/492>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list