Closed kghs03 closed 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); }
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); }