Skip to content

Commit

Permalink
Merge pull request #8 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
added new api url
  • Loading branch information
CarlosNasayo authored Jun 5, 2023
2 parents 5dee181 + 215c2c0 commit 2dbd60e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/src/components/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ function Map({

const [filteredgroups, setFilteredGroups] = useState([]);

const [groupstwo, setGroupstwo] = useState([])


const [filteredCrops, setFilteredCrops] = useState([]);
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/src/conf/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2dbd60e

Please sign in to comment.