From de31351dfb38dc831a0646ae892c234fee3dc837 Mon Sep 17 00:00:00 2001 From: azarz Date: Fri, 3 Jan 2025 17:37:03 +0100 Subject: [PATCH] WIP feat(myposition): my position gets data around position --- src/js/immersive-position.js | 46 +++++++++++++++++++++++++++ src/js/layer-manager/layer-manager.js | 28 ++++++++-------- 2 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 src/js/immersive-position.js diff --git a/src/js/immersive-position.js b/src/js/immersive-position.js new file mode 100644 index 00000000..34a5db2b --- /dev/null +++ b/src/js/immersive-position.js @@ -0,0 +1,46 @@ +/** + * Copyright (c) Institut national de l'information géographique et forestière + * + * This program and the accompanying materials are made available under the terms of the GPL License, Version 3.0. + */ + +/** + * Gestion de la "position immersive" avec des requêtes faites aux données autour d'une position + * @fires cityLoaded + * @fires deptLoaded + * @fires parcLoaded + * @fires forestLoaded + * @fires agriLoaded + * @fires zaiLoaded + * @fires waterLoaded + */ +class ImmersivePosion extends EventTarget { + /** + * constructeur + * @param {*} options - + * @param {*} options.lat - latitude + * @param {*} options.lng - longitude + */ + constructor(options) { + super(); + this.options = options || { + lat : 0, + lng : 0, + }; + this.#computeAll(); + } + + /** + * Computes all data queries + */ + #computeAll() { + + } + + /** + * Computes data for a given layer of Geoplateforme's WFS + */ + #computeGenericGPFWFS(layer, attributes, geom_name=geom, epsg=4326) { + + } +} \ No newline at end of file diff --git a/src/js/layer-manager/layer-manager.js b/src/js/layer-manager/layer-manager.js index 9ba2ce47..a21fe98a 100644 --- a/src/js/layer-manager/layer-manager.js +++ b/src/js/layer-manager/layer-manager.js @@ -44,24 +44,24 @@ import LayersConfig from "./layer-config"; */ class LayerManager extends EventTarget { /** - * constructeur - * @param {*} options - - * @param {*} options.target - ... - * @param {*} options.layers - ... - * @example - * new LayerManger({ - * layers : [ - * layers : "couche1, couche2, ...", - * type : "base" // data ou thematic - * ] - * }); - */ + * constructeur + * @param {*} options - + * @param {*} options.target - ... + * @param {*} options.layers - ... + * @example + * new LayerManger({ + * layers : [ + * layers : "couche1, couche2, ...", + * type : "base" // data ou thematic + * ] + * }); + */ constructor(options) { super(); this.options = options || { /** - * ["layerid", "layer2id"] - */ + * ["layerid", "layer2id"] + */ layers : [], target : null };