Get pixel ratio MapLibre is using for icons based on devicePixelRatio (DPR). MapLibre uses 2x sprites whenever DPR > 1 and 1x sprites otherwise. So this function will always return 1 or 2 as appropriate based on DPR.
Generated using TypeDoc
Get pixel ratio MapLibre is using for icons based on devicePixelRatio (DPR). MapLibre uses 2x sprites whenever DPR > 1 and 1x sprites otherwise. So this function will always return 1 or 2 as appropriate based on DPR.