Commit 23bb465f authored by Scott Ames's avatar Scott Ames
Browse files

troubleshooting autocomplete

parent 115c921c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@
    "@material-ui/core": "^4.9.0",
    "@material-ui/icons": "^4.5.1",
    "@material-ui/lab": "^4.0.0-alpha.41",
    "@tarekraafat/autocomplete.js": "^7.2.0",
    "jquery": "^3.4.1",
    "leaflet": "^1.6.0",
    "leaflet-draw": "1.0.4",
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import Projection from "../../js/Projection";
import MousePosition from "../../js/MousePosition";
import Draw from "../../js/Draw";
import "leaflet";
//import newAutocomplete from "../../js/autocomplete/customIndex";

/**
 * Component that uses back end JS files to invoke and display the
@@ -51,6 +52,8 @@ export default class MapContainer extends Component {
    }).addTo(map);

    new L.Control.Scale({ imperial: false }).addTo(map);

    //new newAutocomplete();
  }

  /**
+2 −2
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ export default function AutoCompleteInput() {
            }}
            id="autoComplete"
            tabIndex="1"
            onBlur="unrenderBox()"
            onFocus="renderBox()"
            //onBlur="unrenderBox()"
            //onFocus="renderBox()"
          />
          <Button variant="contained" className={classes.button} id="wktButton">
            Search
+4 −3
Original line number Diff line number Diff line
import "./getServer.js";
import "jquery";
import autoComplete from "@tarekraafat/autocomplete.js";

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

/**
 * @class autoComplete
 * @classdesc Declares a new autocomplete that is ran when the user enters more data into the autocomplete box.
 */
var newAutocomplete = new autoComplete({
var newAutoComplete = new autoComplete({
  //Defines the data that will be returned inside of the autocomplete.
  data: {
    //Gets data source for autocomplete asyncronusly.
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ function loadGeoJson(data) {
  //While the feature at the current index is not null.
  while (data.features[index] != null) {
    //Log the feature name.
    console.log(data.features[index].properties.clean_feature + " " + index);
    //console.log(data.features[index].properties.clean_feature + " " + index);
    //Push the json object at the current index onto nameArray.
    nameArray.push(data.features[index].properties);
    //Increment index.