You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Globe
ref={globeRef}
width={width}
height={(width / 4) * 9}
htmlElement={(gData) => {
const el = document.createElement("div");
el.className = "custom-markerss";
el.innerHTML = markerSvg;
el.style["pointer-events"] = "auto";
el.style.cursor = "pointer";
const tooltip = document.createElement("div");
tooltip.className = "tooltipss";
tooltip.textContent = gData.city;
tooltip.style.display = "none";
el.onmouseenter = () => {
tooltip.style.display = "block";
};
el.onmouseleave = () => {
tooltip.style.display = "none";
};
el.appendChild(tooltip);
return el;
}}
htmlElementsData={gData}
backgroundColor="#161616"
// markerData={myCordinates}
hexPolygonsData={countries.features}
hexPolygonResolution={4}
hexPolygonMargin={0.6}
hexPolygonColor={() => "#FE490C"}
showAtmosphere={false}
showGlobe={false}
/>
I have this globe but it is causing performance issues as it is blocking UI and other animations for like three seconds and the user is not able to scroll through the page until the globe loads. Is there any solution by which we can increase the loading speed hence increasing the performance?
Thank you for your valuable suggestions.
The text was updated successfully, but these errors were encountered:
Reducing the hexPolygonResolution will decrease the number of objects and therefore improve the rendering performance.
You can also switch to using circular dots via hexPolygonUseDots={true} which alleviates the rendering somewhat.
Thank you for your response, hexPolygonUseDots={true} does increase the performance when used over hexPolygonResolution but now there are less number of dots which is not exactly like the globe I want. hexPolygonResolution={4} works perfectly and is exactly the way I want. Can I get the same number of dots using hexPolygonUseDots?
@xbugfieldx it's quite odd that you would get a different number of dots compared to the hexagons. The number of elements should be exactly the same in both modes. If you're still having this issue, could you please make a simple reproducing example on https://codesandbox.io/ ?
<Globe
ref={globeRef}
width={width}
height={(width / 4) * 9}
htmlElement={(gData) => {
const el = document.createElement("div");
el.className = "custom-markerss";
el.innerHTML = markerSvg;
el.style["pointer-events"] = "auto";
el.style.cursor = "pointer";
const tooltip = document.createElement("div");
tooltip.className = "tooltipss";
tooltip.textContent = gData.city;
tooltip.style.display = "none";
el.onmouseenter = () => {
tooltip.style.display = "block";
};
el.onmouseleave = () => {
tooltip.style.display = "none";
};
el.appendChild(tooltip);
return el;
}}
htmlElementsData={gData}
backgroundColor="#161616"
// markerData={myCordinates}
hexPolygonsData={countries.features}
hexPolygonResolution={4}
hexPolygonMargin={0.6}
hexPolygonColor={() => "#FE490C"}
showAtmosphere={false}
showGlobe={false}
/>
I have this globe but it is causing performance issues as it is blocking UI and other animations for like three seconds and the user is not able to scroll through the page until the globe loads. Is there any solution by which we can increase the loading speed hence increasing the performance?
Thank you for your valuable suggestions.
The text was updated successfully, but these errors were encountered: