Hi Elvin,
I am not aware that this is even possible in the Google Maps API. FWIW our code
does this
markerItems.map((item) => {
let marker = this.markers[item.uri];
if(!marker) {
marker = new google.maps.Marker({
map: this.map,
})
marker.addListener('click', () => this.onClick(item))
this.markers[item.uri] = marker;
}
marker.setIcon(this.getMarkerIcon(item));
marker.setLabel(this.getMarkerLabel(item));
marker.setPosition({ lat: item.lat, lng: item.long});
marker.setTitle(sanitizeHTMLOnlyBTags(item.label));
usedMarkers[item.uri] = true;
})
for(let itemURI in this.markers) {
if(!usedMarkers[itemURI]) {
let marker = this.markers[itemURI];
marker.setMap(null);
delete this.markers[itemURI];
}
}
I guess the intention is that the marker labels are just short texts that
appear on top of the icon, and thus have predictable background.
https://developers.google.com/maps/documentation/javascript/markers
Markers | Maps JavaScript API | Google for Developers
developers.google.com
Given that you don't really know what the background would be I don't know how
you would choose a suitable color. For example if you make it white, how would
it know that the background isn't white at this place on the map.
Holger
> On 4 Dec 2023, at 12:22 pm, [email protected] <[email protected]>
> wrote:
>
> Currently we seem to have little control of styling geographic objects that
> are also MapContext instances. For example using tbgeo:text to display a
> label of the item on the map. Can we control things like CSS styling? Color,
> font. alignment etc?
> The documentation doesn’t mention it so I guess not, but on darker map areas
> the default black rendering is very hard to read so I’d like to have some
> more fine grained control over styling these things.
> <Schermafbeelding 2023-12-04 om 12.16.26.png><Schermafbeelding 2023-12-04
> om 12.20.31.png>
>
>
> --
> The topics of this mailing list include TopBraid EDG and related technologies
> such as SHACL.
> To post to this group, send email to [email protected]
> ---
> You received this message because you are subscribed to the Google Groups
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/47acfbfb-5abc-463b-a53e-53d6b68c0168n%40googlegroups.com
>
> <https://groups.google.com/d/msgid/topbraid-users/47acfbfb-5abc-463b-a53e-53d6b68c0168n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <Schermafbeelding 2023-12-04 om 12.20.31.png><Schermafbeelding 2023-12-04
> om 12.16.26.png>
--
The topics of this mailing list include TopBraid EDG and related technologies
such as SHACL.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google Groups
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/B92F55A9-CAE8-48BE-99E8-B0CBE02F3242%40topquadrant.com.