Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By nannan767

A problem about MapServer

This is a discussion on A problem about MapServer within the Other Mapping Platforms forums, part of the Map Forums category; I installed MS4W in D:/MS4W. Added hello.map which contains following code: Code: NAME "Hello_World" SIZE 400 300 IMAGECOLOR 249 245 ...

  1. #1
    nannan767 is offline Junior Member White Belt
    Join Date
    Jan 2012
    Posts
    1

    A problem about MapServer

    I installed MS4W in D:/MS4W.
    Added hello.map which contains following code:

    Code:
    NAME "Hello_World"
    SIZE 400 300
    IMAGECOLOR 249 245 186
    IMAGETYPE png
    EXTENT -1.00 -1.00  1.00 1.00
    WEB
      TEMPLATE "D:/ms4w/Apache/htdocs/hello.html"
      IMAGEPATH "D:/ms4w/tmp/ms_tmp/"
      IMAGEURL "/ms_tmp/"
    END
    LAYER
      STATUS default
      TYPE point
      FEATURE
        POINTS 0.0 0.0 END
        TEXT "Hello World"
      END # end feature
      CLASS
        STYLE
          COLOR 255 0 0
        END
        LABEL
          TYPE bitmap
        END
      END
    END
    END
    And hello.html contains following code:

    Code:
    <html>
    <head><title>MapServer Hello World</title></head>
    <body>
      <form method="get" action="D:/ms4w/Apache/cgi-bin/mapserv.exe">
        <input type="submit" value="Click Me">
        <input type="hidden" name="map" value="D:/ms4w/Apache/htdocs/hello.map">
        <input type="hidden" name="map_web_imagepath" value="D:/ms4w/tmp/ms_tmp/">
      </form>
      <IMG SRC="[img]" width=400 height=300 border=0>
    </body>
    </html>
    Then I open localhost:8080/hello.html with IE, but there isn't any image displayed after I
    click the "click me" button. Is there anything wrong? thx
    Last edited by Eric Frost; 01-24-2012 at 08:35 AM.

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    4,563
    Blog Entries
    4

    Re: A problem about MapServer

    I'm no MapServer expert, but I think it could be any number of things. Did you verify Apache is working?
    ~ Order MapPoint MapPoint 2011 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Posts
    1,722
    Blog Entries
    50

    Re: A problem about MapServer

    I'm not sure of your setup (and find MapServer works best as a WMS server rather than the HTML templates) but do the two ms_tmps refer to the same place?
    Ie. does the URL http:/localhost/ms_tmp refer to D:/ms4w/tmp/ms_tmp/ ?

    I haven't tried using MapServer on a PC host, but it might also be that the local paths should use DOS-style directory separators (back slashes rather than forward slashes).
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 11-09-2010, 05:35 AM
  2. mapserver php mapscript problem
    By mithu in forum Other Mapping Platforms
    Replies: 5
    Last Post: 08-24-2009, 02:51 AM
  3. Adding a Dynamic Layer in Pmapper(Using Mapserver)
    By Elen_99 in forum Other Mapping Platforms
    Replies: 0
    Last Post: 04-24-2009, 05:10 AM
  4. Initial Costa Rica MapServer map is up & running!
    By Winwaed in forum Other Mapping Platforms
    Replies: 3
    Last Post: 05-20-2008, 07:07 PM
  5. Any MapServer users out there?
    By Winwaed in forum Other Mapping Platforms
    Replies: 2
    Last Post: 04-24-2008, 06:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79