[MAPSERVER-USERS] Odd behaviour with openlayers: think Map file error

Andrew de klerk andrew.deklerk at gmail.com
Thu Jul 10 10:11:57 EDT 2008


Hi all

I am not sure how to explain this, but i will try my best. I have a mapfile
that works perfectly from openlayers through calling Layer.WMS. I then
modified the layer file to include a point shapefile. If I then call the
mapfile like:
http://localhost/cgi-bin/mapserv.exe?map=c:\\ms4w\\apps\\Streetmap\\ZDM.map&Mode=map

all works fine, and I see the points. If I however refresh my openlayers
map, I see the original map without the points displayed. I then tried to
clear my cache and Ctrl f5 again, but still the same problem. I then changed
my openlayers from Layer.WMS to Layer.MapServer and tried, but still the
same problem. As a final test I changed it to Layer.MapServer.Untiled, and I
could see the points....that is until I zoom in, then the points dissapear.

So what is the problem? Is it possibly a map file error?, 
I will give an extract of my mapfile and the offending layer. 

I must also add that the file did get corrupt at one stage, but I did have a
backup in projected file, which I did reproject to WGS84 (essentially
re-creating it)...but I have no gaurantee that the backup file is not
corrupted...so could all this be the fault of a corrupt shapefile??

Anyway, here is the layer extract and the header of my mapfile:

  LAYER
    NAME 'Scheme_Components'
    TYPE POINT
    DATA 'Infrastructure\Scheme_Components'
    METADATA
      'wms_title' 'Scheme_Components'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
      "init=epsg:4148"
    END
    CLASS
	MINSCALE 1
	MAXSCALE 5000000
        NAME 'Communal Standpipe' 
        STYLE
          SYMBOL 'Triangle'
          SIZE 7 
          COLOR 182 120 174 
        END
    END
  END 
_______________________________________________
MAP
  NAME 'ZDM'
  SIZE 600 500
  UNITS dd
  SHAPEPATH "D:\ZDM\basedata\"
  #CONFIG "PROJ_LIB" "D:\WWW\WMSMapServer\ms4w\proj\nad\"
    CONFIG "PROJ_LIB" "C:\ms4w\proj\nad\"
  FONTSET "Fonts/fonts.txt"
  SYMBOLSET "Symbols/symbols.sym"
  EXTENT 29.739840 -28.780849 32.845078 -26.922820
  
  PROJECTION
    "init=epsg:4148"
  END
 
OUTPUTFORMAT
   NAME 'AGG_JPEG'
   DRIVER AGG/JPEG
   IMAGEMODE RGB
   FORMATOPTION "QUALITY=90"
END

  #Legend
  LEGEND
    IMAGECOLOR 255 255 255
    STATUS ON
    KEYSIZE 16 10
     LABEL 
       TYPE truetype
       ANTIALIAS true
       FONT arial
       SIZE 9
       COLOR 0 0 0
       BUFFER 1
       PARTIALS false
       MINDISTANCE 500
     END 
  END
  
  SCALEBAR
    COLOR 0 0 0
    IMAGECOLOR 255 255 255
    INTERVALS 3

    LABEL
      TYPE truetype
       ANTIALIAS true
       FONT arial
       SIZE 7
       COLOR 0 0 0
       BUFFER 1
       PARTIALS false
       MINDISTANCE 500
    END
    OUTLINECOLOR 0 0 0
    POSTLABELCACHE TRUE
    POSITION LL
    SIZE 120 4
    STATUS ON
    STYLE 0
    UNITS KILOMETERS
  END
  
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    #IMAGEPATH 'D:\ApplicationTemp\'
	IMAGEPATH 'D:\Inetpub\Uploads\Temp'

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

    # WMS server settings
    METADATA
      'wms_title'           'ZDM'
      'wms_onlineresource'  'http://wms.mapexchange.co.za/qwms/qwms.aspx?'
      'wms_srs'             'EPSG:4148'
    END
    TEMPLATE "Streetmap.html"

  END
-- 
View this message in context: http://www.nabble.com/Odd-behaviour-with-openlayers%3A-think-Map-file-error-tp18383538p18383538.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list