When I modify the ZoomLevelSet I lose the ability to scroll using the mouse wheel or double click. Mouse wheel will only scroll out but not in and double click seems unresponsive. This is very easy to reproduce with the simple code below.
private
void
OnMap_Loaded(
object
sender, RoutedEventArgs e)
{
MainMap.Background =
new
SolidColorBrush(
new
Color() { A = 0x30, R = 0x00, G = 0x50, B = 0x50 });
MainMap.MapUnit = GeographyUnit.DecimalDegree;
MainMap.CurrentExtent =
new
RectangleShape(-180, 90, 180, -90);
MainMap.RestrictExtent =
new
RectangleShape(-180, 90, 180, -90);
MainMap.MapTools.Logo.Source =
null
;
MainMap.MapResizeMode = MapResizeMode.PreserveScale;
SetCustomScales();
_coverageOverlay =
new
LayerOverlay();
_coverageOverlay.WrappingMode = WrappingMode.None;
_coverageOverlay.TileBuffer = 2;
_coverageOverlay.DrawingExceptionMode = DrawingExceptionMode.DrawException;
_coverageOverlay.DrawingQuality = DrawingQuality.HighQuality;
_coverageOverlay.TileType = TileType.MultipleTile;
try
{
TiledWmsLayer coverageLayer = coverageLayer =
new
TiledWmsLayer();
coverageLayer.ServerUris.Add(
new
Uri(
"<a href="localhost">localhost</a>:21151/geoserver/ows"
));
coverageLayer.ActiveLayerNames.Add(
"GEOTIFF150M"
);
coverageLayer.AxisOrder = WmsAxisOrder.XY;
coverageLayer.Credentials =
new
NetworkCredential(
"admin"
,
"geoserver"
);
coverageLayer.DrawingExceptionMode = DrawingExceptionMode.DrawException;
coverageLayer.Parameters.Add(
"VERSION"
,
"1.1.1"
);
coverageLayer.Parameters.Add(
"TILED"
,
"true"
);
_coverageOverlay.Layers.Clear();
_coverageOverlay.Layers.Add(coverageLayer);
}
catch
(Exception ex)
{
}
MainMap.Overlays.Add(
"coverage"
, _coverageOverlay);
}
private
void
SetCustomScales()
{
ZoomLevelSet zls =
new
ZoomLevelSet();
zls.CustomZoomLevels.Add(
new
ZoomLevel(150000000));
zls.CustomZoomLevels.Add(
new
ZoomLevel(9000000));
zls.CustomZoomLevels.Add(
new
ZoomLevel(500000));
zls.CustomZoomLevels.Add(
new
ZoomLevel(9000));
zls.CustomZoomLevels.Add(
new
ZoomLevel(1000));
MainMap.ZoomLevelSet = zls;
}
Could someone please help me get the default mouse functionality back after modifying the ZoomLevelSet?
Thanks
Ben