I\'m in the process of converting a map from using mapbox.js to mapbox-gl.js, and am having trouble drawing a circle that uses miles or met
Lucas and fphilipe answers works perfectly ! For those working with react-native-mapbox and drawing over the map you must take into account the pixel density of the screen as follow :
pixelValue(latitude: number, meters: number, zoomLevel: number) {
const mapPixels = meters / (78271.484 / 2 ** zoomLevel) / Math.cos((latitude * Math.PI) / 180);
const screenPixel = mapPixels * Math.floor(PixelRatio.get());
return screenPixel;
}