[mapserver-users] MapServer+OpenLayers+TileCache

Jelmer Baas Baas at speerit.nl
Tue Aug 4 08:17:35 EDT 2009


Hello List,

I've been messing around with TileCache for a while now, trying to see
if I can get it to work the way I want. It does work, but I'm unable to
"switch" to the projection system that I need, which is epsg:28992
(amersfoort new).

Whatever I try, I always end up with the world showing up OK, but the
Netherlands (which is what this is about) messed up and stretched. I
feel like I tried everything: tell TileCache to use epsg:4326 or 28992,
test in my Map file by changing the PROJECTION block (tried "auto",
"init=epsg:28992", etc), change the wms_srs to 4326,28992 and more. 

This is my TileCache definition:
[test]
type=WMSLayer
layers=netherlands,world
url=[myurl]
srs=EPSG:4326 

My mapfile is still messed up from pervious experiments, but it's now:

MAP
	NAME test
	FONTSET "fontset.txt" 
	IMAGECOLOR 255 255 255
	OUTPUTFORMAT
		NAME aggpng24
		DRIVER AGG/PNG
		TRANSPARENT ON
		IMAGEMODE RGBA
		MIMETYPE "image/png"
		EXTENSION "png"
	END
	
    WEB
        METADATA

            "wms_title" "CoconTheWeb - Eurofiber"
            "wms_srs" "EPSG:4326"
            "wms_onlineresource" "[myurl]"
        END # METADATA
    END #web

	
	SYMBOLSET "symbols_mapinfo.sym"

	PROJECTION
		"init=epsg:4326"
	END

	LAYER
		NAME netherlands
		TYPE POLYGON
		STATUS ON
		CONNECTIONTYPE OGR
		CONNECTION "C:\Mapinfo\data\Streetpro\NETHA0.tab"
		#STYLEITEM "AUTO"
		CLASS
			COLOR 255 247 214
		END
		PROJECTION
			"init=epsg:4326"
		END
		METADATA
			"wms_title" "netherlands"
			"wms_srs" "epsg:28992,4326"
		END # METADATA
	END

	LAYER
		NAME world
		TYPE LINE
		STATUS ON
		CONNECTIONTYPE OGR
		CONNECTION "C:\MapINfo\Data\StreetPro\wrlda0.tab"
		STYLEITEM "AUTO"
		CLASS
			name "world"
		end

		METADATA
				"wms_title" "world"
		END # METADATA
		MINSCALE 4
		MAXSCALE 4000000000
	END
	
END # Map File


I know there's much that needs to be changed/cleaned up in my Map File,
I'll do that later. Anyone know what I'm doing wrong, here?


Regards,
Jelmer Baas


More information about the mapserver-users mailing list