[mapserver-users] Trouble with mode=tile

Fawcett, David David.Fawcett at state.mn.us
Fri Jan 2 14:11:04 EST 2009


Dave, 

I am not sure if this is it, but in your WMS request, you are not
specifying a SRS.  You are advertising two SRS' in your WEB WMS
"wms_srs" metadata.  I wonder if MapServer is just defaulting to the
first SRS in your list in the absence of an explicit request?  

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dave
Rafkind
Sent: Friday, January 02, 2009 12:39 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Trouble with mode=tile


Hi list, I'm using the latest ms4w on a windows XP box. When trying to 
use mapserver's tile mode in a Virtual Earth or Google Maps control, it
looks totally wrong (like the wrong projection is being used 
perhaps?). What is the right way to go about this?

Here's mapserver.exe -v:

C:\ms4w\Apache\cgi-bin>mapserv -v
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICO
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=FASTCGI SUP
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS 
INPUT=OGR
 INPUT=GDAL INPUT=SHAPEFILE

Here's the relevant part of my web page with the map control:
        map=new VEMap('myMap');
        // ...
        var layerId = "myCustomTileLayer";
        var tileSource = 
"http://localhost/cgi-bin/mapserv.exe?map=/src/maps/mapdata/maps/dave1.m
ap&layers=world&mode=tile&tilemode=ve&tile=%4";
        var tileSourceSpec = new VETileSourceSpecification(layerId, 
tileSource);
        // ...

Here's the last line of my EPSG file (from c:\ms4w\proj\nad\epsg)
        # google/virtual earth spherical mercator
        <900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0

+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <>


And here's my map file:
MAP
  IMAGETYPE      PNG
  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE RGBA
    EXTENSION "png"
    TRANSPARENT ON
  END

  SHAPEPATH      "/src/maps/mapdata"
  FONTSET     "/src/maps/mapdata/fonts.list"
  IMAGECOLOR     0 0 0

 
  WEB
  METADATA
    "wms_title"           "WMS Demo Server"
    "wms_onlineresource"  
"http://localhost/cgi-bin/mapserv.exe?map=/src/maps/mapdata/maps/dave1.m
ap&"
    "wms_srs"             "EPSG:4326 EPSG:900913"
  END
END

 
    PROJECTION
      "init=epsg:900913"
    END

  SYMBOL
    name "circle"
    type ellipse
    filled true
    POINTS 1 1 END
  END

  SYMBOL
    NAME 'dashed1'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED true
    STYLE 4 4 END
  END

  SYMBOL
    NAME 'railway'
    TYPE cartoline
    LINECAP butt
    LINEJOIN miter
    LINEJOINMAXSIZE 3
    STYLE
      1 10 1 10
    END
  END

  LAYER
    PROJECTION
      "init=epsg:4326"
    END
    NAME         world
    DATA     "world/world_adm0.shp"
    STATUS OFF
    TYPE         LINE
    LABELITEM     "REGION"
    CLASS
      STYLE
                COLOR 255 255 255
                OUTLINECOLOR 0 0 0
      END
      LABEL
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        TYPE TRUETYPE
        FONT arial
        SIZE 9
        ANTIALIAS TRUE
        PARTIALS FALSE
        MINDISTANCE 250
        BUFFER 4
      END
    END
  END
END


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list