[mapserver-users] msQueryByPoint(): No matching record(s)

Daniel Morissette morissette at dmsolutions.ca
Mon Sep 3 10:19:28 EDT 2001


Sylvain,

In your "old" example, the second class will never be used since the
first class contains no expression and will catch all features.  (i.e.
no expression means catch all)

This is not a bug... it's the way it should work... MapServer stops at
the first class that matches a given feature and for this reason the
catch all class should always be last if you have one.  So in your case
since you seem to want both classes to catch all features then the
solution to the problem is what you did: merge them into a single class.

Daniel




Sylvain Pasche wrote:
> 
> About my version, I'm currently using the latest CVS version.
> 
> In fact, the problem seems to be solved when I put together the two
> class sections of the layer:
> 
> This is the old, not working version:
> 
> LAYER
>   NAME courses
>   TYPE POINT
>   STATUS ON
>   DATA courses
>   LabelItem "NOM"
>   LabelMaxscale 99999
>   LabelMinscale 10000
>   CLASS
>      SYMBOL 14
>      MAXSIZE 15
>      OUTLINECOLOR 255 0 0
>      COLOR 255 0 0
>       LABEL
>        TYPE bitmap
>         COLOR 255 0 0
>         BACKGROUNDCOLOR 255 220 220
>        POSITION AUTO
>      END
>   END
>   TOLERANCE 12
> 
>   HEADER "ID NOM ALTITUDE COORD_X COORD_Y"
>   CLASSITEM "ID"
>    CLASS
>      EXPRESSION /./
>      TEMPLATE "ttt"
>    END
> 
> END # Layer
> 
> And this is the new working version
> 
> LAYER
>   NAME courses
>   TYPE POINT
>   STATUS ON
>   DATA courses
>   LabelItem "NOM"
>   LabelMaxscale 99999
>   LabelMinscale 10000
> 
>   HEADER "ID NOM ALTITUDE COORD_X COORD_Y"
>   CLASSITEM "ID"
> 
>   CLASS
>      EXPRESSION /./
>      TEMPLATE "ttt"
> 
>      SYMBOL 14
>      MAXSIZE 15
>      OUTLINECOLOR 255 0 0
>      COLOR 255 0 0
>       LABEL
>        TYPE bitmap
>         COLOR 255 0 0
>         BACKGROUNDCOLOR 255 220 220
>        POSITION AUTO
>      END
>   END
>   TOLERANCE 12
> END # Layer
> 
> Is it wrong to use two different classes ? (Or is this a bug ?)
> 
>         Sylvain
> 
> -----Original Message-----
> From: "Stephen Lime" <steve.lime at dnr.state.mn.us>
> Date: Fri, 31 Aug 2001 09:15:38 -0500
> 
> How recent is your version? There have been changes made over that last
> 3 weeks that fix bugs releated to queries. My testing has things working
> very well now.
> 
> Steve
> 
> Stephen Lime
> Internet Applications Analyst
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the mapserver-users mailing list