How to apply CSS to Here Maps API Markers

CustardBun

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

Tomas

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.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Google maps API markers content hide by default

分類Dev

How to manage Markers well using google maps api v2 on android

分類Dev

How to fetch results from an offset when the API doesn't support offset (HERE Maps API)

分類Dev

Google Maps API 3 - Show All Markers on Screen, but Keep Centerpoint

分類Dev

Setting listeners to groups of markers using Google Maps API

分類Dev

Google Map API V3 - infowindows @ markers on 2 maps

分類Dev

Here Maps API ERROR: Cannot initialize Map Fragment UNKNOWN

分類Dev

How to hide/show groups of markers by category with Google Maps in Android?

分類Dev

How to get all markers in google-maps-react

分類Dev

How to Add Google Maps with Multiple Markers Showing Infowindows on Load and on Click

分類Dev

How to delete markers from my own google maps

分類Dev

How to get bounds after map drag in Here Maps

分類Dev

How to retreive speed limit from here maps given a latitude and longitude?

分類Dev

Google Maps API 3 Load Markers from MySQL from current position

分類Dev

Get Markers Addresses in Input fields using Drag-able Google Maps API V3

分類Dev

Map markers not rendering - Google Maps Javascript API v3 In Phonegap

分類Dev

ReactJS and Google Maps - Displaying Markers

分類Dev

Here Maps ApiをSpringブートに統合する方法は?

分類Dev

Placing Circles instead of Markers in google maps

分類Dev

Google maps delete all markers and then create new

分類Dev

Google Maps: infobox turns up behind markers?

分類Dev

Draw circles around multiple markers in Maps

分類Dev

Google Maps fit markers in custom bounds

分類Dev

How to group jquery objects to apply css together?

分類Dev

How to apply a CSS class on ItemTemplate eval

分類Dev

How to apply a CSS property to multiple elements individualy

分類Dev

How to apply CSS code from array in AngularJS?

分類Dev

How to get my Android device GPS location via Here API?

分類Dev

How to get the time of public transport in maps api

Related 関連記事

  1. 1

    Google maps API markers content hide by default

  2. 2

    How to manage Markers well using google maps api v2 on android

  3. 3

    How to fetch results from an offset when the API doesn't support offset (HERE Maps API)

  4. 4

    Google Maps API 3 - Show All Markers on Screen, but Keep Centerpoint

  5. 5

    Setting listeners to groups of markers using Google Maps API

  6. 6

    Google Map API V3 - infowindows @ markers on 2 maps

  7. 7

    Here Maps API ERROR: Cannot initialize Map Fragment UNKNOWN

  8. 8

    How to hide/show groups of markers by category with Google Maps in Android?

  9. 9

    How to get all markers in google-maps-react

  10. 10

    How to Add Google Maps with Multiple Markers Showing Infowindows on Load and on Click

  11. 11

    How to delete markers from my own google maps

  12. 12

    How to get bounds after map drag in Here Maps

  13. 13

    How to retreive speed limit from here maps given a latitude and longitude?

  14. 14

    Google Maps API 3 Load Markers from MySQL from current position

  15. 15

    Get Markers Addresses in Input fields using Drag-able Google Maps API V3

  16. 16

    Map markers not rendering - Google Maps Javascript API v3 In Phonegap

  17. 17

    ReactJS and Google Maps - Displaying Markers

  18. 18

    Here Maps ApiをSpringブートに統合する方法は?

  19. 19

    Placing Circles instead of Markers in google maps

  20. 20

    Google maps delete all markers and then create new

  21. 21

    Google Maps: infobox turns up behind markers?

  22. 22

    Draw circles around multiple markers in Maps

  23. 23

    Google Maps fit markers in custom bounds

  24. 24

    How to group jquery objects to apply css together?

  25. 25

    How to apply a CSS class on ItemTemplate eval

  26. 26

    How to apply a CSS property to multiple elements individualy

  27. 27

    How to apply CSS code from array in AngularJS?

  28. 28

    How to get my Android device GPS location via Here API?

  29. 29

    How to get the time of public transport in maps api

ホットタグ

アーカイブ