Label for MapPoint

Description of the limitation and why it is relevant to address

image
image

Submitter proposed design (optional)

I want to add a label, but a MapLabel scales independently of the MapPoint I provided. I would like an additional argument named label: Optional[str] = None
if label:
add MapLabel at right location to features

Hi @Johan_Tuls,

I think I might understand what you mean. As a potential solution: have you though about adding a togglebutton that the user can click to switch labels on/off? Would that not do the same thing as what you describe with the additional argument?

Hi Roeland,

An option could be to place MapLabel instead of MapPoints, but a MapLabel isn’t a MapFeature, so there is no entity_link present.
So a work around could be to add Points/Labels and show them based on a toggle, but as a user I would like to have one image of all CPT’s (in my case) see which one is which and go to the corresponding entity.

Also I don’t know how big the project is and therefor the size/scale of the label. So it should scale the same way the MapPoints scale but with readable text.

Hello,

You say

as a user I would like to have one image of all CPT’s (in my case) see which one is which and go to the corresponding entity

That’s a very understandable request, but I don’t understand quite what is preventing you from building that with the current tools. I think you mean you may not want to show the MapPoints (the markers) at all and still have the user be able to click a label? That is (currently) not possible, but if you give the user input to determine whether or not to show the labels and the size of the labels I think you solve the unknown project size and the request from users in one go? This is what we do in GeoTools:

and then if your project is bigger the user can simply zoom out and scroll to a different label size:

Does that solve your issue or am I misunderstanding what you need?

N.B., you can also set fixed_size=True on a maplabel to have the maplabel scale exactly the same as a mappoint