Add map provider functions for Gdos, Geoportal, Google, Isok, LPP, and Sopo with updated API calls
This commit is contained in:
28
js/map_providers/isok.js
Normal file
28
js/map_providers/isok.js
Normal file
@@ -0,0 +1,28 @@
|
||||
function isokButtonClick() {
|
||||
isokButton.style.background = "gray";
|
||||
let XMIN = MapData.X_MIN;
|
||||
let YMIN = MapData.Y_MIN;
|
||||
let XMAX = MapData.X_MAX;
|
||||
let YMAX = MapData.Y_MAX;
|
||||
|
||||
|
||||
|
||||
|
||||
// let URL = `https://epsg.io/trans?data=${XMIN},${YMIN};${XMAX},${YMAX}&s_srs=2177&t_srs=2180`;stary endpoint
|
||||
let URL = `https://api.maptiler.com/coordinates/transform/${XMIN},${YMIN};${XMAX},${YMAX}.json?s_srs=2177&t_srs=2180&key=OZa2pWHGvC94xakI0fVk`;
|
||||
|
||||
fetch(URL, {
|
||||
method: "GET",
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
let NXMIN = data.results[0].x;
|
||||
let NYMIN = data.results[0].y;
|
||||
let NXMAX = data.results[1].x;
|
||||
let NYMAX = data.results[1].y;
|
||||
|
||||
let newURL = `https://wody.isok.gov.pl/imap_kzgw/?gpmap=gpSIGW&bbox=${NXMIN},${NYMIN},${NXMAX},${NYMAX}`;
|
||||
window.open(newURL, "_blank");
|
||||
isokButton.style.background = "none";
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user