- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是传单的新手,我想为源自 geojson 格式的点 map 特征添加标签。
我收到错误:TypeError:layer.bindLabel 不是此脚本中的函数 https://jsfiddle.net/gfiske/ksx600sn/35/ (取消注释第 129 行)
任何人都可以提出解决方法或更好的方法吗?
谢谢。
geojsonLayer = L.geoJson(geojson, {
style: function(feature) {
return {
color: feature.properties.GPSUserColor
};
},
pointToLayer: function(feature, latlng) {
return new L.CircleMarker(latlng, {
radius: 7,
fillOpacity: 0.75
});
},
onEachFeature: function(feature, layer) {
layer.bindPopup(feature.properties.MAP_LABEL);
layer.bindLabel(feature.properties.MAP_LABEL);
}
});
最佳答案
来自 Leaflet.label
的文档:
NOTE: starting with Leaflet 1.0, L.Label is added to Leaflet core as L.Tooltip and this plugin is deprecrated.
bindTooltip
反而:
onEachFeature: function(feature, layer) {
layer.bindPopup(feature.properties.MAP_LABEL);
layer.bindTooltip(feature.properties.MAP_LABEL);
}
关于使用 geojson 功能的传单 .bindLabel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41726844/
我是传单的新手,我想为源自 geojson 格式的点 map 特征添加标签。 我收到错误:TypeError:layer.bindLabel 不是此脚本中的函数 https://jsfiddle.ne
Ng-select 没有向客户端显示 bindLabel 值。也没有一个错误。我有几个 ng-select 下拉菜单。它在一个 div 中的一个下拉列表中显示值。但是,即使我在另一个 div 中使用相
我想让 ng-select 在属性 bindLabel 中有两个值。我有这样的东西: 但是在bind label 中我想要bindLabel= firstName + lastName。像这样:
使用 Angular 6,我想在 ng-select 标签 内的 bindLabel 中 连接 Firstname 和 Lastname ? 这是我的 html: ng-select [items]=
我是一名优秀的程序员,十分优秀!