Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new api url #8

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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