[mapserver-users] 3.5 mapscript problem
imap at chesapeake.net
imap at chesapeake.net
Sat Sep 22 00:16:49 PDT 2001
Steve,
With regard to mapscript querys in 3.5
In one of your emails earlier in the year, you said that you need:
No. A layer is queryable if it is:
- ON, either explicitly via a form or has STATUS DEFAULT or QUERYONLY
and
- has a QUERY object with a TEMPLATE defined.
Seems like in my first mapfile definition:
> LAYER
> NAME ctyindex
> TYPE QUERY
> STATUS ON
> DATA "ctyindex"
> TEMPLATE dummy
> END
is missing the
QUERY
TEMPLATE dummy
END
and 3.5 errors out when this is included in the layer.
When it is removed, the query does not work and yeilds
"No matching record(s) found." Likewise, in 3.3, removing
those same lines produces the same error, so I suspect
the layer has no QUERY object. Anyway I got my 3.3 and
3.5 mapscript co-existing, and the 3.3 query scripts seems
to be working OK.
I also tried changing the mapfile as you suggest with
TYPE LINE, but that didn't have any effect.
If I set STATUS QUERYONLY in the mapfile, 3.5 gives me
getSymbol(): Symbol definition error. (QUERYONLY):(11)
Looking at the docs, specifically the 3.5 Mapfile reference,
the Query Object section is gone. I am just trying to
figure out what is going on with QUERY.
Regards,
Chris Stuber (mapsurfer)
Silicon Mapping Solutions, Inc
(410)257-3187
Stephen Lime wrote:
>
> Your first layer def is fine, I may have screwed up and am not recognizing
> "TYPE QUERY" properly. In your case the TYPE is irrelevant since queries
> operate on the real type of the data rather than the display type. Try setting
> TYPE to LINE and see if that works.
>
> Steve
>
> Stephen Lime
> Internet Applications Analyst
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> <imap at chesapeake.net> 09/21/01 01:54AM >>>
>
> with LAYER, needs a QUERY object/directive and a TEMPLATE
> for the query to succeed, otherwise nothing is found.
> It current looks like this:
>
> LAYER
> NAME ctyindex
> TYPE QUERY
> STATUS ON
> DATA "ctyindex"
> TEMPLATE dummy
> END
>
> gives me nothing back:
>
> Fri Sep 21 02:32:36 2001 - msQueryByRect(): Search returned no results. No
> matching record(s) found.
>
> If I embed a QUERY object in the layer:
>
> LAYER
> NAME ctyindex
> TYPE QUERY
> STATUS ON
> DATA "ctyindex"
> QUERY
> TEMPLATE dummy
> END
> END
>
> 3.5 complains with
>
> Fri Sep 21 02:48:29 2001 - loadLayer(): Unknown identifier. (QUERY):(13)
>
> There may be a fix in the mapfile that I am not aware of... , If it smells
> like a bug let me know and I will post to bugzilla.
>
> Regards,
>
> Chris
More information about the MapServer-users
mailing list