-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paste geojson features #14
Conversation
There is a minor issue with this currently, if you paste geojson and then hit the up/down arrows on min/max cell it doesn't refresh like it does with drawing, unless you reload the json text area. |
a6c30ae
to
b97c643
Compare
@@ -224,9 +224,12 @@ function App() { | |||
const [maxCells, setMaxCells] = createSignal(200); | |||
const [drawMode, setDrawMode] = createSignal(""); | |||
const [cellUnionText, setCellUnionText] = createSignal(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get away with a single textbox that detects if the input starts with {
for GeoJSON?
I think the GeoJSON needs to be loaded into terra-draw state so it is persistent, instead of just being parsed once when it is loaded from the text box. |
Can you normalize a MultiPolygon into a list of Polygon features, etc? |
b97c643
to
66ef026
Compare
I tried this and it's difficult because terradraw still tries to validate the features according to the drawing mode, I couldn't get it to work. So what I ended up doing is storing the features in another variable outside terradraw. It works now, but feels kinda messy 🤷♂️ |
f8eb032
to
b5163f7
Compare
b5163f7
to
943e7e6
Compare
The GeoJSON Region Coverer is now much more tolerant of invalid/funky geometries, we might want to add an option to paste geojson: