Giter Club home page Giter Club logo

ogc-client's Issues

Capabilities: Handle more bbox elements

It seems that the bounding boxes of the layers are only fetched from the BoundingBox element of the layer in the getCapabilities.
eg.

<BoundingBox CRS="EPSG:2056" minx="2.1e+06" miny="105000" maxx="2.85e+06" maxy="1.4e+06"/>

Additionally, it could exist more elements about the layer extent.

  • EX_GeographicBoundingBox
  • ows:WGS84BoundingBox

Those elements are in EPSG:4326 which simplifies the process afterwards, as it's a standard CRS.

eg.

<ows:WGS84BoundingBox>
  <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
  <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
</ows:WGS84BoundingBox>

<EX_GeographicBoundingBox>
  <westBoundLongitude>0.659866</westBoundLongitude>
  <eastBoundLongitude>10.8359</eastBoundLongitude>
  <southBoundLatitude>36.982</southBoundLatitude>
  <northBoundLatitude>48.7511</northBoundLatitude>
</EX_GeographicBoundingBox>

Handle the case where the Cache Storage is not reachable.

OGC client internally uses the Browser Cache Storage abilities to cache the requests.

Issue
In some cases, for instance on Firefox in Privacy Mode, we are not allowed to read or write in the cache storage.
It results that the OGC client fails requesting the cache, but still does not perform the original request.

It triggers the following error

Uncaught (in promise) DOMException: **The operation is insecure**.
    4505 https://www.datagrandest.fr/datahub/main.7acf17b8ce68852b.js:133
    r https://www.datagrandest.fr/datahub/runtime.4381662fc90e13c0.js:1
    <anonymous> https://www.datagrandest.fr/datahub/main.7acf17b8ce68852b.js:133
    n https://www.datagrandest.fr/datahub/runtime.4381662fc90e13c0.js:1
    <anonymous> https://www.datagrandest.fr/datahub/main.7acf17b8ce68852b.js:1

Todo
Handle the case where the Cache Storage is not accessible and performs original requests without caching

Support for `OGC API - Tiles` and `OGC API - Styles`

First of all, thanks for providing this library! So far it looks great, especially the caching is very useful.

Do you have plans for supporting Tiles and Styles? We would like to query styles, style metadata, tile collections and tileMatrixSets.

I noticed that there is already active development for tiles. But we're also willing to contribute if possible, e.g. for styles.

Demo app fails with Node 18

when I run the demo app with Node 18 it fails with this error:


> [email protected] serve
> vue-cli-service serve

 INFO  Starting development server...
10% building 2/5 modules 3 active ...ksch/Code/ogc-client/app/node_modules/babel-loader/lib/index.js!/mnt/c/Users/johndoe/Code/ogc-client/app/src/main.js n
ode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/webpack/lib/NormalModule.js:471:10)
    at /mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/webpack/lib/NormalModule.js:503:5
    at /mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/webpack/lib/NormalModule.js:358:12
    at /mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /mnt/c/Users/johndoe/Code/ogc-client/app/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.16.0

It works with Node 16 for me

What is the license of this repository?

Hi,

I looked for a license (LICENSE file or license when searching the documentation), but could not find any information.

Would it be possible to know more about how this code can be used?

Thanks a lot!

Vue3 - ReferenceError: exports is not defined

In a Vue3 application using Node 20 I get this error.

Do you a hint what the problem could be?

Uncaught ReferenceError: exports is not defined
    at node_modules/@camptocamp/ogc-client/dist/worker/index.js (index.js:2:23)
    at __init (chunk-GFT2G5UO.js?v=951b9568:15:56)
    at node_modules/@camptocamp/ogc-client/dist/wfs/endpoint.js (endpoint.js:3:16)
    at __require2 (chunk-GFT2G5UO.js?v=951b9568:18:50)
    at node_modules/@camptocamp/ogc-client/dist/index.js (index.js:4:18)
    at __require2 (chunk-GFT2G5UO.js?v=951b9568:18:50)
    at index.js:16:1

or as screenshot of the browser console

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.