#472: overviewmap should display cross when getting too narrow
----------------------------------+-----------------------------------------
Reporter: openlayers | Owner: tschaub
Type: feature | Status: new
Priority: minor | Milestone: 2.5 Release
Component: Control.OverviewMap | Version:
Resolution: | Keywords:
----------------------------------+-----------------------------------------
Comment (by openlayers):
Currently, when OverviewMap.extentRectangle gets too small, it disappears
entirely. I like the idea of the cross-hair - that's what MapServer does,
and it works well. But if we aren't going to have that, perhaps we could
at least keep extentRectangle from disappearing?
In OverviewMap.setRectPxBounds(), we have two lines:
{{{
this.extentRectangle.style.height = parseInt(Math.max(bottom -
top, 0))+ 'px';
this.extentRectangle.style.width = parseInt(Math.max(right - left,
0)) + 'px';
}}}
If we change this to:
{{{
this.extentRectangle.style.height = parseInt(Math.max(bottom -
top, 2))+ 'px';
this.extentRectangle.style.width = parseInt(Math.max(right - left,
2)) + 'px';
}}}
extentRectangle never disappears. (I've been playing with this in IE6,
and IE6, if height and width are 1, extentRectangle still disappears.)
--
Ticket URL: <http://trac.openlayers.org/ticket/472#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer