Closed 3omdawy closed 2 weeks ago
Hi @3omdawy
I gave this example a try in my machine and it works perfectly fine, and works on codepen.io as well.
https://codepen.io/themustafaomar/pen/MWdRxdB
BTW, screenshot provided doesn't seem to work.
Thanks Mustafa :) I know the issue now. JS was blocked due to hosting. Cloudflare has an option called Rocket Loader™ when I disabled it everything worked fine
Another solution: defer the setting of map till the page is interactive:
document.addEventListener('readystatechange', event => {
if (event.target.readyState === "interactive") { //or at "complete" if you want it to execute in the most last state of window.
var map = new jsVectorMap({
selector: "#map",
map: "world",
});
}
});
Hello :) Thanks for this great plugin.
I am using HTML and JS, and my HTML page is as simple as this:
There are no errors on the console but the map div is totally blank ![Uploading Screenshot 2024-06-27 172008.jpg…]()