public GeoRSS() { InitializeComponent(); elemLayer = MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; MyMap.Loaded += new RoutedEventHandler(MyMap_Loaded); var btn = new Button() { Width = 100, Height = 80, Content = "aaaa" }; fLayer.AddFeature(new Feature() { Geometry = new GeoPoint(0, 0), Style = new PredefinedMarkerStyle() { Size = 30, Color = new SolidColorBrush(Color.FromArgb(99, 00, 0xff, 00)) }, //ToolTip = new InfoBox() { Title="aaa", Description="BBBBBBBBBBb"} ToolTip = btn } ); FeaturesLayer.SetToolTipHorizontalOffset(btn, 100); MyMap.Layers.Add(fLayer); MyMap.ViewBoundsChanged += new EventHandler<ViewBoundsEventArgs>(MyMap_ViewBoundsChanged); var pp = new Pushpin() { Location = new Point2D(0, 0) }; pp.MouseLeftButtonDown += new MouseButtonEventHandler(pp_MouseLeftButtonDown); elemLayer.AddChild(pp); }
public ClosestFacility() { InitializeComponent(); arbitraryLayerE = this.MyMap.Layers["MyArbitraryLayerE"] as ElementsLayer; arbitraryLayerF = this.MyMap.Layers["MyArbitraryLayerF"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
public iServerJava6RClosestFacility() { InitializeComponent(); elementsLayerE = this.MyMap.Layers["MyElementsLayerE"] as ElementsLayer; elementsLayerF = this.MyMap.Layers["MyElementsLayerF"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
public iServerJava6RRouteCalculateMeasure() { InitializeComponent(); _routeLayer = MyMap.Layers["RouteLayer"] as FeaturesLayer; _elementsLayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer; GetFeaturesBySQLParameters param = new GetFeaturesBySQLParameters { DatasetNames = new List<string> { "Changchun:RouteDT_road" }, FilterParameter = new SuperMap.Web.iServerJava6R.FilterParameter { AttributeFilter = "RouteID = 1690", } }; GetFeaturesBySQLService ser = new GetFeaturesBySQLService(_dataUrl); ser.Failed += new EventHandler<ServiceFailedEventArgs>(ser_Failed); ser.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(ser_ProcessCompleted); ser.ProcessAsync(param); Pushpin pushpin1 = new Pushpin(); pushpin1.IsEnabled = false; pushpin1.Location = new Point2D(4020.0045, -4377.0273); pushpin1.Content = "A"; this._elementsLayer.AddChild(pushpin1); Pushpin pushpin2 = new Pushpin(); pushpin2.IsEnabled = false; pushpin2.Location = new Point2D(6214.1838, -4209.9278); pushpin2.Content = "B"; this._elementsLayer.AddChild(pushpin2); }
public UIActionsInElementsLayer( ) { InitializeComponent(); MyMap.Theme = new RawTheme(); elementsLayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer; featuresLayer = MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
public iServerJava6RFindMTSPPath() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; featuresLayerCenterPoints = this.MyMap.Layers["MyFeaturesLayer1"] as FeaturesLayer; Feature feature1 = new Feature { Geometry = new GeoPoint(4100, -4100), Style = new PredefinedMarkerStyle { Color = new SolidColorBrush(Colors.Red), Size = 20, Symbol = PredefinedMarkerStyle.MarkerSymbol.Star } }; featuresLayerCenterPoints.Features.Add(feature1); Feature feature2 = new Feature { Geometry = new GeoPoint(4500, -3000), Style = new PredefinedMarkerStyle { Color = new SolidColorBrush(Colors.Red), Size = 20, Symbol = PredefinedMarkerStyle.MarkerSymbol.Star } }; featuresLayerCenterPoints.AddFeature(feature2); Feature feature3 = new Feature { Geometry = new GeoPoint(5000, -3500), Style = new PredefinedMarkerStyle { Color = new SolidColorBrush(Colors.Red), Size = 20, Symbol = PredefinedMarkerStyle.MarkerSymbol.Star } }; featuresLayerCenterPoints.AddFeature(feature3); }
/// <summary>${ui_action_DrawPoint_constructor_Map_D}</summary> /// <example> /// <code lang="CS"> /// DrawPoint draw = new DrawPoint(MyMap,Cursors.Stylus) /// </code> /// </example> /// <param name="map">${ui_action_DrawPoint_constructor_Map_param_map}</param> /// <param name="cursor">${ui_action_MapAction_constructor_Map_param_cursor}</param> public DrawPoint(Map map , Cursor cursor) : base(map , "DrawPoint" , cursor) { DrawLayer = new ElementsLayer(); if (map.Theme == null) { Opacity = MagicNumber.ACTION_STYLE_DEFAULT_OPACITY; Size = MagicNumber.ACTION_STYLE_DEFAULT_SIZE; Color = new SolidColorBrush(Colors.Red); } else { this.Opacity = map.Theme.Opacity; this.Size = map.Theme.Size; this.Color = map.Theme.Color; } }
public GeoRSS() { InitializeComponent(); elementsLayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer; window = new InfoWindow(this.MyMap); this.MyMap.ViewBoundsChanged += new System.EventHandler<ViewBoundsEventArgs>(MyMap_ViewBoundsChanged); LoadRSS(url); DispatcherTimer updateTimer = new DispatcherTimer(); updateTimer.Interval = new TimeSpan(0, 0, 0, 60000); updateTimer.Tick += (s, args) => { LoadRSS(url); }; updateTimer.Start(); progress.Storyboard1.Begin(); }
public ServiceArea() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
public IS6Measure() { InitializeComponent(); featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; elementsLayer = this.MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; }
private void Activate(Point2D firstPoint) { if (Map == null || Map.Layers == null) { return; } DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); startPoint = firstPoint; polygon = new PolygonElement(); #region 所有风格的控制 polygon.Stroke = this.Stroke; polygon.StrokeThickness = this.StrokeThickness; polygon.StrokeMiterLimit = this.StrokeMiterLimit; polygon.StrokeDashOffset = this.StrokeDashOffset; polygon.StrokeDashArray = this.StrokeDashArray; polygon.StrokeDashCap = this.StrokeDashCap; polygon.StrokeEndLineCap = this.StrokeEndLineCap; polygon.StrokeLineJoin = this.StrokeLineJoin; polygon.StrokeStartLineCap = this.StrokeStartLineCap; polygon.Opacity = this.Opacity; polygon.Fill = this.Fill; polygon.FillRule = this.FillRule; #endregion points = new Point2DCollection(); polygon.Point2Ds = points; points.Add(firstPoint); points.Add(firstPoint); points.Add(firstPoint); DrawLayer.Children.Add(polygon); isDrawing = true; isActivated = true; }
private void Activate(Point2D firstPoint) { if (DrawLayer != null) { DrawLayer.Children.Clear(); } if (Map != null) { Map.Layers.Remove(DrawLayer); } DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); Map.Layers.Add(tempLayer); polyline = new PolylineElement(); #region 所有风格的控制 polyline.Stroke = Stroke; polyline.StrokeThickness = StrokeThickness; polyline.StrokeMiterLimit = StrokeMiterLimit; polyline.StrokeDashOffset = StrokeDashOffset; polyline.StrokeDashArray = StrokeDashArray; polyline.StrokeDashCap = StrokeDashCap; polyline.StrokeEndLineCap = StrokeEndLineCap; polyline.StrokeLineJoin = StrokeLineJoin; polyline.StrokeStartLineCap = StrokeStartLineCap; polyline.Opacity = Opacity; polyline.Fill = Fill; polyline.FillRule = FillRule; #endregion points = new Point2DCollection(); polyline.Point2Ds = points; points.Add(firstPoint); points.Add(firstPoint); DrawLayer.Children.Add(polyline); isDrawing = true; isActivated = true; }
/// <summary>${mapping_Map_method_openInfoWindow_D}</summary> /// <param name="location">${mapping_Map_method_openInfoWindow_param_location}</param> /// <param name="offsetPixelX">${mapping_Map_method_openInfoWindow_param_offsetPixelX}</param> /// <param name="offsetPixelY">${mapping_Map_method_openInfoWindow_param_offsetPixelY}</param> /// <param name="element">${mapping_Map_method_openInfoWindow_param_element}</param> public void OpenInfoWindow(Point2D location, double offsetPixelX, double offsetPixelY, UIElement element) { if (Layers.Count == 0) { return; }//待补充其他异常消除 if (windowsLayer == null) { windowsLayer = new ElementsLayer(); Layers.Add(windowsLayer); } windowsLayer.Children.Clear(); Point originPixel = this.MapToScreen(location); Point offsetPixel = new Point(originPixel.X + offsetPixelX, originPixel.Y + offsetPixelY); Point2D offsetLocation = this.ScreenToMap(offsetPixel); windowsLayer.AddChild(element, offsetLocation); }
public iServerJava6RMeasureTest() { InitializeComponent(); featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer; }
private void Activate(Point2D item) { if (Map == null || Map.Layers == null) { return; } DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); rectangle = new Rectangle(); rectangle.Stroke = this.Stroke; rectangle.StrokeThickness = this.StrokeThickness; rectangle.StrokeMiterLimit = this.StrokeMiterLimit; rectangle.StrokeDashOffset = this.StrokeDashOffset; rectangle.StrokeDashArray = this.StrokeDashArray; rectangle.StrokeDashCap = this.StrokeDashCap; rectangle.StrokeEndLineCap = this.StrokeEndLineCap; rectangle.StrokeLineJoin = this.StrokeLineJoin; rectangle.StrokeStartLineCap = this.StrokeStartLineCap; rectangle.Opacity = this.Opacity; rectangle.Fill = this.Fill; rectangle.SetValue(ElementsLayer.BBoxProperty , new Rectangle2D(item , item)); DrawLayer.Children.Add(rectangle); isActivated = true; isDrawing = true; }
public MapTest() { InitializeComponent(); featureLayer = MyMap.Layers["myf"] as FeaturesLayer; elementsLayer = MyMap.Layers["mye"] as ElementsLayer; }
public ISlocationsAllocate() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
/// <summary>${mapping_Map_method_closeInfoWindow_D}</summary> public void CloseInfoWindow() { if (windowsLayer != null) { Layers.Remove(windowsLayer); windowsLayer = null; } }
public iServerJava6RThemeGraph() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer; }
private void Activate() { pentagram = new PolygonElement(); #region 所有风格的控制 pentagram.Stroke = this.Stroke; pentagram.StrokeThickness = this.StrokeThickness; pentagram.Fill = this.Fill; pentagram.FillRule = this.FillRule; pentagram.Opacity = this.Opacity; pentagram.StrokeMiterLimit = this.StrokeMiterLimit; pentagram.StrokeDashOffset = this.StrokeDashOffset; pentagram.StrokeDashArray = this.StrokeDashArray; pentagram.StrokeDashCap = this.StrokeDashCap; pentagram.StrokeEndLineCap = this.StrokeEndLineCap; pentagram.StrokeLineJoin = this.StrokeLineJoin; pentagram.StrokeStartLineCap = this.StrokeStartLineCap; #endregion a0 = new Point2D(); a1 = new Point2D(); a2 = new Point2D(); a3 = new Point2D(); a4 = new Point2D(); points = new Point2DCollection(); pentagram.Point2Ds = points; oldPentagrams = new List<PolygonElement>(); DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); isActivated = true; isDrawing = true; }
public FindTSPPath() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
private void Activate(Point2D firstPoint) { if (Map == null || Map.Layers == null) { return; } polyline = new PolylineElement(); polyline.Stroke = Stroke; polyline.StrokeThickness = StrokeThickness; polyline.Opacity = Opacity; polyline.StrokeMiterLimit = StrokeMiterLimit; polyline.StrokeDashOffset = StrokeDashOffset; polyline.StrokeDashArray = StrokeDashArray; polyline.StrokeDashCap = StrokeDashCap; polyline.StrokeEndLineCap = StrokeEndLineCap; polyline.StrokeLineJoin = StrokeLineJoin; polyline.StrokeStartLineCap = StrokeStartLineCap; polyline.Fill = Fill; polyline.FillRule = FillRule; points = new Point2DCollection(); polyline.Point2Ds = points; points.Add(firstPoint); DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); DrawLayer.Children.Add(polyline); isActivated = true; isDrawing = true; }
public iServerJava6RServiceArea() { InitializeComponent(); elementsLayer = this.MyMap.Layers["MyElementsLayer"] as ElementsLayer; featuresLayer = this.MyMap.Layers["MyFeaturesLayer"] as FeaturesLayer; }
public UIActionsInArbitraryLayer() { InitializeComponent(); elementsLayer = MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; }
public CustomDrawStar() { InitializeComponent(); elementslayer = MyMap.Layers["MyElementsLayer"] as ElementsLayer; }
public Code() { InitializeComponent(); arbitrarylayer = this.MyMap.Layers["MyArbitraryLayer"] as ElementsLayer; MyMap.ViewBoundsChanged += new System.EventHandler<ViewBoundsEventArgs>(MyMap_ViewBoundsChanged); }
private void Activate(Point2D item) { if (Map == null || Map.Layers == null) { return; } ellipse = new Ellipse(); #region 所有风格的控制 ellipse.Stroke = Stroke; ellipse.StrokeThickness = StrokeThickness; ellipse.Fill = Fill; ellipse.StrokeMiterLimit = StrokeMiterLimit; ellipse.StrokeDashOffset = StrokeDashOffset; ellipse.StrokeDashArray = StrokeDashArray; ellipse.StrokeDashCap = StrokeDashCap; ellipse.StrokeEndLineCap = StrokeEndLineCap; ellipse.StrokeLineJoin = StrokeLineJoin; ellipse.StrokeStartLineCap = StrokeStartLineCap; ellipse.Opacity = Opacity; #endregion DrawLayer = new ElementsLayer(); Map.Layers.Add(DrawLayer); ellipse.SetValue(ElementsLayer.BBoxProperty, new Rectangle2D(item, item)); DrawLayer.Children.Add(ellipse); isActivated = true; isDrawing = true; }
public MainPage() { InitializeComponent(); featuresLayer = MyMap.Layers["myFeaturesLayer"] as FeaturesLayer; elementsLayer = MyMap.Layers["myElementsLayer"] as ElementsLayer; feature = new Feature(); feature.Geometry = new GeoRegion { Parts = new ObservableCollection<Point2DCollection> { new Point2DCollection() { new Point2D(0,0), new Point2D(10000000,0), new Point2D(10000000,10000000), new Point2D(0,10000000), new Point2D(0,0) }, new Point2DCollection() { new Point2D(-10000000,0), new Point2D(0,-10000000), new Point2D(-10000000,-10000000), new Point2D(-10000000,0) } } }; Feature fmline = new Feature(); fmline.Geometry = new GeoLine { Parts = new ObservableCollection<Point2DCollection> { new Point2DCollection() { new Point2D(-5000000,5000000), new Point2D(-10000000,10000000), }, new Point2DCollection() { new Point2D(5000000,-5000000), new Point2D(10000000,-10000000), } } }; Feature fpoint = new Feature() { Geometry = new GeoPoint(0, 0) }; featuresLayer.AddFeature(fpoint); featuresLayer.AddFeature(fmline); featuresLayer.Features.Add(feature); elementsLayer.Children.Clear(); Pushpin pushpin = new Pushpin { Content = "test", Location = new Point2D(0, 0) }; //elementsLayer.AddChild(pushpin); MyMap.MouseLeftButtonDown += new MouseButtonEventHandler(MyMap_MouseLeftButtonDown); MyMap.MouseLeftButtonUp += new MouseButtonEventHandler(MyMap_MouseLeftButtonUp); MyMap.MouseRightButtonDown += new MouseButtonEventHandler(MyMap_MouseRightButtonDown); MyMap.MouseRightButtonUp += new MouseButtonEventHandler(MyMap_MouseRightButtonUp); featuresLayer.MouseLeftButtonDown += new EventHandler<FeatureMouseButtonEventArgs>(featuresLayer_MouseLeftButtonDown); featuresLayer.MouseLeftButtonUp += new EventHandler<FeatureMouseButtonEventArgs>(featuresLayer_MouseLeftButtonUp); featuresLayer.MouseRightButtonDown += new EventHandler<FeatureMouseButtonEventArgs>(featuresLayer_MouseRightButtonDown); featuresLayer.MouseRightButtonUp += new EventHandler<FeatureMouseButtonEventArgs>(featuresLayer_MouseRightButtonUp); }