Problem with display map from postgis

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with display map from postgis

boho
This post has NOT been accepted by the mailing list yet.
Hello..
i'm trying to make a simple map from posgresql database..
i have generate the map file with quantum gis, and trying to connect from quantum gis is work fine.
but when i call my map file link, like this http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/tutorPgRouting/tutor.map&layer=District&mode=map

the map is not show, just blank view.
i use mapserver version 2.2.6 and postgis 1.5 with postgresql 9.1.

this is my map file :

# Map file created from QGIS project file C:/ms4w/Apache/htdocs/tutorPgrouting/tutorPgRouting.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME "QGIS-MAP"
  # Map image size
  SIZE 100 100
  UNITS meters

  EXTENT 92.802099 -0.769160 105.428003 5.084228
  FONTSET './fonts/fonts.txt'
  SYMBOLSET './symbols/symbols.txt'
  PROJECTION
    'proj=longlat'
    'datum=WGS84'
    'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 255
  IMAGEQUALITY 95
  IMAGETYPE agg

  OUTPUTFORMAT
    NAME agg
    DRIVER AGG/PNG
    IMAGEMODE RGB
  END
  # Legend
  LEGEND
      IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 18 12
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH '/tmp/'

    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/tmp/'

    # WMS server settings
    METADATA
      'ows_title'           'QGIS-MAP'
      'ows_onlineresource'  'http://my.host.com/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/tutorPgrouting/tutor.map'
      'ows_srs'             'EPSG:4326'
    END

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
    TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  END

  LAYER
    NAME 'siantar_jalan_kota'
    TYPE LINE
    DUMP true
    TEMPLATE fooOnlyForWMSGetFeatureInfo
  EXTENT 98.947524 2.910022 99.170923 3.011604
    CONNECTIONTYPE postgis
    CONNECTION "dbname='belajarRouting' host=localhost port=5432 user='postgres' password='postgres' sslmode=disable"
    DATA 'the_geom FROM "siantar_jalan_kota" USING UNIQUE gid USING srid=4326'
    METADATA
      'ows_title' 'siantar_jalan_kota'
    END
    STATUS OFF
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'datum=WGS84'
    'no_defs'
    END
    CLASS
       NAME 'siantar_jalan_kota'
       STYLE
         WIDTH 10
         COLOR 47 19 184
       END
    END
  END

END

can anyone tell me what is the problem...
Thanks