Arquisoft / lomap_en2b

LoMap Software architecture group en2b course 2022_23
https://arquisoft.github.io/lomap_en2b
1 stars 1 forks source link

Correctly load markers #107

Closed andrrsin closed 1 year ago

andrrsin commented 1 year ago

We have to load the markers for the moment to retrieve the user's markers the code existing is:

async function fetchLandmarks() {
      let landmks: Landmark[] = [];
      makeRequest.post("/landmarks/friend", { webId: session.info.webId?.split("#")[0] }).then((res1) => {
        for (let i = 0; i < res1.data.length; i++) {
          let landmark = new Landmark(
                         res1.data[i].name, res1.data[i].latitude, res1.data[i].longitude, res1.data[i].category);
          landmks.push(landmark);
        }
        setLandmarks(loadLandmarks(landmks));
      });

    }

We have to

jjgancfer commented 1 year ago

See #130 for the fix. Also, duplicated issue with #110.