SVG fails when Width is high

OK, I implemented this one so far. Just looking at the amount of pixels in play. And it scales down on my phone after 55 kilometers.


This is about 800 kilometers

    getMaxWidth(proposalWidth, height) {
        if(Platform.OS === 'ios') {
            return proposalWidth;
        } else {
            var h = PixelRatio.getPixelSizeForLayoutSize(height);
            var w = PixelRatio.getPixelSizeForLayoutSize(proposalWidth);

            if(h * w > 10874155) {
                for (var i = proposalWidth; i >= 0; i--) {
                    if(h *  PixelRatio.getPixelSizeForLayoutSize(i) < 10874155) {
                        return i;
                    }
                }
            } else {
                return proposalWidth;
            }
        }
    }
1 Like