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.85k stars 129 forks source link

more Marker Settings #281

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hey,

i have found the options to configure the markers a bit light. For example I would love to be force that the Label is always displayed. Just right next to the icon, like the player name. Also I would love to add a description, shown both on the map under the label and in the marker panel. I tried every option out there but cant make it work. So I guess its not implemented right?

LG

TBlueF commented 2 years ago

You can use the html-marker to basically make a fully custom marker using everything html and css (and possibly JS) provide ^^ A description for the marker-list is not possible (yet).

We can put this on the TODO (i already have a broad "expand the web-app" in the back of my head) but that will be low-prio for now.

If you need super custom stuff, you can always clone BlueMapVue and pretty easily modify and extend it yourself (with some JS-knowledge) :)

ghost commented 2 years ago

Can you provide a example? I had the reference code copied from your template and it did not show any differences (still only icon on map)

TBlueF commented 2 years ago

on https://bluemap.bluecolored.de/wiki/customization/Markers.html it has lots of examples including one for the html-marker:

{
    "id": "swamp",
    "type": "html",
    "map": "world",
    "position": { "x": -60, "y": 100, "z": 3400 },
    "label": "Swamp",
    "html": "<div style='line-height: 2em; font-size: 2em; color: white; transform: translate(-50%, -50%);'>Swamp</div>",
    "anchor": { "x": 0, "y": 0 },
    "minDistance": 250.0,
    "maxDistance": 4000.0
}

In this case only some floating text but its plain html/css so much possibility :)

ghost commented 2 years ago

yes tried exactly that. does not show anything. i reloaded of course.

Web capture_2-1-2022_214056_85 214 24 153 Screenshot 2022-01-02 214125

TBlueF commented 2 years ago

You have "type": "poi" instead of "type": "html". For further discussion let's please switch to our Discord, GitHub is really a bad place for support :)

ghost commented 2 years ago

I have to say this is a somewhat odd solution, because it leaves more questions that it answers.

image

and thats just a few of the technical questions, like i have never seen a map (in real life) with markers that have no label, imagine goole maps without labels, that would be like, the most requested feature?

TBlueF commented 2 years ago

first, why is there a hidden marker set called html? how do I even know that this id is already in use?

Not sure if i understand the question,.. there is no hidden marker-set with the id html .. There is a markertype html.. The same way as there are shape and line marker-types which are a region or a line on the map, the html marker is an html-element on the map. The poi marker-type is just a convenience "child" of the html marker that shows an icon and (when you click on it) some text. Admitted, the documentation is not complete yet, but all marker-types have an example on the wiki-page i linked above.

second, what does the "detail" property do at all? it doesn't get displayed either.

The detail property on a poi-Marker shows some (html-formatted-)text when you click on the icon. On the html-marker there is no detail property.

third, what i am asking is already implemented just hidden. judging from the screenshot below (what happens when it cant find the icon) you would only have to switch the text field and font-color

It's the default behaviour of your browser to show the alternative-text of an image if it cant load the image. Nothing that got implemented on purpose. I am not saying that what you are suggesting is hard to implement, at all. I am saying that bluemap has a HUGE TODO, and i need to filter what i want to implement right now, and what is not necessary.

like i have never seen a map (in real life) with markers that have no label, imagine goole maps without labels, that would be like, the most requested feature?

It's definitely not the most requested feature. If you want this, you can always implement it as a new marker-property or new marker-type, and make a Pull-Request with your feature. If it's done in a clean way then it will be merged :)

ghost commented 2 years ago

About the type-property that was my fault mixing it up. I thought you would first define the marker sets and then link the markers to the set by the type.

About the detail-property. That does not work on click. Nether on the Icon on the map nor on the marker panel. If you try to click that on the map it always selects the block under it.

About the label being displayed right next to the icon. That is a figure of speech, I hoped you would imagine how you would feel using google maps without labels right next to the icons. Imagine zooming in the city you visit and only seeing the icons but not the label of the shops/bars/nightclubs.

TBlueF commented 2 years ago

About the detail-property. That does not work on click. Nether on the Icon on the map nor on the marker panel. If you try to click that on the map it always selects the block under it.

Yep, sorry i mixed that one up: The detail property only works for shape, line and extrude markers .. The poi marker displays its label if you click on it:

image chrome_z0HauqQrFu

I added those example markers to the bluemap-demo map: https://bluecolored.de/bluemap/ If you want to look at them. And this is the markers.json of the demo-map: https://bluecolored.de/bluemap/data/markers.json

ghost commented 2 years ago

Thank you for providing this. While it is almost what I am looking for the html-code demo is more like a PUBG/Fortnite kind of thing, where players want to coordinate what region they want to navigate to. Also I still would argue the label should be right next to the icon instead of a popup when you click it. Just like playernames besides the playericon.

Also, does a different version of Bluemap run on your server? the navigation-menu bar is waaaaaaaaaaaay smaller than on my server. Or is there a setting I missed?