[mapserver-users] MapServer+OpenLayers+TileCache
Jelmer Baas
Baas at speerit.nl
Tue Aug 4 06:34:34 PDT 2009
Bart,
Thank you for your quick reply. Some of my layers are indeed RD, others
are WGS84.
I have modified my mapfile and tilecache config according to your
suggestions. This gives me some other errors, though, so I think I'm
doing a few things completely wrong.
Note that I use the index.html from OpenLayers without any
modifications.
New errors: when fully zoomed out and having (showing the whole world, I
guess) each image is pink with an error like
An error occurred: can't find resolution index for 0.351563. Available
resolutions are: <etc>
Zoom in one step:
An error occurred: can't find resolution index for 0.087891. Available
resolutions are:
So I don't even get close to the resulutions you specified... If I DO
add that resolution, I get this:
An error occurred: Current x value -67.500000 is too far from tile
corner x -60.793600
So I guess somewhere I messed up my projection settings bigtime.
Regards,
Jelmer
> -----Original Message-----
> From: bartvde at osgis.nl [mailto:bartvde at osgis.nl]
> Sent: dinsdag 4 augustus 2009 14:43
> To: Jelmer Baas
> Cc: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] MapServer+OpenLayers+TileCache
>
> Hi Jelmer,
>
> PROJECTION of a LAYER is the projection of your source data,
> so I assume
> that's RD in your case or not?
>
> So use:
>
> LAYER
> ..
> PROJECTION
> "init=epsg:28992"
> END
> METADATA
> "wms_srs" "EPSG:28992 EPSG:4326"
> END
> END
>
> Example tilecache config:
>
> [satlufo]
> type=WMSLayer
> layers=basis,satlufo
> debug=false
> url=http://145.50.148.45:8081/rwsnl/tiled?_tilecache&transpare
> nt=false&
> extension=png
> srs=EPSG:28992
> bbox=-400000,225000,625000,950000
> resolutions=1400.00365346073000,700.00182673036700,280.0007306
> 9214700,140.00036534607300,70.00018267303670,28.00007306921470
> ,14.00003653460730,7.00001826730367,2.80000730692147
> metaTile=true
> metaBuffer=100
> extent_type=loose
>
> Best regards,
> Bart
>
> > 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
> > _______________________________________________
> > 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