Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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();
share|improve this question
4  
This question appears to be about an issue which may no longer exist and the asker has not been seen on the site for more than 18 months so I have voted to close it. –  PolyGeo Sep 22 '13 at 1:41
add comment

closed as off-topic by PolyGeo, blah238, BradHards, Get Spatial, Fezter Sep 22 '13 at 10:38

  • This question does not appear to be about geographic information systems within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.