Is there a way to apply CSS to custom markers on a Here JS Map? We are using version 3.0 of the JS API and I just want to know if there are any selectors I can use or anything along those lines to apply CSS to the markers. I haven't found anything so far.
We are using an SVG marker based on: https://developer.here.com/documentation/examples/maps-js/markers/map-with-svg-graphic-markers
Thanks
The example you shared uses H.map.Marker
which is according to documentation, a visual representation of a location on a map in the form of a static bitmap icon.
For styleable marker you should use H.map.DomMarker
:
// assuming DOMElement already exists
var domMarker = new H.map.DomMarker(map.getCenter(), {
icon: new H.map.DomIcon(DOMElement)
})
Here is a simple jsfiddle page with DomMarker which changes opacity on hover using CSS rules.
See DomMarker documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With