Sod’s Law, I realised after the deadline that the loading of the environment’s texture could have been sped up! So I’m fixing it now.
The Static Maps API request still has to go through a PHP proxy due to cross-origin issues, however instead of also using the PHP’s GD libary to convert the image from a PNG to a JPG, which is notoriously slow, we can just request the specific format straight from the API using the
I have tested all the formats to check which is the smallest:
As expected, the progressive jpg provides the smallest file size.
Changing the format to jpg cut around 1 second off the request time.
It might not seem like much, but considering this request actually freezes the page, it is important that it is as quick as possible.