With the changes to things being indexed by path instead of name,
old hashes would stop working. To make this a bit less jarring, we
can fall back to the default tileset of a world, which means the
map would still load.
Overlays should only show up for the base layers they apply to,
however, we've had them show up for all base layers in a world.
To fix this, we first change things to be indexed by the unique path,
not the human-readable name (which is not supposed to be always unique).
Then, we remove and add overlay layers to the layerCtrl as needed on a
baselayerchange event.
CSS margin is always relative to the containing element. For some
reason, using the browser inspector, this does not get propagated
properly. Adding a containing element with the size of the child element
allows us to use margin to offset the icon.
The initial map view was not affected by the 'defaultZoom' property in the config file. This has been fixed, by passing the value into 'centers' collection, when it is initially created. Additionally, the 'defaultZoom' config property is passed to the first overviewer.map.setView statement, to ensure correct zoom level on the initial page load.
I'd move the event setup into addTo, but JS is utter garbage and thinks
"this" in a function callback like that should be whatever, not where you
actually define it.
The spawn and location icons should now have the tip of the icon
image point at the actual location. Previously, the icons were
centred onto it, which was slightly off in the vertical direction.
Unfortunately we need to explicitly tell leaflet not to scale them
weirdly but to make them perceptually equivalent to the normal ones,
which means we have hardcoded icon sizes for those two right now.
Instead of stuffing specialised values into overviewer.collections,
put a reference to the overviewerConfig tileset entry into the leaflet
layer, so that we can access it from callbacks easily.
Many things do not work at the moment:
* Missing world selector
* Missing overlays (overlay tilesets and markers)
* Missing urlhash code
* Probably other stuff