Loading app/src/components/presentational/QueryConsole.jsx +2 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ import { alpha } from "@mui/material/styles"; import Button from "@mui/material/Button"; import ButtonGroup from "@mui/material/ButtonGroup"; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import PolylineIcon from '@mui/icons-material/Polyline'; import PlayArrowIcon from '@mui/icons-material/PlayArrow'; import SwitchLeftIcon from '@mui/icons-material/SwitchLeft'; import SwitchRightIcon from '@mui/icons-material/SwitchRight'; Loading Loading @@ -64,9 +63,8 @@ export default function QueryConsole() { orientation="vertical" size="small" variant="contained"> <Button 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="copyCodeButton" sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="runQueryButton" sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> </ButtonGroup> </div> </div> Loading app/src/js/AstroDrawControl.js +17 −9 Original line number Diff line number Diff line Loading @@ -74,9 +74,6 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this.wkt = new Wkt.Wkt(); this.myLayer = L.Proj.geoJson().addTo(map); this.wktButton = L.DomUtil.get("wktButton"); L.DomEvent.on(this.wktButton, "click", this.mapWKTString, this); L.DomEvent.on( L.DomUtil.get("applyChip"), "click", Loading @@ -84,13 +81,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 @@ -99,6 +93,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 +0 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ import { getItemCollection, setFeatures, setNumberReturned } from "./ApiJsonCollection"; import { MY_JSON_MAPS } from "./layers"; import stacLayer from 'stac-layer/src/index.js'; /** Loading Loading
app/src/components/presentational/QueryConsole.jsx +2 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ import { alpha } from "@mui/material/styles"; import Button from "@mui/material/Button"; import ButtonGroup from "@mui/material/ButtonGroup"; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import PolylineIcon from '@mui/icons-material/Polyline'; import PlayArrowIcon from '@mui/icons-material/PlayArrow'; import SwitchLeftIcon from '@mui/icons-material/SwitchLeft'; import SwitchRightIcon from '@mui/icons-material/SwitchRight'; Loading Loading @@ -64,9 +63,8 @@ export default function QueryConsole() { orientation="vertical" size="small" variant="contained"> <Button 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="copyCodeButton" sx={css.button} startIcon={<ContentCopyIcon />}>Copy Code</Button> <Button id="runQueryButton" sx={css.button} startIcon={<PlayArrowIcon />}>Run STAC Query</Button> </ButtonGroup> </div> </div> Loading
app/src/js/AstroDrawControl.js +17 −9 Original line number Diff line number Diff line Loading @@ -74,9 +74,6 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ this.wkt = new Wkt.Wkt(); this.myLayer = L.Proj.geoJson().addTo(map); this.wktButton = L.DomUtil.get("wktButton"); L.DomEvent.on(this.wktButton, "click", this.mapWKTString, this); L.DomEvent.on( L.DomUtil.get("applyChip"), "click", Loading @@ -84,13 +81,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 @@ -99,6 +93,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 +0 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ import { getItemCollection, setFeatures, setNumberReturned } from "./ApiJsonCollection"; import { MY_JSON_MAPS } from "./layers"; import stacLayer from 'stac-layer/src/index.js'; /** Loading