Leaflet path: how can I set a css class?

后端 未结 6 1423
一个人的身影
一个人的身影 2021-01-07 23:13

Well the title says it all but here is some code so you see what i mean.

function eachFeature(feature, layer) {
     layer.on({
         mouseover: highlight         


        
6条回答
  •  时光说笑
    2021-01-07 23:56

    If you use SVG, then you can get container as this._container and update it class.

    If you use Canvas, then there are will be problems, because canvas drowning don't support DOM styles and drawing with content.

    So you can't use styles with different implementations and better use styles.

提交回复
热议问题