webglearth / webglearth2

[UNMAINTAINED] WebGL Earth 2 - the source code of the project
Apache License 2.0
888 stars 212 forks source link

polygon is not shown #123

Closed kghs03 closed 4 years ago

kghs03 commented 4 years ago

I have code as below to draw a polygon, but the polygon is not shown. is there something i am missing? thanks for your help..

function initialize() { var earth = new WE.map('earth_div'); WE.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{ attribution: '© OpenStreetMap contributors' }).addTo(earth); var polygonA = WE.polygon( [[ 5.9326171875,43.03677585761058], [6.8115234375,43.96119063892024], [7.119140625,45.521743896993634], [3.8891601562499996,45.89000815866184], [3.0322265625,43.99281450048989], [5.9326171875,43.03677585761058]] ); polygonA.addTo(earth); earth.setView([48, 6], 6); }