Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
insert_map_layer [2015/10/12 16:48]
admin
insert_map_layer [2026/08/28 03:25] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Insert ​Layer Map ====== ​+====== Insert Map Layer ======
  
 ===== Description ===== ===== Description =====
  
-This functor inserts ​a layer in a map in certain ​position ​with a given name.+Inserts or replaces ​a layer of a map at given position.
  
 ===== Inputs ===== ===== Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Map  | [[Map Type]] ​ | Map where the layer will be inserted. ​  ​+| Map  | [[Map Type]] ​ | Map the new layer is inserted ​into 
-| Layer  | [[Map Type]] ​ | Map whose first layer will be inserted ​in Map.   ​+| Layer  | [[Map Type]] ​ | Map whose first layer will be inserted ​into Map. Any further layers are ignored.  ​
-| Layer Position ​ | [[Positive ​Integer Value Type]] ​ | Position where the layer will be inserted ​in the mapIf the position is higher ​than the current number of layers ​in the map, the new layer will be placed in the last position. |+| Layer Position ​ | [[Non Negative ​Integer Value Type]] ​ | Position where the layer is inserted. ​A value of zero, or one greater ​than Map'​s ​current number of layers, ​appends ​the new layer at the end |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^
-| Layer Name  | [[Name Type]] ​ | Name the layer will have in the mapA unique ​name is required. If Nonean automatic ​unique name will be generated. ​ | None  | +| Layer Name  | [[Name Type]] ​ | Name the layer receives inside MapIf the layer is being replaced and no name is giventhe replaced layer'​s original name is kept; if the layer is being added and no name is given, a unique name is generated ​automatically.  | .none  | 
-| Replace Layer  | [[Boolean Value Type]] ​ | If true, replace ​the layer at the given position with the new layer. ​Otherwise, the layer located ​at the given position ​(and all following layers) ​is shifted to the next position to accommodate ​the new layer. ​ | False  |+| Replace Layer  | [[Boolean Value Type]] ​ | If true, the layer at Layer Position is replaced by the new layer. ​If false, the layer currently ​at that positionand every layer after it, is shifted ​forward ​to make room for the new layer. This flag has no effect when the new layer is appended at the end.  | No  |
  
-===== Output ​=====+===== Outputs ​=====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Map  | [[Map Type]] ​ | Map containing the new layer. ​ |+| Map  | [[Map Type]] ​ | Map containing the new layer alongside the layers it already had.  |
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#Map Algebra|Map Algebra]]+[[Functor List#Map Algebra | Map Algebra]] 
 + 
 +===== Notes ===== 
 + 
 +Only the first layer of Layer is used; any further layers it has are ignored. 
 + 
 +Layer must already be in the same format as Map; no conversion is performed.
  
 ===== Internal Name ===== ===== Internal Name =====
  
 InsertMapLayer InsertMapLayer
 +