Go to documentation repository
Page History
The MAP object corresponds to the Map system object.
The MAP object sends the events presented in the table. Procedure The procedure is started when the corresponding event appearsoccurs. Format The format of the events procedure for the mapMap:
Code Block |
---|
OnEvent("MAP", "_id_","_event_" [,"_parameters_"]) |
...
Event | Description |
LAYER_ACTIVATED | Layer activation. This event is received when a Layer layer is selected on the Map. The layer ID is put into the obj_id<> parameter .has the ID of the activated layer |
ACTIVATE_OBJECT | Object activation. The event is received when an object is selected (activated by mouse click) on the mapMap. Parameters:
obj_id <> – object ID
|
OBJDBLCLK | The event is received when you double click an object on the Map. Contains the same parameters as ACTIVATE_OBJECT |
Operator format to describe actions with the mapMap:
Code Block |
---|
DoReact("MAP","_id_","_command_" [,"_parameters_"]); |
The list of commands and parameters for the MAP object is given presented in the table.
Command | Parameters | Description |
SET_TOPMOST – set TOPMOST—Set topmost | - | - |
SET_NOTOPMOST – cancel —Cancel topmost | - | - |
HIDE_OBJECT – OBJECT—Hide/show object icon on the map | objtype<> | Object IDtype. Can be left empty. If the object type is not set, then objects of all types are hidden/shown. |
objid<> | Object ID. Can be left empty. If the object ID is not set, then all objects of the specified type are hidden/shown. | |
hide<> | 0 – —objects are shown on the map. 1 – —objects are hidden on the map. | |
SET_OBJECT_GEOMETRY – set GEOMETRY—Set object location on the map | objtype<> | Object type. |
objid<> | Object ID. | |
x<> | New coordinate of the top left corner of the object icon on the map layer in pixels along the X axis .in pixels | |
y<> | New coordinate of the top left corner of the object icon on the map layer in pixels along the Y axis .in pixels | |
exclude_children<> | By default, when using the SET_OBJECT_GEOMETRY reaction, when moving the object icons, the names of these objects (child objects) also move. If you pass the exclude_children <1> parameter in the reaction, then the object is moved separately from the children, that is, without its name.their names | |
INSCRIBE – inscribe —Inscribe to window | - | - |
SHOW_MINIMAP – show MINIMAP—Show a minimap | x<> | The coordinate of the upper-top left corner of the minimap along the X axis in pixels. |
y<> | The coordinate of the upper-top left corner of the minimap along the Y axis in pixels. | |
w<> | Width of the minimap in pixels. | |
h<> | Height of the minimap in pixels. | |
monitor<> | Monitor ID. | |
__slave_id<> | Net Computer network name. | |
SET_ZOOM - set —Change the Map scale. | zoom<> | Map scale ratio |
ACTIVATE_OBJECT—Activate object on the Map | obj_type<> | Object type |
obj_id<> | Object ID | |
layer<> | Map layer ID. If the parameter is set, the script will work on the specified layer. If the parameter is not set, the scrip will work on the current layer |
Example. Hide the Camera 10 on the Map 1 on the Macro 10.
Code Block |
---|
OnEvent("MACRO","10","RUN") { DoReact("MAP","1","HIDE_OBJECT","objtype<CAM>,objid<10>,hide<1>"); } |
...