Sign inSign up

dievexx/sitna_api

By dievexx

Updated over 6 years ago

Image
0

287

dievexx/sitna_api repository overview

SITNA API

Flask + Gunicorn service to run SITNA API

Deployment

docker-compose.yml portainer version
version: "3.7"
services:
  sitna:
    image: dievexx/sitna_api:1.0
    #container_name: sitna
    ports:
      - "5000:5000"
    environment:
      #- HOME_PAGE=home_default.html
      - HOME_PAGE=home.html
    configs:
      - source: home
        target: /sitna_api/home.html
    networks:
      - qgisnet

configs:
  home:
    external: true  
  
networks:
  qgisnet:
    external: True
home config file example (home.html):
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Sitna Deployment</title>
    <script type="text/javascript" src="http://test-pamplona.hopu.eu/sitna/api"></script>
</head>
<body>

<div id="mapa">
    <script>
        SITNA.Cfg.proxy = "proxy.ashx?";
        var map = new SITNA.Map("mapa", {
          crs: "EPSG:4326",
          initialExtent: [ // Coordenadas en grados decimales, porque el sistema de referencia espacial es WGS 84.
            -2.84820556640625,
            41.78912492257675,
            -0.32135009765625,
            43.55789822064767
          ],
          maxExtent: [
            -2.84820556640625,
            41.78912492257675,
            -0.32135009765625,
            43.55789822064767
          ],
          baselayerExtent: [
            -2.84820556640625,
            41.78912492257675,
            -0.32135009765625,
            43.55789822064767
          ],
          baseLayers: [
            SITNA.Consts.layer.IDENA_DYNBASEMAP
          ],
          defaultBaseLayer: SITNA.Consts.layer.IDENA_DYNBASEMAP,
          workLayers: [
            {
              id: "pamplona",
              title: "Pamplona",
              type: SITNA.Consts.layerType.WMS,
              //url: "http://192.168.1.48:5000/wms",
              url: "http://test-pamplona.hopu.eu/qgisserver/",
              layerNames: "Mobiliario Urbano, Barrios"
            },
          ]
        });
    </script>
</div>
</body>
</html>

Tag summary

Content type

Image

Digest

Size

138.6 MB

Last updated

over 6 years ago

docker pull dievexx/sitna_api:1.0