Technical documentation of Geoportal API

  • FR
  • UK

Index / Documentation / Technical documentation

Adding layers in MXML

Adding a WMS layer 
Adding a WMTS layer 
Adding a WFS layer 
Adding a KML layer 
Adding a GPX layer 
Adding a GeoRSS layer 

Adding a WMS layer

In the application's code, add a <geoportail:WMS> tag inside the <geoportail:Map> tag.

Examples of use:

<geoportail:WMS id="communes"
        name="Geological Map"
        url="http://geoservices.brgm.fr/geologie"
        layers="SCAN_F_GEOL250"
        transparent="true"
        tiled="true"
        projection="EPSG:4326"
        maxExtent="-4.979,42.347,8.187,51.074"
        format="image/png"
        alpha="0.5"/>

Parameters :

To set the layer's parameters, add the following attributes inside the <geoportail:WMS> tag.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the URL of the service;.
    • layers : the layer's identifier to retrieve the data from the server.
    • version : protocol's version to use.
  • optionnal parameters:
    • transparent : true (la couche est transparente), false sinon.
    • format : format of the returned image, image / png 'for example. The default format is 'image/jpeg'.
    • alpha : opacity of the layer (between 0 and 1). Defaults to 1.
    • etc.. For more information browse the tutorial and technical documentation.

Adding a WMTS layer

In the application's code, add a <geoportail:WMTS> tag inside the <geoportail:Map> tag.

Parameters :

To set the layer's parameters, add the followong attributes inside the la tag <geoportail:WMTS> tag.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the URL of the service;.
    • tileMatrixSet : Type d'ensemble de données demandée.
    • layers : the layer's identifier to retrieve the data from the server.
    • format : format of the returned image, image / png 'for example. The default format is 'image/jpeg'.
  • optionnal parameters:
    • projection : Geographic projection in which the data will be requested to the service. Default to the map's projection.
    • maxExtent : Represents the maximum extent of the layer;
    • alpha : opacity of the layer (between 0 and 1). Defaults to 1.
    • etc.. For more information browse the tutorial and technical documentation.

Adding a WFS layer

In the application's code, add a <geoportail:WFS> tag inside the <geoportail:Map> tag.

Examples of use:

<geoportail:WFS name="Couche WFS"
                url="http://services.sandre.eaufrance.fr/geotest/mdo_metropole?"
                typename="MasseDEauRiviere"
                projection="EPSG:2154"
                version="1.0.0"
                style="{Style.getDefaultLineStyle()}"
                />

Parameters :

To set the layer's parameters, add the followong attributes inside the la tag geoportail:WFS.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the URL of the service.
    • typename : the layer's identifier to retrieve the data from the server.
    • version : protocol's version to use.
    • style : Style object used to define the style used to display the layer.
  • optionnal parameters:
    • projection : Geographic projection in which the data will be requested to the service. Default to the map's projection.
    • maxExtent : Represents the maximum extent of the layer.
    • alpha : opacity of the layer (between 0 and 1). Defaults to 1.
    • etc.. For more information browse the tutorial and technical documentation.

Adding a KML layer

In the application's code, add a <geoportail:KML> tag inside the <geoportail:Map> tag.

Examples of use:

<geoportail:KML name="Stations de Vélib à Paris"
                id="kmlLayer"
                url="http://www.parisavelo.net/velib.kml"
                style="{Style.getDefaultPointStyle()}"
                srs="EPSG:4326" />

Parameters :

To set the layer's parameters, add the followong attributes inside the <geoportail:KML> tag.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the path to the KML file.
  • optionnal parameters:
    • proxy : the OpenScales proxy server address.
    • srs : The layer's projection.
    • style : Style object used to define the style used to display the layer.
    • etc.. For more information browse the tutorial and technical documentation.

Adding a GPX layer

In the application's code, add a <geoportail:GPX> tag inside the <geoportail:Map> tag.

Examples of use:

<geoportail:GPX id="gpxLayer"
                name="Corse"
                version="1.0"
                url=" http://api.ign.fr/geoportail/api/doc/data/Campomoro-Tizzano-Sartene_3029.gpx" />

Parameters :

To set the layer's parameters, add the following attributes inside the <geoportail:GPX> tag.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the path to the GPX file.
  • optionnal parameters:
    • proxy : the OpenScales proxy server address.
    • version : Version number of the standard GPX used.
    • style : Style object used to define the style used to display the layer.
    • etc.. For more information browse the tutorial and technical documentation.

Adding a GeoRSS layer

In the application's code, add a <geoportail:GeoRSS> tag inside the <geoportail:Map> tag.

Examples of use:

<geoportail:GeoRss id="geoRssLayer"
                   name="Tremblements de terre"
                   url="http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M5.xml" />

Parameters :

To set the layer's parameters, add the following attributes inside the <geoportail:GeoRSS> tag.

  • mandatory parameters:
    • name : the layer's name. This name will be used to identify the layer in the layers manager.
    • url : the URL of the service;.
  • optionnal parameters:
    • refreshDelay : le temps de rafraîchissement entre deux lectures du fichier contenant les données GeoRss (en millisecondes);
    • maxExtent : l'emprise géographique maximale de laquelle les requêtes de données ne pourront sortir;
    • style : Style object used to define the style used to display the layer.
    • alpha : opacity of the layer (between 0 and 1). Defaults to 1.
    • etc.. For more information browse the tutorial and technical documentation.