Bugfix: Correct GeoJSON

This commit is contained in:
Starbeamrainbowlabs 2019-07-25 13:33:11 +01:00
parent ff412dcd5d
commit 0ff5ca462e
1 changed files with 11 additions and 4 deletions

View File

@ -57,6 +57,10 @@ class LayerAI {
let map = this.render_map(); let map = this.render_map();
return L.geoJSON(map, { return L.geoJSON(map, {
style: (feature) => { return { style: (feature) => { return {
stroke: true,
color: feature.properties.colour,
weight: 1,
fillColor: feature.properties.colour, fillColor: feature.properties.colour,
fillOpacity: 0.4 fillOpacity: 0.4
} } } }
@ -108,10 +112,13 @@ class LayerAI {
geometry: { geometry: {
type: "Polygon", type: "Polygon",
coordinates: [ coordinates: [
[lat, lng], [ // Outer shape
[lat + Config.step, lng], [lat, lng],
[lat + Config.step, lng + Config.step], [lat + Config.step, lng],
[lat, lng + Config.step] [lat + Config.step, lng + Config.step],
[lat, lng + Config.step]
]
// If there were any holes in the shape, we'd put them here
] ]
}, },
properties: { properties: {