BlueMap-Minecraft / BlueMap

A Minecraft mapping tool that creates 3D models of your Minecraft worlds and displays them in a web viewer.
https://bluecolo.red/bluemap
MIT License
1.92k stars 131 forks source link

Bluemap not loading anymore after adding a new marker #202

Closed braydofficial closed 3 years ago

braydofficial commented 3 years ago

What i did / Steps to reproduce

I tried to add a new marker, which worked perfectly in the past with previous markers, but after this I get an error and can't use the web-app anymore.

Expected result

Marker should be added to the map and the web map should work as usual.

Actual result

Web map isn't working anymore and the following error is shown:

Error
Initialization: TypeError: undefined is not an object (evaluating 'n.iconAnchor.x')

Removing the added marker doesn't get the web map back as usual.

Context

BlueMap Version: 1.4.2

Add more context here!

TBlueF commented 3 years ago

Pretty sure there is a missing "x" coordinate in some markers iconAnchor. Would it be possible for you to provide the markers.json?

braydofficial commented 3 years ago

Pretty sure there is a missing "x" coordinate in some markers iconAnchor. Would it be possible for you to provide the markers.json?

Of course. See below. I tested it again, after I got it to work by deleting all render data and rendering the map again, but as soon as I added a marker back I get the error again.

{
  "markerSets": [
    {
      "id": "markers",
      "label": "Markers",
      "toggleable": true,
      "defaultHide": false,
      "marker": [
        {
          "id": "mine",
          "type": "poi",
          "map": "world",
          "position": {
            "x": 566.875,
            "y": 76.0,
            "z": -2020.617
          },
          "minDistance": 0.0,
          "maxDistance": 100000.0,
          "label": "Mine",
          "newTab": true,
          "icon": "assets/poi.svg",
          "anchor": {
            "x": 25,
            "y": 45
          }
        }
      ]
    }
  ]
}
TBlueF commented 3 years ago

@thisdudeisvegan I can not reproduce this, I setup a fresh Spigot 1.17 server, added BlueMap-1.4.2, rendered the spawn, checked the web-app (all fine) then i added a markers.json with the exact content you just posted, and reloaded the web-app:

image Working fine without any error in the console.

Do you have any other ideas how i can reproduce this? :)

braydofficial commented 3 years ago

@thisdudeisvegan I can not reproduce this, I setup a fresh Spigot 1.17 server, added BlueMap-1.4.2, rendered the spawn, checked the web-app (all fine) then i added a markers.json with the exact content you just posted, and reloaded the web-app:

image Working fine without any error in the console.

Do you have any other ideas how i can reproduce this? :)

Weird. Also, somehow your Webapp is looking different than mine, while I've also installed 1.4.2.

Bildschirmfoto 2021-06-13 um 21 10 48 Bildschirmfoto 2021-06-13 um 21 12 31
TBlueF commented 3 years ago

Ah, you have the old web-app :) You probably updated BlueMap without deleting the bluemap/web/index.html (which is mentioned in the update-notes that it is required). Deleting that file will cause bluemap to update your web-app. Do that and your issue is likely solved as well :)

braydofficial commented 3 years ago

Ah, you have the old web-app :) You probably updated BlueMap without deleting the bluemap/web/index.html (which is mentioned in the update-notes that it is required). Deleting that file will cause bluemap to update your web-app. Do that and your issue is likely solved as well :)

Oh yes, this fixed the issue. Thank you very much!