Commit 44093ce4 authored by Scott Ames's avatar Scott Ames
Browse files

updated files with imports

parent 7b7ab80c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
    "proj4leaflet": "^1.0.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "requirejs": "^2.3.6",
    "typeface-roboto": "0.0.75",
    "wicket": "1.3.5"
  }
+5 −2
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ import TextField from "@material-ui/core/TextField";
import Tooltip from "@material-ui/core/Tooltip";
import Zoom from "@material-ui/core/Zoom";
import { makeStyles, withStyles, fade } from "@material-ui/core/styles";
import "../../js/autocomplete/customIndex.js";
import "../../js/autocomplete/getServer.js";
import "../../js/autocomplete/render.js";

const useStyles = makeStyles(theme => ({
  root: {
@@ -83,8 +86,8 @@ export default function AutoCompleteInput() {
            }}
            id="autoComplete"
            tabIndex="1"
            onfocusout="unrenderBox()"
            onfocusin="renderBox()"
            onBlur="unrenderBox()"
            onFocus="renderBox()"
          />
          <Button variant="contained" className={classes.button} id="wktButton">
            Search
+2 −2
Original line number Diff line number Diff line
import React from "react";
import Typography from "@material-ui/core/Typography";
import Button from "@material-ui/core/Button";
import TextField from "@material-ui/core/TextField";
import Input from "@material-ui/core/Input";
import Tooltip from "@material-ui/core/Tooltip";
import Zoom from "@material-ui/core/Zoom";
import { makeStyles, withStyles, fade } from "@material-ui/core/styles";
@@ -96,7 +96,7 @@ export default function WellKnownTextInput() {
        TransitionComponent={Zoom}
      >
        <div className={classes.container}>
          <TextField
          <Input
            className={classes.textbox}
            variant="outlined"
            label="Enter WKT String"
+92 −86
Original line number Diff line number Diff line
import "./getServer.js";
import "jquery";

// Logs query events into the console.
document.querySelector("#autoComplete").addEventListener("autoComplete", function(event) {
document
  .querySelector("#autoComplete")
  .addEventListener("autoComplete", function(event) {
    console.log(event.detail);
  });

@@ -27,7 +32,7 @@ var newAutocomplete = new autoComplete({
  //Returns the query (OPTIONAL, kept in for now to make sure nothing breaks when it is removed.).
  query: {
    //Can be used to change the query by looking for certain values
          manipulate: (query) => {
    manipulate: query => {
      //Returns the query
      return query;
    }
@@ -36,7 +41,6 @@ var newAutocomplete = new autoComplete({
  trigger: {
    //Trigger runs when searchbox is selected, clicked out of, or has been typed in.
    event: ["input", "focusin", "focusout"]
        
  },
  //Sorts values in descending order.
  sort: (a, b) => {
@@ -45,7 +49,7 @@ var newAutocomplete = new autoComplete({
    return 0;
  },
  //Value displayed in searchbox before any value is entered.
    placeHolder: "Enter feature here...", 
  //placeHolder: "Enter feature here...",
  //ID of input/searchbox which will be used.
  selector: "#autoComplete",
  //Does not display autocomplete results list until the characters entered into the searchbox exceed the threshold.
@@ -66,7 +70,7 @@ var newAutocomplete = new autoComplete({
    //Sets location of results list relative to the destination (above), can be afterend, afterbegin, beforebegin, and beforeend.
    position: "afterend",
    //Sets element type of the results list (ul, div, span, etc...).
        element: "ul",
    element: "ul"
  },
  //Sets the max number of results that can be returned in a results list for a query (10).
  maxResults: 10,
@@ -96,7 +100,9 @@ var newAutocomplete = new autoComplete({
   */
  onSelection: feedback => {
    //Creates string used for searching with the selected name.
        var URLString = ("https://planetarynames.wr.usgs.gov/SearchResults?feature=" + feedback.selection.value.clean_feature);
    var URLString =
      "https://planetarynames.wr.usgs.gov/SearchResults?feature=" +
      feedback.selection.value.clean_feature;
    //Replaces spaces with %20 for encoded URL string.
    var encodedURLString = URLString.replace(" ", "%20");
    //Puts web address into browser.
+29 −27
Original line number Diff line number Diff line
import $ from "jquery";
//Declares global variable name array.
var nameArray = [];

@@ -18,9 +19,10 @@
//Ajax call to WFS server with the features/data need.
$.ajax({
  //URL of WFS server.
		url: "https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/var/www/html/mapfiles/earth/moon_nomen_wfs.map&service=WFS&version=1.1.0&&TYPENAME=MOON_POINT&REQUEST=getfeature&PropertyName=clean_feature&outputformat=application/json;%20subtype=geojson&Filter=%3CFilter%3E%3CPropertyIsLike%20wildcard=%27*%27%20singleChar=%27.%27%20escape=%27!%27%3E%3CPropertyName%3Eclean_feature%3C/PropertyName%3E%3CLiteral%3EA*%3C/Literal%3E%3C/PropertyIsLike%3E%3C/Filter%3E",
  url:
    "https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/var/www/html/mapfiles/earth/moon_nomen_wfs.map&service=WFS&version=1.1.0&&TYPENAME=MOON_POINT&REQUEST=getfeature&PropertyName=clean_feature&outputformat=application/json;%20subtype=geojson&Filter=%3CFilter%3E%3CPropertyIsLike%20wildcard=%27*%27%20singleChar=%27.%27%20escape=%27!%27%3E%3CPropertyName%3Eclean_feature%3C/PropertyName%3E%3CLiteral%3EA*%3C/Literal%3E%3C/PropertyIsLike%3E%3C/Filter%3E",
  //Data type of file on WFS server/above URL.
		dataType: 'json',
  dataType: "json",
  //When the server is successfully connect to, run loadGeoJson function.
  success: loadGeoJson,
  //Timeout on connection to server (WILL NEED TO LOWER WHEN NEW SERVER IS AVAILABLE).