i'm trying to draw on the ESRI map enabled to Microsoft Surface (ESRI Map -> Surface) but i can't find the way to do so. The problem is that the Draw method (which come from the ArcGIS API for WPF, the original one) needs a map ESRI and with this Surface project, this type of map is different (necessary to run on Surface). I thought that using Reflector, i could open the original Draw method and try to modify it to make it work with the "Surface Map" but it's way too complex for me ... Does someone already tried to do that kind of thing ? I'm really stuck with it! If it's not clear enough, just let me know. Thanks in advance.
edit :
private void SurfaceButton_ContactEnter(object sender, ContactEventArgs e)
{
_graphicsLayer = surfaceMap.Map.Layers["MyGraphicLayer"] as GraphicsLayer;
var pointConverter = new PointCollectionConverter();
var pointCollection1 = pointConverter.ConvertFromString(_data) as ESRI.ArcGIS.Client.Geometry.PointCollection;
var polygon1 = new ESRI.ArcGIS.Client.Geometry.Polygon();
polygon1.Rings.Add(pointCollection1);
var graphic = new Graphic()
{
Geometry = mercator.FromGeographic(polygon1),
Symbol = LayoutRoot.Resources["DefaultFillSymbol"] as Symbol
};
if (_graphicsLayer != null)
_graphicsLayer.Graphics.Add(graphic);
}
Here is the code of my button, which should add a polygon into the map. But nothing appends. On my graphicLayer : Opacity = 1.0, Visibility = true. And the DefaultFillSymbol has Red properties.
edit : Maybe something wrong with my layer ?
GraphicsLayer gl = new GraphicsLayer()
{
ID = "MyGraphicLayer",
Opacity = 1,
Visible = true
};
surfaceMap.Map.Layers.Add(gl);
if (!gl.IsInitialized)
gl.Initialize();
