IGNF / cartes-ign-app

Application mobile officielle de l'IGN, utilisant MapLibre GL JS et Capacitor
https://www.ign.fr/telechargez-application-cartographique-cartes-ign
GNU General Public License v3.0
47 stars 2 forks source link

Affichage des POI dans l'emprise du calcul isochrone #36

Closed lowzonenose closed 8 months ago

azarz commented 8 months ago

@lowzonenose J'ai réussi à faire le filtrage géométrique en ajoutant un filtre à la couche POI OSM : Dans compute()

    if (this.poi) {
      this.poi.ids.forEach( (id) => {
        if (settings.poisToDisplay[id.split(" ")[0]]) {
          this.map.setFilter(id, ["all", ["within", this.polygon], this.map.getFilter(id)]);
        } else {
          this.map.setFilter(id, ["all", ["==", "true", "false"], this.map.getFilter(id)]);
        }
      });
    }