[mapserver-users] PHP MapScript, WMS Weirdness...
Hankley, Chip
Chip.Hankley at GASAI.Com
Fri Jun 7 11:31:31 PDT 2002
I am trying to figure out how to set up a WMS Client, and am experiencing
some difficulties.
Right now I have a very simple set up:
My WMS Server has ONE layer. The source is lat/long and the WMS Server map
definition is reprojecting to Wisconsin State Plane Central 83.
My WMS Client is only reading this one WMS Server, so it has the one layer
in it. IF I leave out the map file's projection section, and set my extent
to be the same as that used in the WMS Server's definition, it works fine.
However, as soon as I add a projection statement, something hangs... the
page just keeps trying to load, and nothing ever comes up. If I STOP, I find
that I have a PHP.exe task running, and I can't kill it (even using kill.exe
-f).
In either case, if I look in the tmp directory, images are being created
(102347253024720.img.tmp). The images show what I'd expect them to show. IF
I set the projection on the client, I also get a file by the same name,
albeit with a *.wld extension. This makes sense as it's trying to reproject
/ warp the image I imagine.
Anyway, I can't seem to figure out what's going on. Why would tring to
project on the client make things hang?
Client mapfile below. My setup is Win2K, IIS, PHP MapScript 3.5(6?) with PHP
4.1.2
FWIW, the PHP part is pretty simple:
$map = ms_newMapObj("wms_client.map");
$img = $map->draw();
$url = $img->saveWebImage(MS_PNG, $map->transparent, $map->interlace, 50);
printf("<IMG SRC=%s\n", $url);
TIA...
Chip Hankley
SIZE 400 400
#EXTENT 342740 -205273 897751 354852 #This is Wisc SP Central Extent
EXTENT 480953 4673543 1017803 5225424 #UTM 15 Extent
UNITS METERS
FONTSET "D:\HTML\Gasai\GISApps\mapserv\ms_symbols\fonts\fonts.list"
SYMBOLSET "D:\HTML\Gasai\GISApps\MapSymbols\symbol.sym"
WEB
TEMPLATE demo.html
IMAGEPATH "D:\HTML\Gasai\tmp\"
IMAGEURL "/tmp/"
END
PROJECTION
"init=epsg:26915"
END
LAYER
NAME US_States
METADATA
"wms_title" "US States"
"wms_srs" "EPSG:32153"
END
PROJECTION
"init=epsg:32153"
END
TYPE RASTER
STATUS DEFAULT
CONNECTIONTYPE WMS
CONNECTION
"http://pc605/scripts/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\wms_test.map&VE
RSION=1.1.0&LAYERS=STATE&format=image/png"
END # US_States
END # Map File
More information about the MapServer-users
mailing list