Loading app/src/components/presentational/QueryConsole.jsx +2 −2 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ export default function QueryConsole() { orientation="vertical" size="small" variant="contained"> <Button sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="copyCodeButton" sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="wktButton" sx={css.button} startIcon={<PolylineIcon />}>Draw WKT String</Button> <Button sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> <Button id="runQueryButton" sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> </ButtonGroup> </div> </div> Loading app/src/js/AstroDrawControl.js +17 −6 Original line number Diff line number Diff line Loading @@ -79,13 +79,10 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this ); L.DomEvent.on( L.DomUtil.get("applyButton"), "click", this.applyFilter, this ); L.DomEvent.on(L.DomUtil.get("applyButton"),"click", this.applyFilter, this); L.DomEvent.on(L.DomUtil.get("runQueryButton"),"click", this.applyFilter, this); L.DomEvent.on(L.DomUtil.get("clearButton"), "click", this.clearMap, this); L.DomEvent.on(L.DomUtil.get("copyCodeButton"), "click", this.copyToClipboard, this); map.on("draw:created", this.shapesToWKT, this); Loading @@ -94,6 +91,20 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ return container; }, /** * * */ copyToClipboard: function(){ /* Get the text field */ var copyText = document.getElementById("query-textarea"); copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ navigator.clipboard.writeText(copyText.value); }, /** * @function AstroDrawControl.prototype.shapesToWKT * @description Is called when a user draws a shape using the on map drawing features. Loading app/src/js/AstroMap.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import AstroProj from "./AstroProj"; import LayerCollection from "./LayerCollection"; import { getItemCollection, setNumberMatched, setMaxNumberPages, getCurrentPage, setCurrentPage, setFeatures} from "./ApiJsonCollection"; import { MY_JSON_MAPS } from "./layers"; import stacLayer from 'stac-layer/src/index.js'; // import stacLayer from 'stac-layer/src/index.js'; /** Loading Loading
app/src/components/presentational/QueryConsole.jsx +2 −2 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ export default function QueryConsole() { orientation="vertical" size="small" variant="contained"> <Button sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="copyCodeButton" sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="wktButton" sx={css.button} startIcon={<PolylineIcon />}>Draw WKT String</Button> <Button sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> <Button id="runQueryButton" sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> </ButtonGroup> </div> </div> Loading
app/src/js/AstroDrawControl.js +17 −6 Original line number Diff line number Diff line Loading @@ -79,13 +79,10 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this ); L.DomEvent.on( L.DomUtil.get("applyButton"), "click", this.applyFilter, this ); L.DomEvent.on(L.DomUtil.get("applyButton"),"click", this.applyFilter, this); L.DomEvent.on(L.DomUtil.get("runQueryButton"),"click", this.applyFilter, this); L.DomEvent.on(L.DomUtil.get("clearButton"), "click", this.clearMap, this); L.DomEvent.on(L.DomUtil.get("copyCodeButton"), "click", this.copyToClipboard, this); map.on("draw:created", this.shapesToWKT, this); Loading @@ -94,6 +91,20 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ return container; }, /** * * */ copyToClipboard: function(){ /* Get the text field */ var copyText = document.getElementById("query-textarea"); copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ navigator.clipboard.writeText(copyText.value); }, /** * @function AstroDrawControl.prototype.shapesToWKT * @description Is called when a user draws a shape using the on map drawing features. Loading
app/src/js/AstroMap.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import AstroProj from "./AstroProj"; import LayerCollection from "./LayerCollection"; import { getItemCollection, setNumberMatched, setMaxNumberPages, getCurrentPage, setCurrentPage, setFeatures} from "./ApiJsonCollection"; import { MY_JSON_MAPS } from "./layers"; import stacLayer from 'stac-layer/src/index.js'; // import stacLayer from 'stac-layer/src/index.js'; /** Loading