npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

geopf-extensions-openlayers

v1.0.0-beta.1

Published

French Geoportal Extensions for OpenLayers libraries

Downloads

144

Readme

Extension Géoplateforme pour OpenLayers

Ce projet a pour but de fournir des extensions facilitant l'accès aux ressources de la Géoplateforme pour la bibliothèque cartographique OpenLayers (versions 8 et supérieures).

Execution locale

  • Cloner le projet

    git clone https://github.com/IGNF/geopf-extensions-openlayers.git
  • Accéder au répertoire du projet

    cd geopf-extensions-openlayers
  • Installer les dependances

    npm install
  • Démarrer le serveur des exemples

    npm run samples:modules
    npm run samples:bundle

    Ouvrir le navigateur : https://localhost:8080/samples/index-modules.html

  • Construire le package

    npm run publish

    Le package est disponible : dist/package/

  • Construire les binaires (bundle)

    npm run build
    npm run build:modules
    npm run build:bundle

    Les binaires sont disponibles : dist/bundle/ et dist/modules/

Demo

https://ignf.github.io/geopf-extensions-openlayers/

Utilisation des widgets sur l'application web cartographique : https://ignf.github.io/cartes.gouv.fr-entree-carto/

Le projet contient un répertoire demos où on y utilise les extensions dans différents Frameworks (vuejs, react ou angular).

Documentations

Documentation technique

Documentation génerale

Widgets

  • Drawing,
  • Isocurve,
  • Route,
  • LayerImport,
  • GeoportalAttribution,
  • SearchEngine,
  • GetFeatureInfo,
  • GeoportalZoom,
  • GeoportalOverviewMap,
  • ElevationPath,
  • MeasureArea,
  • MeasureAzimuth,
  • MeasureLength,
  • LayerSwitcher,
  • Legends,
  • GeoportalMousePosition,
  • ReverseGeocode,
  • CRS,
  • GeoportalLayerMapBox,
  • GeoportalLayerWMTS,
  • GeoportalLayerWMS,
  • ...

Pour obtenir la liste exhaustive des widgets, se référer à la Documentation technique

Usage/Examples

Exemple d'utilisation du package des sources (ES module) :

import {
    Drawing,
    Isocurve,
    Route,
    LayerImport,
    GeoportalAttribution,
    GeoportalZoom,
    GeoportalOverviewMap,
    ElevationPath,
    MeasureArea,
    MeasureAzimuth,
    MeasureLength,
    LayerSwitcher,
    Legends,
    MousePosition as GeoportalMousePosition,
    ReverseGeocode,
    SearchEngine,
    GetFeatureInfo,
    CRS,
    LayerMapBox as GeoportalLayerMapBox,
    LayerWMTS as GeoportalLayerWMTS
} from "geopf-extensions-openlayers";

 const map = new Map({
        target : "map",
        layers : [
            new GeoportalLayerMapBox({
                layer : "PLAN.IGN"
            }),
            new GeoportalLayerWMTS({
                layer : "ORTHOIMAGERY.ORTHOPHOTOS"
            })
        ],
        view : new View({
            center : [288074.8449901076, 6247982.515792289],
            zoom : 8,
        })
    });
    
    var overmap = new GeoportalOverviewMap({
        position : "bottom-left"
    });
    map.addControl(overmap);
    
    var zoom = new GeoportalZoom({
        position : "bottom-left"
    });
    map.addControl(zoom);
    
    var drawing = new Drawing({
        position : "top-left"
    });
    map.addControl(drawing);
    
    var iso = new Isocurve({
        position : "bottom-left"
    });
    map.addControl(iso);
    
    var layerImport = new LayerImport({
        position : "bottom-left"
    });
    map.addControl(layerImport);
    
    var legends = new Legends({
        position : "bottom-left"
    });
    map.addControl(legends);

    var layerSwitcher = new LayerSwitcher({
        options : {
            position : "top-right"
        }
    });
    map.addControl(layerSwitcher);
    
    var mp = new GeoportalMousePosition({
        position : "top-right"
    });
    map.addControl(mp);
    
    var route = new Route({
        position : "top-right"
    });
    map.addControl(route);
    
    var reverse = new ReverseGeocode({
        position : "top-right"
    });
    map.addControl(reverse);
    
    var search = new SearchEngine({
        position : "top-right"
    });
    map.addControl(search);
    
    var feature = new GetFeatureInfo({
        position : "top-right"
    });
    map.addControl(feature);
    
    var measureLength = new MeasureLength({
        position : "bottom-left"
    });
    map.addControl(measureLength);
    
    var measureArea = new MeasureArea({
        position : "bottom-left"
    });
    map.addControl(measureArea);
    
    var measureAzimuth = new MeasureAzimuth({
        position : "bottom-left"
    });
    map.addControl(measureAzimuth);
    
    var measureProfil = new ElevationPath({
        position : "bottom-left"
    });
    map.addControl(measureProfil);
    
    var attributions = new GeoportalAttribution({
        position : "bottom-right"
    });
    map.addControl(attributions);

Pour obtenir des détails sur les options des differents widgets, se référer à la Documentation technique

La bibliothèque d’accès aux services Géoplateforme est une bibliothèque de fonctions javascript permettant d'accéder aux ressources délivrées par les services web de la Géoplateforme.

Elle permet plus particulièrement d'obtenir les ressources disponibles pour une thématique Géoplateforme et d'avoir les paramètres permettant leur utilisation :

import Gp from "geoportal-access-lib";

var cfg = new Gp.Services.Config({
    customConfigFile : "https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/fullConfig.json",
    onSuccess : () => {
      // load map and some widgets
    },
    onFailure : (e) => {
        console.error(e);
    }
});
cfg.call();

Pour une utilisation avec les binaires (bundles), se référer à la Documentation génerale

Contributions

Les contributions sont toujours les bienvenues !

Liens utiles

Voici quelques projets connexes

  • https://github.com/IGNF/cartes.gouv.fr-entree-carto
  • https://github.com/IGNF/geoportal-access-lib
  • https://github.com/IGNF/geoportal-configuration
  • https://github.com/IGNF/geoportal-extensions
  • ...

Support

Pour obtenir de l'aide, envoyez un e-mail à [email protected] ou rejoignez notre canal sur developpez.com ou creez un ticket sur le projet.

Licence

AGPL License

AGPL-3.0

Appendix

Ce README est généré avec https://readme.so/fr/editor