refresh the  ActiveMapDisplay

1585
4
02-15-2011 02:19 AM
manasadevi
New Contributor
Dear all,

My query is how to refresh the ActiveMapDisplay i.e, to say the current displayed map in arcgis explorer programmatically, (using c#.net).

The actual issue is, when I am trying to change the visibility (on/off) of a ServiceLayer from code-behind, it happens successfully and the map refreshes automatically.... but in case of a ServiceChildLayer, it doesn't reflect on the mapdisplay, unless the the map is refreshed from the content window....

ServiceChildLayer scl=new ServiceChildLayer();
scl.Visible=false;

the above code does change the property of the servicechildlayer..but it does not reflected on the map..
so..
Is there any method to refresh the activemapdisplay?....is my question

thanx in advance
0 Kudos
4 Replies
AndreiIvanov
New Contributor III
Try calling ClearCache(). It should help.
0 Kudos
manasadevi
New Contributor
Thank you very much Andriy for the reposnse
...I am glad to say that, it did help.

But, as this ClearCache() method is for Layer Type(applicable only to ServiceLayer), and not for ServiceChildLayer,...
is there any way to get the name of the ServiceLayer of the ServiceChildLayer which I have?

Since by using ServiceChildLayer.Parent will only give me the name of the immediate parent of it, the parent can be another ServiceChildLayer or a ServiceLayer. But in my case I am trying to access the ServiceLayer of the ServiceChildLayer directly, irrespective of its level.
0 Kudos
AndreiIvanov
New Contributor III
The easiest way would be writing recursive function to get the top Parent.
0 Kudos
CharlesEngen
New Contributor

I am new to ArcGIS Explorer Desktop.  If I have created a Geometry.Point with a symbol.  after I use the Graphic.Visible= false the graphic stays on the display.  I am not using layers (as far as I understand)

What do I need to do to update the ActiveMapDisplay so that this symbol does not display?

I am trying to make the Geometry.Point blink on and off, using the Graphic.Visible property.

Thanks in advance for any help you can offer!

0 Kudos