None of the issues here can not be worked around, so they aren't pressing, but I thought I'd write them down if somebody else wants to use squaremap like I do.
Basically, my goal is to render a static map and copy the files to a different server to host. Without real-time updates or player tracking, just the map.
The flow is:
- have the plugin as idle as possible (see my config below)
- execute
/map fullrender <world> in a cronjob periodically (daily in my case)
- I'm running the server using
systemd service and minecraftd script from https://github.com/Edenhofer/minecraft-server this allows me to easily script things and/or run them with cron 5 3 * * * minecraftd command /map fullrender minecraft:overworld
- execute
rsync to copy the generated map to the remote server after the render
Thanks to #393 this is achievable with a couple of caveats.
The issues
- there doesn't seem to be a
config.yml option for configuring static mode. Workaround is to add static to the web/tiles/settings.json file yourself and exclude it from being synced to the server:
{
// ...other settings
"static": true
}
- even though
player-tracker is disabled, the web/tiles/players.json will contain an array of logged-on users that only have { world, name, uuid } values, no x and z. This causes Squaremap.toLatLng method to do math on undefined. I think the players array should just always be empty when tracking is disabled. Stack trace:
Error: Invalid LatLng object: (NaN, NaN)
at new Z (leaflet-src.js:1473:11)
at Object.S [as latLng] (leaflet-src.js:1577:11)
at gs.toLatLng (Squaremap.js:117:18)
at new is (Player.js:45:34)
at ns.updatePlayerList (PlayerList.js:129:26)
at a (PlayerList.js:32:18)
at PlayerList.js:55:40
at PlayerList.js:46:21
at Squaremap.js:159:20
Right now, if these 2 json files are ignored from automatically syncing to the web server, so as not to override customizations, the map works flawlessly. Here's the config.yml I'm currently using.
config-version: 2
settings:
language-file: lang-en.yml
update-checker: false
web-address: https://my.sever
web-directory:
path: web
auto-update: true
image-quality:
compress-images:
enabled: true
value: 0.5
internal-webserver:
enabled: false
ui:
coordinates:
enabled: true
link:
enabled: true
sidebar:
pinned: pinned
render-progress-logging:
enabled: false
world-settings:
default:
map:
enabled: true
background-render:
enabled: false
markers:
update-interval-seconds: 3600
spawn-icon:
enabled: true
world-border:
enabled: false
show-controls: false
visibility-limits:
- type: world-border
enabled: false
player-tracker:
enabled: false
update-interval-seconds: 3600
show-controls: false
minecraft:overworld:
map:
display-name: Overworld
minecraft:the_nether:
map:
display-name: Nether
iterate-up: true
minecraft:the_end:
map:
display-name: End
Thanks for the plugin, it's great!
None of the issues here can not be worked around, so they aren't pressing, but I thought I'd write them down if somebody else wants to use squaremap like I do.
Basically, my goal is to render a static map and copy the files to a different server to host. Without real-time updates or player tracking, just the map.
The flow is:
/map fullrender <world>in a cronjob periodically (daily in my case)systemdservice andminecraftdscript from https://github.com/Edenhofer/minecraft-server this allows me to easily script things and/or run them with cron5 3 * * * minecraftd command /map fullrender minecraft:overworldrsyncto copy the generated map to the remote server after the renderThanks to #393 this is achievable with a couple of caveats.
The issues
config.ymloption for configuringstaticmode. Workaround is to addstaticto theweb/tiles/settings.jsonfile yourself and exclude it from being synced to the server:player-trackeris disabled, theweb/tiles/players.jsonwill contain an array of logged-on users that only have{ world, name, uuid }values, noxandz. This causesSquaremap.toLatLngmethod to do math onundefined. I think the players array should just always be empty when tracking is disabled. Stack trace:Right now, if these 2 json files are ignored from automatically syncing to the web server, so as not to override customizations, the map works flawlessly. Here's the
config.ymlI'm currently using.Thanks for the plugin, it's great!