Re: [mapserver-users] getShape failing; changes from mapserver 5.6 to 6.0

2012-08-06 Thread Stefan Schwarzer
Thanks a lot, Steve.

However, I had tried this out before, but getResult($)? I think this is Perl, 
no? In PHP this would be different? 

Sorry for a dumb question…

Stefan

 The query code underwent major changes between 5.6 and 6.0 and one casualty 
 was query processing like you're doing. On the bright side it's much more 
 straight forward now. The general steps for a layer-based query is now just:
 
 $layer-queryByRect($map, $rect); # layer is left open after a query operation
 
 for($i=0; $i$layer-getNumResults(); $i++) {
   $shape = $layer-getShape($layer-getResult($)); # much simpler
   # do something with the shape
 }
 
 I see the MapScript/Swig query docs are woefully out of date. I'll file a 
 ticket on that...
 
 Steve
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefan Schwarzer
 Sent: Friday, August 03, 2012 6:37 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] getShape failing; changes from mapserver 5.6 to 6.0
 
 Hi there,
 
 I am struggling with a few changes I need to go through in order to make my 
 code working now with mapserver 6.x. This one concerns the query part, when a 
 user clicks on the map and a window with some metadata is being displayed.
 
 An error message occurred:
 
   Catchable fatal error: Argument 1 passed to layerObj::getShape() must 
 be an instance of resultObj, integer given
 
 When I changed the getShape command as indicated here [1], it says:
 
   Fatal error: Call to a member function getShape() on a non-object
 
 
 This is the code:
 
   //Query the Map at the point clicked
   if (!$imgbox)
   @$a = $map - queryByPoint($click_pt, MS_MULTIPLE, -1);
   else
   $a = $map - queryByRect($click_rt);
 
   if ($a == MS_SUCCESS)
   {
 
   $numResults = $Layer - getNumResults();
   $oLayer = $map - getLayer($Layer - index);
 
   // Open layer's table... take the list of fields to display 
 from 
   // the HEADERRESULT_FIELDS metadata in the layer object.
   $oLayer - open();
 
   $oRes = $oLayer - getResult(0);
   //$oShape = $oLayer - 
 getShape($oRes-tileindex,$oRes-shapeindex);// before
   $oShape = $layer - getShape($oLayer - getResult(0));  
 // now ??
   
   
   while(list($key, $val) = each($oShape - values))
   {
   //echo br /x - .count($selFields). - .$key .  =  . 
 $val;
   if (($key  META_DATA) AND ($key  oid) AND ($key 
  id) AND ($key  uid))
   $selFields[count($selFields)] = $key;
   }
 
 
 
 Not sure what I should put there...
 
 Thanks for any hints,
 
 Stefan
 
 
 [1] http://mapserver.org/MIGRATION_GUIDE.html
 ___
 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


Re: [mapserver-users] getShape failing; changes from mapserver 5.6 to 6.0

2012-08-06 Thread Lime, Steve D (DNR)
Yup, sorry it's Perl. The getResult($) should be getResult($i). Syntax for PHP 
should be pretty close I think, method names are the same.

Steve


From: Stefan Schwarzer [stefan.schwar...@unep.org]
Sent: Monday, August 06, 2012 6:48 AM
To: mapserver-users@lists.osgeo.org
Cc: Lime, Steve D (DNR)
Subject: Re: [mapserver-users] getShape failing;changes from mapserver 
5.6 to 6.0

Thanks a lot, Steve.

However, I had tried this out before, but getResult($)? I think this is Perl, 
no? In PHP this would be different?

Sorry for a dumb question…

Stefan

 The query code underwent major changes between 5.6 and 6.0 and one casualty 
 was query processing like you're doing. On the bright side it's much more 
 straight forward now. The general steps for a layer-based query is now just:

 $layer-queryByRect($map, $rect); # layer is left open after a query operation

 for($i=0; $i$layer-getNumResults(); $i++) {
   $shape = $layer-getShape($layer-getResult($)); # much simpler
   # do something with the shape
 }

 I see the MapScript/Swig query docs are woefully out of date. I'll file a 
 ticket on that...

 Steve

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefan Schwarzer
 Sent: Friday, August 03, 2012 6:37 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] getShape failing; changes from mapserver 5.6 to 6.0

 Hi there,

 I am struggling with a few changes I need to go through in order to make my 
 code working now with mapserver 6.x. This one concerns the query part, when a 
 user clicks on the map and a window with some metadata is being displayed.

 An error message occurred:

   Catchable fatal error: Argument 1 passed to layerObj::getShape() must 
 be an instance of resultObj, integer given

 When I changed the getShape command as indicated here [1], it says:

   Fatal error: Call to a member function getShape() on a non-object


 This is the code:

   //Query the Map at the point clicked
   if (!$imgbox)
   @$a = $map - queryByPoint($click_pt, MS_MULTIPLE, -1);
   else
   $a = $map - queryByRect($click_rt);

   if ($a == MS_SUCCESS)
   {

   $numResults = $Layer - getNumResults();
   $oLayer = $map - getLayer($Layer - index);

   // Open layer's table... take the list of fields to display from
   // the HEADERRESULT_FIELDS metadata in the layer object.
   $oLayer - open();

   $oRes = $oLayer - getResult(0);
   //$oShape = $oLayer - 
 getShape($oRes-tileindex,$oRes-shapeindex);// before
   $oShape = $layer - getShape($oLayer - getResult(0));  
 // now ??


   while(list($key, $val) = each($oShape - values))
   {
   //echo br /x - .count($selFields). - .$key .  =  . 
 $val;
   if (($key  META_DATA) AND ($key  oid) AND ($key 
  id) AND ($key  uid))
   $selFields[count($selFields)] = $key;
   }



 Not sure what I should put there...

 Thanks for any hints,

 Stefan


 [1] http://mapserver.org/MIGRATION_GUIDE.html
 ___
 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] demo.mapserver.org source

