0

I have a problem with using the RUAIN REST API from Čúzk in the Czech Republic.

RUIAN description link.

The problem is the inability to use querying on web pages, when the problem is the CORS setting on the RUIAN side.

For example calling:

https://ags.cuzk.cz/arcgis/rest/services/RUIAN/Vyhledavaci_sluzba_nad_daty_RUIAN/MapServer/7/query?where=kod%3D704865&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=html

I want to use this API in a simple web application and I'm running into a problem with CORS.

enter image description here

1 Answer 1

0

using the ArcGIS API and a JSON request

https://ags.cuzk.cz/arcgis/rest/services/RUIAN/Vyhledavaci_sluzba_nad_daty_RUIAN/MapServer/7/query?where=kod%3D704865&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=pjson

returns

{
 "displayFieldName": "nazev",
 "fieldAliases": {
  "nazev": "Název katastrálního území"
 },
 "geometryType": "esriGeometryPolygon",
 "spatialReference": {
  "wkid": 102067,
  "latestWkid": 5514
 },
 "fields": [
  {
   "name": "nazev",
   "type": "esriFieldTypeString",
   "alias": "Název katastrálního území",
   "length": 48
  }
 ],
 "features": [
  {
   "attributes": {
    "nazev": "Nosislav"
   },
   "geometry": {
    "rings": [
     [
      [
       -598120.1799999997,
       -1179828.1000000015
      ],
      [
       -598119.03999999911,
       -1179827.8299999982
      ],
      [
       -598112.26000000164,
       -1179826.2600000016
      ],
      [
       -598110.75,
       -1179825.9100000001
      ],
      [
       -598107.05000000075,
       -1179825.0500000007
      ],
      [
       -598102.07999999821,
       -1179823.8999999985
      ],
      [
       -598099.73999999836,
       -1179823.3599999994
      ],
      [
       -598091.44999999925,
       -1179821.4400000013
      ],
      [
       -598090.37999999896,
       -1179821.1900000013
      ],
      [
       -598081.46999999881,
       -1179819.129999999
      ],
      [
       -598079.1400000006,
       -1179818.5899999999
      ],
      [
       -598072.94999999925,
       -1179817.1499999985
      ],
      [
       -598071.85000000149,
       -1179816.620000001
      ],
      [
       -598069.1099999994,
       -1179815.2899999991
      ],
      [
       -598063.53999999911,
       -1179812.5700000003
      ],
      [
       -598059.87000000104,
       -1179810.7899999991
      ],
      [
       -598055.1099999994,
       -1179808.4699999988
      ],
      [
       -598054.03000000119,
       -1179807.9400000013
      ],
      [
       -598048.82999999821,
       -1179805.4200000018
      ],
      [
       -598045.78000000119,
       -1179803.9400000013
      ],
      [
       -598028.1099999994,
       -1179795.3399999999
      ],
      [
       -598025.12000000104,
       -1179793.8900000006
      ],
      [
       -598018.94000000134,
       -1179791.1499999985
      ],
      [
       -598015.6400000006,
       -1179789.6900000013
      ],
      [
       -598010.46999999881,
       -1179787.3999999985
      ],
      [
       -598006.46999999881,
       -1179785.629999999
      ],
      [
       -598002.73000000045,
       -1179783.9699999988
      ],
      [
       -597999.41000000015,
       -1179782.5
      ],
      [
       -597995.0700000003,
       -1179780.5700000003
      ],
      [
       -597991.67000000179,
       -1179779.0599999987
      ],
      [
       -597991.17000000179,
       -1179778.8399999999
      ],
      [
       -597987.71000000089,
       -1179777.0100000016
      ],
      [
       -597986.16000000015,
       -1179776.1900000013
      ],
      [
       -597979.73000000045,
       -1179772.7899999991
      ],
      [
       -597971.6099999994,
       -1179768.4899999984
      ],
      [
       -597970.8900000006,
       -1179768.1099999994
      ],
      [
       -597963.85000000149,
       -1179764.379999999
      ],
      [
       -597956.37000000104,
       -1179760.4200000018
      ],
      [
       -597955.17000000179,
       -1179759.7899999991
      ],
      [
       -597948.78000000119,
       -1179756.3999999985
      ],
      [
       -597947.8900000006,
       -1179755.9299999997
      ],
      [
       -597927.80000000075,
       -1179745.3000000007
      ],
      [
       -597921.05999999866,
       -1179741.7300000004
      ],
      [
       -597918.9299999997,
       -1179740.6000000015
      ],
      [
       -597918.44000000134,
       -1179740.3399999999
      ],
      [
       -597914.23000000045,
       -1179738.379999999
      ],
      [
       -597906.67000000179,
       -1179734.8500000015
      ],
      [
       -597902.64999999851,
       -1179732.9800000004
      ],
      [
       -597899.58999999985,
       -1179730.629999999
      ],
      [
       -597895.62999999896,
       -1179727.6000000015
      ],
      [
       -597892.94000000134,
       -1179725.5300000012
      ],
      [
       -597888.55999999866,
       -1179722.1799999997
      ],
      [
       -597886.60000000149,
       -1179720.3900000006
      ],
      [
       -597883.19000000134,
       -1179717.2800000012
      ],
      [
       -597871.67000000179,
       -1179706.7600000016
      ],
      [
       -597869.73999999836,
       -1179704.9899999984
      ],
      [
       -597858.0700000003,
       -1179694.3399999999
      ],
      [
       -597853.69000000134,
       -1179690.3500000015
      ],
      [
       -597850.4299999997,
       -1179687.370000001
      ],
      [
       -597847.5,
       -1179684.6900000013
      ],
      [
       -597828.26999999955,
       -1179657.8900000006
      ],
      [
       -597821.48000000045,
       -1179648.4299999997
      ],
      [
       -597816.23000000045,
       -1179641.120000001
      ],
      [
       -597815.6400000006,
       -1179640.2899999991
      ],
      [
       -597812.46999999881,
       -1179632.3099999987
      ],
      [
       -597811.58999999985,
       -1179624.3299999982
      ],
      [
       -597811.37000000104,
       -1179622.3599999994
      ],
      [
       -597809.46999999881,
       -1179605.1499999985
      ],
      [
       -597808.21000000089,
       -1179593.7699999996
      ],
      [
       -597808.01000000164,
       -1179591.9499999993
      ],
      [
       -597805.8900000006,
       -1179585.4600000009
      ],
      [
       -597805.42000000179,
       -1179584
      ],
      [
       -597802.76000000164,
       -1179575.8099999987
      ],
      [
       -597802.46000000089,
       -1179574.8999999985
      ],
      [
       -597800.1799999997,
       -1179567.9100000001
      ],
      [
       -597798.92000000179,
       -1179565.8200000003
      ],
      [
       -597795.3900000006,
       -1179559.9299999997
      ],
      [
       -597794.3599999994,
       -1179558.0300000012
      ],
      [
       -597790.85000000149,
       -1179551.5700000003
      ],
      [
       -597787.44999999925,
       -1179545.3000000007
      ],
      [
       -597786.8900000006,
       -1179544.2600000016
      ],
      [
       -597783.71999999881,
       -1179538.4299999997
      ],
      [
       -597783.05000000075,
       -1179537.1999999993
      ],
      [
       -597781.6799999997,
       -1179534.6799999997
      ],
      [
       -597779.6799999997,
       -1179531.3900000006
      ],
      [
       -597775.9299999997,
       -1179525.25
      ],
      [
       -597775.07999999821,
       -1179523.8500000015
      ],
      [
       -597770.55999999866,
       -1179516.4499999993
      ],
      [
       -597766.30999999866,
       -1179509.4800000004
      ],
      [
       -597765.16000000015,
       -1179507.5899999999
      ],
      [
       -597760.48999999836,
       -1179499.9299999997
      ],
      [
       -597760.21999999881,
       -1179499.4899999984
      ],
      [
       -597759.1099999994,
       -1179497.8000000007
      ],
      [
       -597754.55000000075,
       -1179490.8599999994
      ],
      [
       -597747.05000000075,
       -1179479.4499999993
      ],
      [
       -597740.60000000149,
       -1179469.6400000006
      ],
      [
       -597717.78999999911,
       -1179434.9100000001
      ],
      [
       -597714.33999999985,
       -1179429.6600000001
      ],
      [
       -597683.76999999955,
       -1179402.3200000003
      ],
      [
       -597679.69000000134,
       -1179398.6700000018
      ],
      [
       -597655.46000000089,
       -1179390.7100000009
      ],
      [
       -597651.48999999836,
       -1179391.8299999982
      ],
      [
       -597649.4299999997,
       -1179392.4100000001
      ],
      [
       -597642.60000000149,
       -1179394.3399999999
      ],
      [
       -597635.57999999821,
       -1179396.3200000003
      ],
      [
       -597633.6799999997,
       -1179390.9800000004
      ],
      [
       -597631.03000000119,
       -1179383.5500000007
      ],
      [
       -597627.94000000134,
       -1179374.8999999985
      ],
      [
       -597625.78000000119,
       -1179368.8500000015
      ],
      [
       -597624.01000000164,
       -1179363.879999999
      ],
      [
       -597621.30000000075,
       -1179356.2899999991
      ],
      [
       -597619.3200000003,
       -1179350.7300000004
      ],
      [
       -597614.42000000179,
       -1179337.620000001
      ],
      [
       -597608.96000000089,
       -1179323.870000001
      ],
      [
       -597601.55000000075,
       -1179305.2199999988
      ],
      [
       -597599.78000000119,
       -1179289.620000001
      ],
      [
       -597601.30999999866,
       -1179274.7300000004
      ],
      [
       -597615.48999999836,
       -1179239.379999999
      ],
      [
       -597625.37999999896,
       -1179211.8900000006
      ],
      [
       -597636.28999999911,
       -1179161.9299999997
      ],
      [
       -597635.26000000164,
       -1179156.9800000004
      ],
      [
       -597630.55999999866,
       -1179134.4100000001
      ],
      [
       -597628.78000000119,
       -1179129.1600000001
      ],
      [
       -597628.05999999866,
       -1179127.0500000007
      ],
      [
       -597607.71999999881,
       -1179083.5700000003
      ],
      [
       -597597.87999999896,
       -1179071.25
      ],
      [
       -597590.28000000119,
       -1179064.2100000009
      ],
      [
       -597517.8200000003,
       -1179015.4100000001
      ],
      [
       -597511.53999999911,
       -1179013.8299999982
      ],
      [
       -597508.17000000179,
       -1179012.3399999999
      ],
      [
       -597453.05999999866,
       -1178987.879999999
      ],
      [
       -597408.05000000075,
       -1178973.6700000018
      ],
      [
       -597370.33999999985,
       -1178969.8500000015
      ],
      [
       -597332.03000000119,
       -1178976.4499999993
      ],
      [
       -597214.19000000134,
       -1179029.2600000016
      ],
      [
       -597115.48000000045,
       -1179061.1600000001
      ],
      [
       -597093.73999999836,
       -1179066.5700000003
      ],
      [
       -597081.82999999821,
       -1179067.120000001
      ],
      [
       -597008.48999999836,
       -1179042.3299999982
      ],
      [
       -597005.98000000045,
       -1179041.4800000004
      ],
      [
       -596951.35000000149,
       -1179032.379999999
      ],
      [
       -596939.98000000045,
       -1179030.4800000004
      ],
      [
       -596937.5700000003,
       -1179030.0799999982
      ],
      [
       -596938.1099999994,
       -1179023.2800000012
      ],
      [
       -596942.12000000104,
       -1178972.6099999994
      ],
      [
       -596941.80000000075,
       -1178934.5399999991
      ],
      [
       -596939.03000000119,
       -1178909.3999999985
      ],
      [
       -596937.62999999896,
       -1178896.7199999988
      ],
      [
       -596935.85000000149,
       -1178880.5500000007
      ],
      [
       -596934.51000000164,
       -1178868.4400000013
      ],
      [
       -596924.53999999911,
       -1178865.0100000016
      ],
      [
       -596921.35000000149,
       -1178863.9100000001
      ],
      [
       -596908.28000000119,
       -1178859.4100000001
      ],
      [
       -596856.60000000149,
       -1178841.6000000015
      ],
      [
       -596839.55000000075,
       -1178835.25
      ],
      [
       -596818.94000000134,
       -1178827.5799999982
      ],
      [
       -596803.16000000015,
       -1178821.6999999993
      ],
      [
       -596784.53999999911,
       -1178815.6600000001
      ],
      [
       -596753.46999999881,
       -1178805.5700000003
      ],
      [
       -596733.26000000164,
       -1178799.0100000016
      ],
      [
       -596672.05999999866,
       -1178779.1400000006
      ],
      [
       -596617.1400000006,
       -1178761.3200000003
      ],
      [
       -596588.62999999896,
       -1178752.0599999987
      ],
      [
       -596499.8200000003,
       -1178723.2399999984
      ],
      [
       -596495.83999999985,
       -1178721.9499999993
      ],
      [
       -596478.3599999994,
       -1178728.870000001
      ],
      [
       -596473.5,
       -1178730.8000000007
      ],
      [
       -596455.89999999851,
       -1178737.7600000016
      ],
      [
       -596448.57999999821,
       -1178740.6600000001
      ],
      [
       -596434.73999999836,
       -1178746.1400000006
      ],
      [
       -596431.14999999851,
       -1178747.5599999987
      ],
      [
       -596425.62999999896,
       -1178751.3599999994
      ],
      [
       -596422.60000000149,
       -1178753.4499999993
      ],
      [
       -596415.32999999821,
       -1178758.0199999996
      ],
      [
       -596408.05000000075,
       -1178764.6600000001
      ],
      [
       -596393.8200000003,
       -1178777.629999999
      ],
      [
       -596376.92000000179,
       -1178793.0300000012
      ],
      [
       -596363.53999999911,
       -1178805.2199999988
      ],
      [
       -596356.12999999896,
       -1178811.9800000004
      ],
      [
       -596342.08999999985,
       -1178824.7800000012
      ],

data continues....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.