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() {