AnsweredAssumed Answered

Customized layer displaying data off-set the right location

Question asked by rose.zhou_dfo_mpo0 on Aug 10, 2020


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!