Select to view content in your preferred language

Customized layer displaying data off-set the right location

284
0
08-10-2020 01:25 PM
RoseZhou2
Frequent Contributor

Hi,

I created a customized layer by subclassing GraphicsLayer, a customized layer view by subclassing BaseLayerView2D. The data was displayed at the right location on screen with devicePixelRatio=1.0, but the data is off-set the right location when displayed on a screen with devicePixelRatio=1.25. As zoom in/out, the location also changes.

Where and how should I take into account the devicePixelRation? In the view's render() method?

Any help is greatly appreciated!

Rose

0 Kudos
0 Replies