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 am adding two FeatureGraphicsLayer to a GraphicDataSet like so:

 graphicsFunctionality.GraphicsDataSet.Tables.Add(featGraphicsLayer);

It looks like it puts the last one in on the very top of all the other FeatureGraphicsLayers.

I need to add one to the bottom of the GraphicsDataSet.

Is this possible?

Is there a ways to change the order of FeatureGraphicsLayers once they are in the GraphicsDataSet?

share|improve this question

1 Answer 1

Un-tested, un-proven, and not an expert here, but you could try something like this...

    graphicsMapFunctionality.GraphicsDataSet.Tables.Add(eventsFeatureGraphicsLayer)
    gdsInsertAt(eventsFeatureGraphicsLayer2, graphicsMapFunctionality,graphicsMapFunctionality.GraphicsDataSet.Tables.Count)

Protected Sub gdsInsertAt(ByVal theTableToInsert As Data.DataTable, ByVal graphicsMF As ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapFunctionality, ByVal index As Integer)
    Dim tableList As List(Of Data.DataTable) = New List(Of Data.DataTable)
    For i = 0 To graphicsMF.GraphicsDataSet.Tables.Count - 1
        tableList.Insert(i, graphicsMF.GraphicsDataSet.Tables(i))
    Next
    tableList.Insert(index, theTableToInsert)
    graphicsMF.GraphicsDataSet.Tables.Clear()
    graphicsMF.GraphicsDataSet.Tables.AddRange(tableList.ToArray)
End Sub

This will change the order of the tables, but I'm not sure how it affects the rendering.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.