From 190661bfdbd1ff7955920024e7a0bd0c658b6e27 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Sat, 19 Sep 2020 13:40:33 +0100 Subject: [PATCH] Use flagcdn.com for images --- examples/style-renderer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/style-renderer.js b/examples/style-renderer.js index 1cbe71ba0e..5458c314f9 100644 --- a/examples/style-renderer.js +++ b/examples/style-renderer.js @@ -38,7 +38,7 @@ const style = new Style({ const bottomLeft = getBottomLeft(extent); const left = bottomLeft[0]; const bottom = bottomLeft[1]; - context.drawImage(flag, 2, 12, 60, 40, left, bottom, width, height); + context.drawImage(flag, left, bottom, width, height); context.restore(); }, }); @@ -60,9 +60,7 @@ vectorLayer.getSource().on('addfeature', function (event) { feature.set('flag', img); }; img.src = - 'https://www.countryflags.io/' + - feature.get('iso_a2').toLowerCase() + - '/flat/64.png'; + 'https://flagcdn.com/w320/' + feature.get('iso_a2').toLowerCase() + '.png'; }); new Map({