import React, { useEffect } from 'react';
// import { zindexmarker } from '../zindex';
const zindexmarker = {
z:36,
hilightPlus:40,
zLabel:56
}
const {
css,
physics,
} = window.popmotionXL;
function renderMarker({ rzWarning, rzState }, { width }) {
return `
`
}
function YHJMHMarker({ data, dispatch, setting, zoom }) {
useEffect(() => {
const width = 18;
const placeholder = document.getElementById(`marker_yanhejuminhu_${data.id}`);
if (!placeholder) {
return;
}
const svgMarker = renderMarker(data, { width: width });
placeholder.innerHTML = svgMarker;
return () => {
placeholder.innerHTML = '';
}
}, []);
const showPop = () => {
dispatch.runtime.setCameraTarget({
center: [data.lgtd, data.lttd],
zoom: 18,
pitch: 60
})
dispatch.runtime.setFeaturePop({
id: data.id,
type: 'yanhejuminhu',
data,
lgtd: data.lgtd,
lttd: data.lttd,
elev: data.elev,
})
}
return (
<>
{
zoom > 18 && (
{data.name}
)
}
>
)
}
export default React.memo(YHJMHMarker);