From 215c2c053efdbd07172c50327799f3d055e7ce19 Mon Sep 17 00:00:00 2001 From: CarlosNasayo Date: Mon, 5 Jun 2023 10:49:53 -0500 Subject: [PATCH] added new api url --- src/src/components/map/Map.js | 7 +------ src/src/conf/Configuration.js | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/src/components/map/Map.js b/src/src/components/map/Map.js index 5471fe5..285fae4 100644 --- a/src/src/components/map/Map.js +++ b/src/src/components/map/Map.js @@ -107,7 +107,6 @@ function Map({ const [filteredgroups, setFilteredGroups] = useState([]); - const [groupstwo, setGroupstwo] = useState([]) const [filteredCrops, setFilteredCrops] = useState([]); @@ -204,7 +203,6 @@ function Map({ if (carouselLandraceItems != null && carouselLandraceItems.length > 0) { setShow(true); setAccessions([]); - //let hola= filteredgroups.ma const newArray = extidsgroup.map((element) => `${iso}_${element}`); setSelectedMarkers([]); setClickedMarkerIndices(new Set()); @@ -301,7 +299,7 @@ function Map({ setLayerr(newArray); setAccessions([]); - const endopointAccesionsByCrop = `http://localhost:5000/api/v1/accessionsbyidcrop?id=${idsCropss}&iso=${iso}`; + const endopointAccesionsByCrop = `${Configuration.get_url_api_base()}accessionsbyidcrop?id=${idsCropss}&iso=${iso}`; axios.get(endopointAccesionsByCrop).then((response) => { setShow(false); @@ -440,13 +438,10 @@ function Map({ // Agrega la nueva imagen if (image != null) { image.options.zIndex = 1000; - //image.color = #0000ff image.addTo(mapRef.current); mapRef.current.flyToBounds(image.getBounds()); - //image._image.style.backfaceVisibility = 'hidden'; } - // Actualiza el estado con la nueva imagen setCurrentImage(image); }, [image]); return ( diff --git a/src/src/conf/Configuration.js b/src/src/conf/Configuration.js index 503bca8..77121ff 100644 --- a/src/src/conf/Configuration.js +++ b/src/src/conf/Configuration.js @@ -2,7 +2,7 @@ const GEOSERVER_URL = "https://isa.ciat.cgiar.org/geoserver2/"; const GEOSERVER_SERVICE = "wms"; const GAP_WORSPACE = "gap_analysis" -const GAP_API_BASE = "http://api.gapanalysistools.org/api/v1/" +const GAP_API_BASE = "https://api.gapanalysistools.org/api/v1/" class Configuration { get_geoserver_url() {