|
@@ -127,7 +127,7 @@ function addPointMarker(BMapGL, point) {
|
|
|
if (props.showMarkerName && name) {
|
|
if (props.showMarkerName && name) {
|
|
|
const label = new BMapGL.Label(`<div class="gis-marker-label-text">${escapeHtml(name)}</div>`, {
|
|
const label = new BMapGL.Label(`<div class="gis-marker-label-text">${escapeHtml(name)}</div>`, {
|
|
|
position,
|
|
position,
|
|
|
- offset: new BMapGL.Size(-90, -props.markerSize - 8)
|
|
|
|
|
|
|
+ offset: new BMapGL.Size(-28, -props.markerSize - 8)
|
|
|
})
|
|
})
|
|
|
label.setStyle({ border: 'none', background: 'transparent', padding: '0' })
|
|
label.setStyle({ border: 'none', background: 'transparent', padding: '0' })
|
|
|
label.addEventListener('click', (event) => {
|
|
label.addEventListener('click', (event) => {
|
|
@@ -178,7 +178,7 @@ function addLine(BMapGL, line) {
|
|
|
if (!props.showMarkerName) return
|
|
if (!props.showMarkerName) return
|
|
|
const label = new BMapGL.Label(`<div class="gis-marker-label-text">${escapeHtml(name)}</div>`, {
|
|
const label = new BMapGL.Label(`<div class="gis-marker-label-text">${escapeHtml(name)}</div>`, {
|
|
|
position,
|
|
position,
|
|
|
- offset: new BMapGL.Size(-90, -props.markerSize - 8)
|
|
|
|
|
|
|
+ offset: new BMapGL.Size(-28, -props.markerSize - 8)
|
|
|
})
|
|
})
|
|
|
label.setStyle({ border: 'none', background: 'transparent', padding: '0' })
|
|
label.setStyle({ border: 'none', background: 'transparent', padding: '0' })
|
|
|
label.addEventListener('click', (event) => {
|
|
label.addEventListener('click', (event) => {
|
|
@@ -277,20 +277,19 @@ defineExpose({
|
|
|
|
|
|
|
|
.gis-marker-label-text {
|
|
.gis-marker-label-text {
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- width: 180px;
|
|
|
|
|
|
|
+ width: 56px;
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
|
- padding: 2px 6px;
|
|
|
|
|
|
|
+ padding: 2px 1px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
color: #22405c;
|
|
color: #22405c;
|
|
|
background: rgba(255, 255, 255, 0.92);
|
|
background: rgba(255, 255, 255, 0.92);
|
|
|
border: 1px solid rgba(118, 151, 181, 0.32);
|
|
border: 1px solid rgba(118, 151, 181, 0.32);
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
box-shadow: 0 2px 6px rgba(31, 74, 121, 0.12);
|
|
box-shadow: 0 2px 6px rgba(31, 74, 121, 0.12);
|
|
|
- font-size: 12px;
|
|
|
|
|
- line-height: 16px;
|
|
|
|
|
|
|
+ font-size: 9px;
|
|
|
|
|
+ line-height: 12px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
|
|
+ overflow-wrap: anywhere;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|