react-native-mapbox-gl icon indicating copy to clipboard operation
react-native-mapbox-gl copied to clipboard

[Android] getPointInView does not return density-independent pixels

Open frankrowe opened this issue 6 years ago • 1 comments

Not sure when this change was introduced, but the getPointInView method on Android now returns actual screen resolution pixels, not density-independent pixels.

I'm using the following fix in my app, but this should probably be fixed in the library.

let point = await this._map.getPointInView(coordinate);
if (Platform.OS === 'android') {
  point = point.map(x => x / PixelRatio.get());
}

frankrowe avatar Apr 09 '18 14:04 frankrowe

when i follow it i got

this._map.getPointInView is not a function

anastely avatar Dec 09 '19 14:12 anastely