Commit aa927b29 authored by BrittainJackson7's avatar BrittainJackson7
Browse files

Fix error on click

Fixes #7
parent 2aa59a59
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -200,8 +200,12 @@ export default L.Map.AstroMap = L.Map.extend({

  // show thumbnail on map when clicked - use stac-layer for this?
  handleClick: function(e) {
    const url_to_stac_item = e.layer.feature.links[0].href;
    console.log(e)
    if(!e) {
      let url_to_stac_item = e.layer.feature.links[0].href;
      console.log (url_to_stac_item);  
    }
    
    // fetch(url_to_stac_item).then(res => res.json()).then(async feature => {
    //   const thumbnail = await L.stacLayer(feature, {displayPreview: true});
    //   thumbnail.on("click", e => {