diff --git a/src/Main.tsx b/src/Main.tsx index dcce26d..42914cc 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -176,6 +176,7 @@ function CreateComponent() { >(); const [name, setName] = useState(""); const [validationFailure, setValidationFailure] = useState(""); + const [parsingFailure, setParsingFailure] = useState(""); // const [showAboutModal, setShowAboutModal] = useState(false); useEffect(() => { @@ -369,7 +370,7 @@ function CreateComponent() { const loadTextArea = () => { if (!drawRef.current || !mapRef.current) return; - const isBbox = /^(-?\d+(\.\d+)?,){3}-?\d+(\.\d+)?$/; + const isBbox = /^\s*(-?\d+(\.\d+)?\s*,\s*){3}-?\d+(\.\d+)?\s*$/; if (isBbox.test(textAreaValue)) { const arr = textAreaValue.split(","); const minX = +arr[0]; @@ -445,10 +446,28 @@ function CreateComponent() {

Paste bbox or GeoJSON: