void Events_MapLoaded(Map map, DeepEarth.Events.MapEventArgs args) { _SourceControl = (MapSourceControl)map.Navigation.Toolbar; List<MapSourceControl.TileSourceIds> srcList = new List<MapSourceControl.TileSourceIds>(); srcList.Add(MapSourceControl.TileSourceIds.Osmarend); srcList.Add(MapSourceControl.TileSourceIds.Mapnik); _SourceControl.TileSources = srcList; }
void MapLoaded(Map map, DeepEarth.Events.MapEventArgs args) { _SourceControl = (MapSourceControl)map.Navigation.Toolbar; List<MapSourceControl.TileSourceIds> srcList = new List<MapSourceControl.TileSourceIds>(); srcList.Add(MapSourceControl.TileSourceIds.BlueMarbleLocal); srcList.Add(MapSourceControl.TileSourceIds.BlueMarbleWeb); _SourceControl.TileSources = srcList; }
void MapLoaded(Map map, DeepEarth.Events.MapEventArgs args) { _SourceControl = (MapSourceControl)map.Navigation.Toolbar; List<MapSourceControl.TileSourceIds> srcList = new List<MapSourceControl.TileSourceIds>(); srcList.Add(MapSourceControl.TileSourceIds.VeAerial); srcList.Add(MapSourceControl.TileSourceIds.VeHybrid); srcList.Add(MapSourceControl.TileSourceIds.VeRoad); _SourceControl.TileSources = srcList; map.BaseLayer.Source = new VeTileSource(VeMapModes.VeHybrid); //SetMapSource(VeMapModes.VeHybrid); }
private void Events_MapMouseWheel(BIT.AVL.Silver.Map.Map map, DeepEarth.Events.MouseWheelEventArgs args) { _UpdateSlider = true; }
void Events_MapMouseWheel(BIT.AVL.Silver.Map.Map map, DeepEarth.Events.MouseWheelEventArgs args) { if(!_IsMouseOver || args.Delta == 0) { return; } int adjustment = args.Delta > 0 ? WheelZoomLevelAdjustment : -WheelZoomLevelAdjustment; map.ZoomOnPixelPoint(_MousePixelPosition, adjustment); args.Handled = true; }
/// <summary> /// Pan the map (move it) the default amount (10%) in a standard direction /// </summary> /// <param name="direction">The direction to pan, tradional 8 point of the compass</param> public void Pan(DeepEarth.Direction direction) { Size mapSize = MapViewPixelSize; double offset = mapSize.Width / 10; switch(direction) { case Direction.North: Pan(0, -offset); break; case Direction.NorthEast: Pan(offset, -offset); break; case Direction.NorthWest: Pan(-offset, -offset); break; case Direction.South: Pan(0, offset); break; case Direction.SouthEast: Pan(offset, offset); break; case Direction.SouthWest: Pan(-offset, offset); break; case Direction.East: Pan(offset, 0); break; case Direction.West: Pan(-offset, 0); break; default: throw new ArgumentOutOfRangeException("direction"); } }