The positions are still a bit off, because they are simply calculated as
the average of all polygon coordinates. That causes a bias towards
detailed borderlines. A better way would be to calculate the center of
mass for each polygon, but that is not implemented yet.
If the antipodal point (the point opposite of the map center) is on land,
the corresponding land mass was stretched across the whole map, breaking
the rendering. This was fixed by a couple of changes:
1. A check is done for each polygon whether it contains the antipodal
point.
2. If it does not, render it as a simple polygon as it was previously.
3. If it does contain the antipodal point, create a path that contains:
a) A circle covering the whole map.
b) The polygon with the points in reverse order.
This leads to filled circle with the polygon “cut out”, which is the
correct display in this case.