Select to view content in your preferred language

BaseDynamicLayer subclass gets weird when the browser window is large

409
0
04-12-2022 08:51 PM
ljnio
by
Emerging Contributor

Hi,

I'm working on rendering jpg image on a map with version 4, but got stuck by a weird issue..

Here's some sample code I put together.

https://codepen.io/jianingliu/pen/KKZxmML

What happens is that when the browser window is small (eg. 1472x515), everything works fine.

But if the window get's bigger (eg. 2560x835), I start to get 2 pictures rendering at random places. They are flying around as I pan or zoom the map.

Initially, I thought I was doing something wrong with the size of the canvas, but as I change the height and width, this problem does not get any better.

Any help would be much appreciated.

Thanks,

Johnny

0 Kudos
0 Replies