Closed TimoStaudinger closed 7 years ago
That is interesting. But how would that behave when there is too many characters?
@george-silva Good point and not something we have been worrying about so far. In our case, the text will never exceed 2 characters, the plus sign and one digit.
In general, I think the trivial solution of letting the text overflow the marker is also best approach here. This leaves it up the the library user to make sure the text length does not exceed the marker width. It also does not hide any information from the user in case it does exceed it.
Any other solution seems too opinionated in regards to the design and look and feel of the embedding site. E.g. it would be possible to have a 'textbox' extend over the borders of the marker, but I think that looks kind of shitty: (and not only because of my ninja-level mockup skills :-) )
Then again, maybe the use case is simply too narrow to include it in the library. In this case, I'll just work on my own clone. Looking forward to your thoughts.
Hey @TimoSta !
Well, I guess this might not really belong here.
Let's close this issue and monitor. If there are any other requests for this, we can talk something out later. What do you think?
Sure, that works for me. I'll make the change in my own repo then. We can always merge it back later if there is demand.
Ok, cool. Thanks for the suggestion, nevertheless. Looking forward for other collabs.
For our project, we have a requirement to be able to add some additional text to the marker below the icon, e.g.:
This will be used to represent locations with more than one meaning, in the case of the mock-up e.g. 'Coffee and one other offer'.
The API could look like this:
Is that something you would like to see as part of the library? If so, I will happily implement and merge it.