AGI STK Esri Display 11 Send comments on this topic.
StopMapEditing Method (IAgEsri3dRenderer)
See Also  Example
Canceled
Cancels the edit operation (the map must not have been modified).





Description

Call after modifying the map document.

Syntax

[Visual Basic .NET]
Public Sub StopMapEditing( _
   ByVal Canceled As Boolean _
) 

[C#]
public void StopMapEditing(
bool Canceled
);

[Managed C++]
public: void StopMapEditing(
bool Canceled
);

[Java]
public  stopMapEditing(
bool Canceled
);

[Unmanaged C++]
public: HRESULT StopMapEditing(
VARIANT_BOOL Canceled
);

Parameters

Canceled
Cancels the edit operation (the map must not have been modified).

Remarks

You must use this method in conjunction with StartMapEditing before making changes to the map document currently opened in the renderer. This puts the GIS thread on hold, making sure that the map document information is not being accessed by 2 threads at the same time.

When StopMapEditing is called, the renderer re-generates its caches, ensuring that the latest map information is being used.

If Canceled is true, the cached map information is not re-generated, and it is assumed that the map was not modified.

Example

[C#] Copy Code
// Popup AddDataCommand 
ICommand addDataCommand = new ESRI.ArcGIS.Controls.ControlsAddDataCommand(); 
AddDataCommandHook hook = new AddDataCommandHook(m_AxAgUiAxVOCntrl.Handle); 
addDataCommand.OnCreate(hook as object); 
addDataCommand.OnClick(); 
 
// Get the new map from the hook and load it into the GIS thread 
object obj = m_Renderer.Context.SaveObject(hook.MapDocument.ActiveView.FocusMap); 
IMap newMap = m_Renderer.Context.LoadObject(obj) as IMap; 
 
// Begin Map Editing Session 
m_Renderer.StartMapEditing(AgESTKesriCallOptions.eEsri3dBlocking); 
 
// Add new layers to current map 
IMap map = m_Renderer.MapDocument.ActiveView.FocusMap; 
map.AddLayers(newMap.get_Layers(nullfalse), false); 
 
// End Map Editing Session 
m_Renderer.StopMapEditing(false); 

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1