[mapserver-users] I want to display a KML file as a wms service

johann johann.mitterbinder at gmx.de
Sat Feb 10 06:28:20 PST 2018


Hi,
I want to display a KML file as a wms service. The file contains a dot. When
calling the WMS, only a white area appears. can someone please help me, here
my data:
###############################################
KML_File:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Antrag</name>
    <description>A_Antraege</description>
    <Folder>
 <visibility>1</visibility>
<Placemark>
  <name>1234/2018</name>
  <description>Huber Flst 1234</description>
  <LookAt>
    <longitude>12.73131</longitude>
    <latitude>48.57780</latitude>
    <range>440.8</range>
    <tilt>8.3</tilt>
    <heading>2.7</heading>
  </LookAt>
  <Point>
    <coordinates>12.73131,48.57780,0</coordinates>
  </Point>
</Placemark>
    </Folder>
  </Document>
</kml>

MAP-File:

MAP
  # Der Name der Map. Dieser ist frei wählbar
  NAME "Antrag"

  STATUS ON

  # Groeße von dem zu erzeugenden Bild
  SIZE 500 400

  # Die Extend-Werte aus dem Shape-File
  #EXTENT 12.731200 48.577690 12.731320 48.577810

  # Typ von dem zu erzeugenden Bild. png hat den vorteil, dass es
transparente Hindergruende darstellen kann
  IMAGETYPE PNG

        # Die Projektion des Shapes. Das Shape hatte als Datum "WGS_84", was
epsg:4326 entspricht.
        # welchem epsg-Wert die Projektion eines Shapes entspricht, muss man
im Internet suchen.
        PROJECTION
          "init=epsg:4326"
        END

        WEB
            IMAGEPATH "/var/www/tmp/"
            IMAGEURL  "/tmp/"
            METADATA
                "wms_enable_request" "*"
            END
  END

  # Hier werden dann die Layer definiert

LAYER
   NAME "Antrag"
   TYPE POINT
   STATUS DEFAULT
   CONNECTIONTYPE OGR
   CONNECTION "/home/spo/MAP/shapes/Antrag.kml"
   DATA "Antrag"
   LABELITEM "Antrag"
   CLASS
     NAME "My Antrag"
     STYLE
       COLOR 250 0 0
       OUTLINECOLOR 0 255 255
       SYMBOL 'circle'
       SIZE 6
     END
   LABEL
     SIZE TINY
     COLOR 0 250 0
     OUTLINECOLOR 255 255 255
     POSITION AUTO
   END
END
END
END
#############################



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html


More information about the mapserver-users mailing list