A few words about map markers. Markers can be global, i.e. visible by everyone connected to the game, or local, visible only by certain users. Therefore marker commands have global commands, like createMarker (without word Local at the end) and local, like createMarkerLocal (with word Local at the end). If you apply global command to local marker it will change local marker params globally thus converting the marker from local to global in the process. If you apply local command to global marker, it will only change marker params locally.

There are custom markers, which could be created by double clicking on the map. You can select icon, colour and locality when creating it. For more info select “SHOW INFO” while at it. Locality is defined by the selected VOIP channel at the time of the custom marker creation. Usually default channel is SIDE CHANNEL. This will create a marker, local to your side. Because it is local, it will not appear in allMapMarkers array on the server, but will be added to all JIP players which are on the same side as you are.

Markers created on GLOBAL CHANNEL are global and will appear in allMapMarkers array on the server. All other channels are self explanatory, apart from DIRECT CHANNEL. I am not sure what would happen with this one. Will all people in proximity see marker and will the marker disappear with distance? I don’t know.

Custom markers have the following naming format _USER_DEFINED#1234567890/0, _USER_DEFINED#1234567890/1, _USER_DEFINED#1234567890/2, …etc. There is a bug with this system at the moment which allows for duplicate marker creation, so I stop here. When this is fixed I might revisit this again.

markerShape “Ellipse” and “Rectangle” markers will resize with map zoom, this allows to define precise areas on the map. markerShape “Icon” markers, will not resize. This post is about how to make them behave like “Ellipse” and “Rectangle”.

Here is the script used in the video:

0 = 0 spawn { waitUntil {!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { if (visibleMap) then { _scale = 0.05 / ctrlMapScale (_this select 0); { _m = "#markerSize_" + _x; if (markerShape _x == "ICON") then { if (isNil {missionNamespace getVariable _m}) then { missionNamespace setVariable [_m, markerSize _x]; }; _x setMarkerSizeLocal [ ((missionNamespace getVariable _m) select 0) * _scale, ((missionNamespace getVariable _m) select 1) * _scale ]; }; } forEach allMapMarkers; }; }]; };

Because of the duplication bug mentioned above the script will fail on duplicate markers. Considering that marker duplication is pretty serious matter, I’m hopping this will be resolved soon.

Enjoy,
KK