Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Add more markers to source server #20

Open
indig0fox opened this issue Apr 20, 2021 · 0 comments
Open

Add more markers to source server #20

indig0fox opened this issue Apr 20, 2021 · 0 comments

Comments

@indig0fox
Copy link

Marker References:

return $this->my_curl('https://r3icons.titanmods.xyz/markers.json');

On my personal clone, I've hardcoded in local site reference, with these placed in /assets/images/markers. It requires an update to the function below to make it return a static array of compatible marker names (see end of desc.).

It also required an update here for the JS player to use the new icons accordingly.

R3-Web/dist/assets/app.js

Lines 1180 to 1185 in ac92ae0

var poiIcon = L.icon({
iconUrl: 'https://r3icons.titanmods.xyz/' + markerType + '.png',
iconSize: iconSize,
iconAnchor: iconAnchor,
className: 'obj-marker-image obj-marker-image--' + markerType
});

replaced with iconUrl: '/assets/images/markers/' + markerType + '_black.png',

Please update the source site (https://r3icons.titanmods.xyz/) with additional "mil" and "hd" icons, both in JSON reference & with the source image files. Images included in the attached .zip below. This will let anyone still using the server reference expand what editor-placed markers are displayed in the JS player without needing to make the same changes to their source code.
markers.zip

public function getObjectiveMarkers() {
		return '[
"ellipse",
"hd_objective",
"hd_marker",
"hd_flag",
"hd_arrow",
"mil_arrow2",
"hd_ambush",
"hd_destroy",
"hd_start",
"hd_end",
"hd_pickup",
"hd_join",
"hd_warning",
"hd_unknown",
"hd_dot",
"mil_box",
"mil_triangle",
"mil_dot",
"mil_objective",
"mil_flag",
"mil_arrow",
"mil_ambush",
"mil_destroy",
"mil_start",
"mil_end",
"mil_pickup",
"mil_join",
"mil_warning",
"mil_unknown"
]'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant