Update map generator for federal election.

This commit is contained in:
Kim Taylor
2025-03-02 23:14:50 +11:00
parent 2a0ba8eed2
commit 608ed0f92c
4 changed files with 156 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ map.on('load', () => {
map.addImage('blue-circle', image);
fetch("wards_withboundaries.json")
fetch("federal_2025_boundaries.json")
.then(response => {
response.json()
.then((wardData) => {
@@ -117,7 +117,7 @@ map.on('load', () => {
//
// The 2024 set of boundaries only uses 2 MultiPolygon objects (Cathedral in Murrindindi Shire Council and Island in Bass Coast Shire Council)
// Luckily, the second polygon for both objects results in a good label placement.
centrePoint = polylabel(featureCollection.features[0].geometry.coordinates[1], 0.000001);
centrePoint = polylabel(featureCollection.features[0].geometry.coordinates[0], 0.000001);
}