2012-08-06 Thread Radim Blazek
Hi,
where can I find data and mapfiles used by services running on
demo.mapserver.org?

Radim
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Probelms with GM in Fast CGI

2012-08-06 Thread Bistrais, Bob
We have been experiencing problems with GeoMoose 2.6 when MapServer is running 
in Fast CGI mode.  This relates to problems I've reported in the past, we 
finally figured out that it was the Fast CGI.  When we have MapServer in Fast 
CGI mode, my queries and Identify operations have failed, timed out, and did 
not return results.  We can set MapServer to run in the normal mode, but this 
causes significant issues with the draw times of our WMS services.

It's important that we resolve this problem as soon as possible.  Is there a 
solution or workaround to this issue?

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] demo.mapserver.org source

2012-08-06 Thread Jeff McKenna
On 12-08-06 4:15 PM, Radim Blazek wrote:
 Hi,
 where can I find data and mapfiles used by services running on
 demo.mapserver.org?
 
 Radim

Hello Radim,

Through the years I have been posting demos on demo.mapserver.org and
you can see that it is has become a wonderful resource.  The files are
not available for download, but I will try to post them.

If anyone wonders, this important site is actually hosted on OSGeo's
AdhocVM (http://wiki.osgeo.org/wiki/MapServer_at_AdhocVM);
unfortunately there is no backup for this virtual machine and we've lost
many files over the years.  But I do my best to maintain it.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer 6.2.0 beta2 release

2012-08-06 Thread Richard Greenwood
I'm having a problem with the rendering of one of my layers with 6.2.
It's probably not a bug but rather that I'm doing something wrong. My
map file:

SYMBOL
  NAME 'solid'
  TYPE ellipse
  POINTS 1 1 END
  FILLED true
END

LAYER
  .
  CLASS
NAME Zone X Shaded
EXPRESSION /^X, SHADED/
STYLE
  SYMBOL 'solid'
  COLOR 128 128 128
  GAP 1
END
  END
END

See the two attached images for the different renderings.
mapserv-6.0.gif is the desired rendering, mapserv-6.2.gif is the
rendering of the same map file with MapServer 6.2 beta2.

Any suggestions as to what I'm doing wrong?

Thanks,
Rich



On Wed, Aug 1, 2012 at 3:51 AM, thomas bonfort thomas.bonf...@gmail.com wrote:
 The MapServer Team is pleased to announce the release of MapServer
 6.2.0 beta2. This is the second beta on our way to a final 6.2 release,
 and contains several fixes that we encourage you to test. Our initially
 planned date of a release beginning of August has slipped a bit, the
 updated release plan that can be viewed at

https://github.com/mapserver/mapserver/wiki/MapServer-6.2-Release-Plan

 We however have only a few bugs left to resolve for our final release,
 so we hope this beta phase will be over in the next couple of weeks.

 The changelog since beta1 can be consulted here:


 http://www.mapserver.org/en/development/changelog/changelog-6-2-0-beta2.html

 The source for this release can be downloaded at:

http://mapserver.org/download.html
 or
http://download.osgeo.org/mapserver/mapserver-6.2.0-beta2.tar.gz

 The binary distributions listed in the download page should be updated
 with binaries for the new 6.2.0-beta2 release in the next couple of days.

 Once again we need your help to ensure a high quality product, so
 please help out by testing your applications with this new code base.

 Thanks! - The MapServer Team
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users



-- 
Richard Greenwood
richard.greenw...@gmail.com
www.greenwoodmap.com
attachment: mapserv-6.0.gifattachment: mapserv-6.2.gif___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer 6.2.0 beta2 release

2012-08-06 Thread Stephen Woodbridge
What does your OUTPUTFORMAT block(s) look like? are you using the 
sameone for both?


-Steve W

On 8/6/2012 11:06 PM, Richard Greenwood wrote:

I'm having a problem with the rendering of one of my layers with 6.2.
It's probably not a bug but rather that I'm doing something wrong. My
map file:

SYMBOL
   NAME 'solid'
   TYPE ellipse
   POINTS 1 1 END
   FILLED true
END

LAYER
   .
   CLASS
 NAME Zone X Shaded
 EXPRESSION /^X, SHADED/
 STYLE
   SYMBOL 'solid'
   COLOR 128 128 128
   GAP 1
 END
   END
END

See the two attached images for the different renderings.
mapserv-6.0.gif is the desired rendering, mapserv-6.2.gif is the
rendering of the same map file with MapServer 6.2 beta2.

Any suggestions as to what I'm doing wrong?

Thanks,
Rich



On Wed, Aug 1, 2012 at 3:51 AM, thomas bonfort thomas.bonf...@gmail.com wrote:

The MapServer Team is pleased to announce the release of MapServer
6.2.0 beta2. This is the second beta on our way to a final 6.2 release,
and contains several fixes that we encourage you to test. Our initially
planned date of a release beginning of August has slipped a bit, the
updated release plan that can be viewed at

https://github.com/mapserver/mapserver/wiki/MapServer-6.2-Release-Plan

We however have only a few bugs left to resolve for our final release,
so we hope this beta phase will be over in the next couple of weeks.

The changelog since beta1 can be consulted here:

http://www.mapserver.org/en/development/changelog/changelog-6-2-0-beta2.html

The source for this release can be downloaded at:

http://mapserver.org/download.html
or
http://download.osgeo.org/mapserver/mapserver-6.2.0-beta2.tar.gz

The binary distributions listed in the download page should be updated
with binaries for the new 6.2.0-beta2 release in the next couple of days.

Once again we need your help to ensure a high quality product, so
please help out by testing your applications with this new code base.

Thanks! - The MapServer Team
___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users