Skip to content

Instantly share code, notes, and snippets.

@jasonferrier
Last active March 30, 2023 17:00
Show Gist options
  • Save jasonferrier/efea5c54806cd878447daa292caa35a8 to your computer and use it in GitHub Desktop.
Save jasonferrier/efea5c54806cd878447daa292caa35a8 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "USA",
"fill": "#00FF00",
"fill-opacity": "0.2"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-171.791110603, 18.91619
],
[
-66.96466, 18.91619
],
[
-66.96466, 71.3577635769
],
[
-171.791110603, 71.3577635769
],
[
-171.791110603, 18.91619
]
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "Missing `-` sign on Longitude",
"fill": "#ff0000",
"fill-opacity": "0.2"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
171.791110603, 18.91619
],
[
66.96466, 18.91619
],
[
66.96466, 71.3577635769
],
[
171.791110603, 71.3577635769
],
[
171.791110603, 18.91619
]
]
]
}
}
]
}
@jasonferrier
Copy link
Author

This is what happens when you leave off the - from your longitude. What should be within the green polygon ends up being in the red polygon.

@jasonferrier
Copy link
Author

Sadly, Github changed their support for GeoJSON styling, so the polygons are no longer styled red/green and this visualization is not as useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment