-
Notifications
You must be signed in to change notification settings - Fork 0
/
zomTo_old_csharp.txt
30 lines (22 loc) · 1.27 KB
/
zomTo_old_csharp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
private void ZoomTo(double xCoord, double yCoord)
{
var gl = Utilities.Help_Layer.GetGraphicsLayer("SampleLayer", "Samples", true);
gl.Graphics.Clear();
ESRI.ArcGIS.Client.Geometry.MapPoint pt = new ESRI.ArcGIS.Client.Geometry.MapPoint( xCoord, yCoord, Utilities.ClientMap.SpatialReference);
ESRI.ArcGIS.Client.Geometry.Envelope env = new ESRI.ArcGIS.Client.Geometry.Envelope(xCoord-100, yCoord - 100, xCoord + 100, yCoord + 100);
var gl1 = new ESRI.ArcGIS.Client.Graphic
{
Geometry = pt,
Symbol = new ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol
{
Color = new SolidColorBrush(Colors.Red),
Size = 15,
Style = ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol.SimpleMarkerStyle.Circle
}
};
//gl1.Attributes.Add("Field1", 1);
//gl1.Attributes.Add("Field2", "You may be here.");
//gl1.Attributes.Add("Field3", "Plugins are awesome");
gl.Graphics.Add(gl1);
Utilities.ClientMap.ZoomTo(env);
}