SelectionGraphicLayer class not available under WinForms Namespace

3162
0
02-07-2016 11:27 PM
Udaya_BhaskerCheerala
New Contributor

Hi All,

As per ESRI help for ArcGIS SDK for Windows Mobile 3, "SelectionGraphicLayer" class has been moved from Mobile to WinForms Namespace. But when I searched in

WinForms Namespace for "SelectionGraphicLayer" it is not available.

We are migrating our ArcGIS Windows Mobile application which was built on version 10 to 10.2.1. While compiling the code we are getting the below error

"The type or namespace name 'SelectionGraphicLayer' could not be found (are you missing a using directive or an assembly reference?)" at below class which was

inherited from "SelectionGraphicLayer"

/// Custom Layer for handling geometry highlighting

///

public class CustomSelectionGraphicLayer : SelectionGraphicLayer

{

私人ESRI.ArcGIS.Mobile.FeatureCaching.Symbol米_pointSymbol;

private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();

//protected override void Draw(ESRI.ArcGIS.Mobile.Display display)

protected override void Draw(ESRI.ArcGIS.Mobile.MapSurface display)

{

try

{

Geometry[] geom = this.Map.SelectedGeometries.ToArray();

foreach (Geometry item in geom)

{

//display.DrawGeometry(this.SelectionSymbol.Pen, this.SelectionSymbol.Brush,this.SelectionSymbol.PointSize, item);

display.DrawGeometry(this.SelectionSymbol.Pen, this.SelectionSymbol.Brush, this.SelectionSymbol.PointSize, item);

}

}

catch (Exception ex)

{

Logger.ErrorException(ex.ToString(), ex);

}

}

}

Hence we inherited the class from "MapGraphicLayer" as below, but this time we are getting below errors

"'ArcGISMobileClient.CustomControls.CustomSelectionGraphicLayer'

does not contain a definition for 'SelectionSymbol' and no extension method 'SelectionSymbol' accepting a

first argument of type 'ArcGISMobileClient.CustomControls.CustomSelectionGraphicLayer'

could be found (are you missing a using directive or an assembly reference?)"

"'ESRI.ArcGIS.Mobile.WinForms.Map' does not contain a definition for 'SelectedGeometries' and no extension method 'SelectedGeometries' accepting a

first argument of type 'ESRI.ArcGIS.Mobile.WinForms.Map' could be found (are you missing a using directive or an assembly reference?)"

/// Custom Layer for handling geometry highlighting

///

public class CustomSelectionGraphicLayer : MapGraphicLayer

{

私人ESRI.ArcGIS.Mobile.FeatureCaching.Symbol米_pointSymbol;

private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();

//protected override void Draw(ESRI.ArcGIS.Mobile.Display display)

protected override void Draw(ESRI.ArcGIS.Mobile.MapSurface display)

{

try

{

Geometry[] geom = this.Map.SelectedGeometries.ToArray();

foreach (Geometry item in geom)

{

//display.DrawGeometry(this.SelectionSymbol.Pen, this.SelectionSymbol.Brush,this.SelectionSymbol.PointSize, item);

display.DrawGeometry(this.SelectionSymbol.Pen, this.SelectionSymbol.Brush, this.SelectionSymbol.PointSize, item);

}

}

catch (Exception ex)

{

Logger.ErrorException(ex.ToString(), ex);

}

}

}

Can anyone help me how resolve this issue.

Thanks in advance,

Uday

0Kudos
0 Replies