AW: [mapserver-users] mapxy + scale / buffer not work!
Stephen Lime
steve.lime at dnr.state.mn.us
Thu Sep 6 06:44:51 PDT 2001
It's [shpmidx] and [shpmidy] not [shape...], there's also an extra space before the ] in your getlayers substitution. My suggestion does hilite the selected object, that's what the second layer definition is for.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> "Michael Achtzehn" <M.Achtzehn at cui.de> 09/06/01 08:33 AM >>>
Hi Stephen,
Thank you for your hints - unfortunately it does not function yet correctly.
First: [shapemidx] and [shapemidy] dont't work - It appears the error message "getNumeric(): Incorrect data type" bat, if I the coordinates for mapxy directly into the URL enter-it work. What does one have to consider with the use of [shapemidx] and [shapemidy]?
Also "... mode=map[getlayers ] " functions not, if I define go it more layer manually how as described, it is a syntax error, or which is with the use of [getlayers] to consider?
With the described modifications it functions how describes but can I hilite the selected object also?
Thanks in advance
Michael
> -----Ursprüngliche Nachricht-----
> Von: Stephen Lime [mailto:steve.lime at dnr.state.mn.us]
> Gesendet am: Mittwoch, 5. September 2001 23:05
> An: M.Achtzehn at cui.de; mapserver-users at lists.gis.umn.edu
> Betreff: Re: [mapserver-users] mapxy + scale / buffer not work!
>
> Hi Michael: You're correct, this doesn't work on 3.4, but
> will in 3.5 (currently doesn't). It's not
> a technical issue rather one of priorities in getting things
> working. You can work around this
> by not using a query map but rather adding a second layer to
> use in displaying the query
> results. For this second layer you're going to modify the
> class expression dynamically to isolate
> the chosen record and draw it special. You do this within an
> <img...> tag that normally would
> be used to display the querymap. Here's how:
>
> - add a second layer to your mapfile, it should reference
> the same data as you want to
> query and define the class to draw the selected feature as
> you wish, the class item should
> be 'regnrba'. Don't define a class expression. Place this
> layer AFTER the main layer and
> set it's status to OFF.
>
> - drop the query map from your mapfile
>
> - add something like this to your template (assuming new
> layer is called foo)
>
> <img
> src="/cgi-bin/mapserv.exe?map=[mapfile]&layer=foo&mapxy=[shpmi
> dx]+[shpmidy]&buffer=xxxx&map_foo_class_expression=[REGNRBA]&m
ode=map[getlayers]">
>
> What that call does is creates a map:
>
> - centered on the shape
> - with an extent defined by the value of buffer (could also
> use scale)
> - preserves any layers that were already on using [getlayers]
> - turns on the new layer "foo"
> - sets the expression for the first CLASS in foo to be the
> value of the item REGNRBA
>
> What the value for map_foo_class_expression should be will
> depend on what valid values in REGNRBA is. If
> it's strictly a number then you have to enclose it in double
> quotes for mapserver to treat it correctly, just use
> map_foo_class_expression=%22[REGNRBA]%22 instead. You could
> also use other unique column values to
> isolate the record.
>
> Hope this helps.
>
> Steve
>
> Stephen Lime
> Internet Applications Analyst
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> "Michael Achtzehn" <M.Achtzehn at cui.de> 09/05/01 09:53AM >>>
> Hallo,
> An apparent old problem, for which I could not discover a
> solution in the Mailing.
> I would like to determine an object with one ID (here
> regnrba) ) from a data base to display.
> With ITEMQUERY mode and using MAPXY=SHAPE I would like to
> show the result on certain scale, but BUFFER or SCALE
> parameter does nothing.
> Where are the contents of the variable shapes defined - is '
> shapes " a variable or a keyword for the map server? Do I
> have to make 'shapes' special entries for the
>
> definition of in templete file?
>
> Where is the mistake - how can I solve my problem?
>
> (I work with mapserver 3.4 on Win NT.)
>
> my data:
>
> URL:
> http://ms_test.cui.de/cgi-bin/mapserv.exe?map=ms_demo/isab02.m
> ap&layer=lsa_tfb&mode=itemquery&item=regnrba&value=1105-41/15&
> mapxy=shapes;scale=50000
> ____________________
> www.cui.de
> Tel.: 0345 7742 749
> Fax.: 0345 7742 754
>
More information about the MapServer-users
mailing list