Skip to content

Commit

Permalink
url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrazasp committed May 13, 2024
1 parent d71359f commit 2344726
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export function getObjectByCadastralId(
id: string | number,
fallbackItem?: object
) {
return fetch(
`https://dev.qgis.biip.lt/qgisserver/uetk_zuvinimas?SERVICE=WFS&REQUEST=GetFeature&TYPENAME=uetk_zuvinimas_info&OUTPUTFORMAT=application/json&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Ecadastral_id%3C/PropertyName%3E%3CLiteral%3E${id}%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E`
)
const host = process.env.QGIS_SERVER_HOST || 'https://gis.biip.lt';
const url = `${host}/qgisserver/uetk_zuvinimas?SERVICE=WFS&REQUEST=GetFeature&TYPENAME=uetk_zuvinimas_info&OUTPUTFORMAT=application/json&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Ecadastral_id%3C/PropertyName%3E%3CLiteral%3E${id}%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E`;

return fetch(url)
.then((r) => r.json())
.then((r) => r.features)
.then((r) => {
Expand Down

0 comments on commit 2344726

Please sign in to comment.