SetChildLayerOpCallback

globalmapper.SetChildLayerOpCallback((function aCallbackFunc, object aUserData)) None[source]

Sets the function to call to report the load or close of a child layer. This happens during draw or export of a map catalog or online layer. The layer handle provided via the callback can then be used in other function calls that take a layer handle so you can do things like customize vector styles. You can get the parent layer handle by calling GetLayerInfo. Notice that the aCallBackFunc and aUserData are actually part of a tuple, which is passed into the function as a single parameter.

Parameters:
  • aCallbackFunc (function) – The callback function; see below

  • aUserData (object) – User data that will be passed back to callback function. May be any Python object

Returns:

Nothing

Return type:

None

The callback function should be a function which has the following parameters:

Parameters:
  • aChildLayer (GM_LayerHandle_t32) – Handle to new loaded layer

  • aChildLayerOp (GM_ChildLayerOp_t8) – The operation (i.e. load or close) that just happened

  • aParentLayer (GM_LayerHandle_t32) – Handle to new loaded layer’s parent

  • aUserData (object) – User data original provided in call to set this callback

  • aReserved (uint32) – Reserved for future use; defaults to 0