[Mapserver-users] Zoom extent problem

Brendan W. brendwal at yahoo.ca
Fri Jul 9 12:34:05 PDT 2004


I've been tinkering with this for days and can't figure it out.  I try
to zoom in, and I get a blank image returned, or if the scalebar code
is uncommented, then I get an error which says:
"msAddImageSymbol(): Unable to access file. Error opening image file
C:\Progra~1\Apache~1\Apache2\htdocs\scalebar."
 
So removing the scalebar just produces a blank resulting map, so it's
not a scalebar problem.
I've changed the map extent in the mapfile to various extents, which
will give me different inital startup extents, but then when I try to
zoom in, I get the error above.  Sometimes I can zoom in a few times,
then the error - this is dependant on how far I have set the extents
initially.  I don't have any min/max setup yet, so that isn't it.  
I have also tried different shapefiles, rasters, etc.  Is it a WMS
problem? Frustrated!  Any ideas?  I'm stumped!  Here's the code:
 
# Start of Mapfile
MAP
NAME "MCEL2"
STATUS ON
SIZE 700 663
EXTENT 479447 5452720 509590 5462627 #did work
UNITS METERS
SHAPEPATH "C:\Progra~1\Apache~1\Apache2\htdocs\"
STATUS ON
SYMBOLSET
"C:\Progra~1\Apache~1\Apache2\htdocs\assets\symbols\examples.sym"
FONTSET "C:\Progra~1\Apache~1\Apache2\htdocs\fonts\fonts.list"

OUTPUTFORMAT
  NAME JPG
  DRIVER "GD/JPEG"
  MIMETYPE "IMAGE/JPG"
  IMAGEMODE RGB
  EXTENSION "jpg"
  FORMATOPTION "QUALITY=10"
END

WEB
  TEMPLATE mcel2.php
  IMAGEPATH "C:\Progra~1\Apache~1\Apache2\htdocs\assets\temp\"
  IMAGEURL "/assets/temp/"
  LOG "C:\Progra~1\Apache~1\Apache2\logs\mapserv.log"
  METADATA
    "WMS_SRS" "EPSG:26910"
    "WMS_TITLE" "OrthoServer"
    "WMS_ONLINERESOURCE" "http://207.232.118.165/index2.php"
    END #Metadata
END

SCALEBAR
 LABEL
  COLOR 255 255 0
  SIZE TINY
  OUTLINECOLOR 0 0 0
 END #Label
 TRANSPARENT OFF
 BACKGROUNDCOLOR 255 0 0
 STATUS EMBED
 IMAGECOLOR 0 0 0 
 INTERVALS 5
 OUTLINECOLOR 255 255 0
 POSITION LR
 STYLE 0
 UNITS METERS
END # End SCALEBAR
 
# ==================================================
# This layer for background MASK
# ==================================================
LAYER 
   NAME "Mask"
   TYPE POLYGON
  # MAXSCALE 300000
  STATUS Default
  DATA "assets\vector\mask.shp"
  CONNECTION "http://207.232.118.165/cgi-bin/mapserv.exe?"
  CLASS  
  COLOR 0 0 0
  END #Class
  
   METADATA
    WMS_TITLE "stuff here"
    WMS_ABSTRACT "more text here"
    WMS_SRS "EPSG:26910"
  END
  
 END # LAYER
 
# ==================================================
# This layer labelling the municipalities
# ==================================================
LAYER 
  NAME "Munis"
  TYPE POINT
  STATUS DEFAULT
  DATA "assets\vector\munis.shp"
  CONNECTION "http://207.232.118.165/cgi-bin/mapserv.exe?"
  LABELITEM "Name"
  CLASS
    LABEL
        COLOR 255 255 0
        SHADOWCOLOR 0 0 0
        SHADOWSIZE 2 2
        TYPE TRUETYPE
        FONT arial_bold
  SIZE 14
  BUFFER 10
   
        ANTIALIAS TRUE
        POSITION CC
        PARTIALS True
      END # end of LABEL
    END # end of CLASS
 METADATA
    WMS_TITLE "blurb"
    WMS_ABSTRACT "more stuff here"
    WMS_SRS "EPSG:26910"
  END
END 

# ==================================================
# This layer for SKYTRAIN transportation vector
# ==================================================
LAYER 
   NAME "Skytrain"
   TYPE LINE
  # MAXSCALE 300000
  STATUS Default
  DATA "assets\vector\skytrain.shp"
  CONNECTION "http://207.232.118.165/cgi-bin/mapserv.exe?"
   LABELITEM "TYPE"
   CLASS  
  SYMBOL "dash-short"
  COLOR 255 87 48
    SIZE 4
 
 LABEL
  ANGLE AUTO
        COLOR 255 200 48
        SHADOWCOLOR 0 0 0
        SHADOWSIZE 2 2
        TYPE TRUETYPE
        FONT arial_bold
  SIZE 12
  BUFFER 10
   
        ANTIALIAS TRUE
        POSITION AUTO
        PARTIALS True
      END # end of LABEL
 
  END #Class
   METADATA
    WMS_TITLE "blah blah"
    WMS_ABSTRACT "yadayada"
    WMS_SRS "EPSG:26910"
  END
 END # LAYER
 

END # Map File


=====
------------------------
Brendan Walashek
(brendwal at yahoo.ca)

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



More information about the MapServer-users mailing list