RE: [mapserver-users] PERL MapScript
Hi Tom- Very strange. I don't see an xml file but now I've tried this and I do get an instance of an imageObj back: my $map = new mapscript::mapObj('test.map') or die no map $!; $map-saveMapContext('test.xml'); my $image = $map-draw(); print $image; So I guess I'll proceed and see how things go. Thanks for your input. -Chris -Original Message- From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca] Sent: Tuesday, May 19, 2009 4:58 PM To: Christopher Condit; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] PERL MapScript I get the same error when running mapObj-get(name). I don't see any get() method in mapObj. From my example, you should see a out2.xml file written to disk. ..Tom -Original Message- From: Christopher Condit [mailto:con...@sdsc.edu] Sent: Tue 19-May-09 19:45 To: Kralidis,Tom [Ontario]; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] PERL MapScript Hi Tom- What does your code look like? The following works for me: #!/usr/bin/perl use mapscript; use strict; my $map = new mapscript::mapObj(test.map) or die no map $!; my $name = $map-get(name); print $name; #!/usr/bin/perl use strict; use warnings; use mapscript; my $map = new mapscript::mapObj('test.map'); $map-saveMapContext('out2.xml'); I also tried running your code. It doesn't generate an error but no test.xml file is created... Any thoughts? Thanks, -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] PERL MapScript
Hi- I'm trying to get up and running with PERL MapScript on Linux (CentOS 5, MapServer 5.4 codebase). It seems to compile and install correctly but when I attempt to open a MapFile I get the following error: Can't locate auto/mapscript/mapObj/get.al in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) Has anyone else encountered this problem or know a solution? Thanks, -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] PERL MapScript
Hi Tom- What does your code look like? The following works for me: #!/usr/bin/perl use mapscript; use strict; my $map = new mapscript::mapObj(test.map) or die no map $!; my $name = $map-get(name); print $name; #!/usr/bin/perl use strict; use warnings; use mapscript; my $map = new mapscript::mapObj('test.map'); $map-saveMapContext('out2.xml'); I also tried running your code. It doesn't generate an error but no test.xml file is created... Any thoughts? Thanks, -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: php mapscript objects in session?
-Original Message- From: [EMAIL PROTECTED] [mailto:mapserver-users- [EMAIL PROTECTED] On Behalf Of jim white Sent: Friday, November 21, 2008 9:19 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: php mapscript objects in session? Hi- I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to create the MapScript map object and store it in the session: $_SESSION['map'] = ms_newMapObj($getMapPath); This works fine for the that page, for the first call, but when I attempt to reference it later I get a PHP error: Fatal error: Object has an invalid _handle_ property Am I missing something here? Thanks, -Chris Chris, When you attempt to start a session, you need to load the class definition first. For example ?php require('myclass.php'); session_start(); ? Hi Jim- Thanks for responding... Actually, I can store non MapScript objects in the $_SESSION just fine, but when I attempt to either: 1) add the MapScript object as a private member of my class 2) simply save the MapScript object to the $_SESSION and then reuse, I get the error. Have you managed to store MapScript objects in sessions? -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] php mapscript objects in session?
Hi- I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to create the MapScript map object and store it in the session: $_SESSION['map'] = ms_newMapObj($getMapPath); This works fine for the that page, for the first call, but when I attempt to reference it later I get a PHP error: Fatal error: Object has an invalid _handle_ property Am I missing something here? Thanks, -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] KML thematics from MS Layers
Hi Sarel- I’m not sure why I didn’t see your GDAL-dev post… I don’t know of any way to do this with MapServer, but you can come close with a combination of OGR and XSL. I wrote a post on this a while ago on the gdal wiki here: http://trac.osgeo.org/gdal/wiki/KML So essentially you’d export to KML using ogr2ogr and then customize the styling based on your needs. You could even generate the XSL file dynamically if you needed to… -Chris From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sarel Coetzer Sent: Monday, June 02, 2008 5:09 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] KML thematics from MS Layers Hi Need some advice on how to create thematic looking KML layers from MapServer layers that is classified in 5 thematic classes. This is a long shot and might be the wrong forum but I haven't had success in the GDAL or OGR forums Sarel -- http://sarelgis.blogspot.com/; ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Mapserver and OpenDAP
Hi Arjen, Chris, I'd be very interested to hear about your experiences on building Mapserver on Windows, especially concerning the OpenDAP driver and the makefile Frank mentioned. I guess the build kit is the best way to start? Since I'm also interested in this I've created a new ticket in the GDAL trac and will have a look as soon as possible. I checked briefly last night but it looks like things have changed in the OPeNDAP windows library a bit since I last built it (3.4, I think). So I'll probably have to update the gdal driver as well... Let's continue this discussion on the ticket: http://trac.osgeo.org/gdal/ticket/2383 -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Mapserver and OpenDAP
Hi Arjen, What would be the best way of getting this to work? Would this mean I have to recompile Mapserver? Or is it possible to just recompile the GDAL driver? Any tips on recompiling on Windows (if necessary) or on using OpenDAP with Mapserver would be very welcome, since I have no experience with it. A year or so ago I did exactly this - building OPeNDAP support into gdal on Win32. So it's very possible if you feel comfortable building from source on Windows. That was on an older server machine and I don't think it ever got integrated into the trunk. I'll look around for it and let you know. The real problem, though, is that many OPeNDAP datasets I've encountered are either inverted or span 0-360 instead of -180 to 180, so I ended up having to write scripts to preprocess them anyway... -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [MAPSERVER-USERS] How to get class expression used in layer in themapfile
Here's an example in C# (it's from an older project, but I think it should still show what to do): classObj cls = new classObj(myLayerObj); cls.name = Test Class; sls.setExpression(count = 5); styleObj sty = new styleObj(cls); sty.color = new colorObj(255, 255, 0, 1); sty.outlinecolor = new colorObj(0, 0, 0, 2); sty.symbolname = circle; sty.size = 8; -Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of yatendra Sent: Friday, May 02, 2008 07:14 To: mapserver-users@lists.osgeo.org Subject: [MAPSERVER-USERS] How to get class expression used in layer in themapfile Hi friends, I am using asp.net and mapscript_charp.dll. I have used different classes in a layer in my map file to give differrent color to each feature. Now by using asp.net mapscript i am trying to get the expression i used in layer declaration in map file. I have created a class object. assigned layername used in mapobject. now i got stucked. How to get classes in a layer and how to use different functions of class objects Please giude me if anyone have knowladge about this issue. php script will do... I need only idea.. Thanks regards -- View this message in context: http://www.nabble.com/How-to-get-class-expression-used-in-layer-in-the-m apfile-tp17014924p17014924.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] PHP MapScript and Inheritance
I'm curious if anyone has successful inherited from the php classes exposed by PHP MapScript. I'd to subclass both mapObj and layerObj, but can't quite figure out how. Thanks, -Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users