Odd query result
Eduardo Zenaide
ezenaide at GMAIL.COM
Mon Sep 10 21:03:19 PDT 2007
thanks Oscar. i'll try it as soon as i get to work.
about query code, i'm using GMap code.
2007/9/10, Oscar ^_^ <oscarfbh at gmail.com>:
>
> Hello again Eduardo.
>
> I can see You use for every class a template so that mean for every shape
> that has values for each class it returns this values.
>
> I think You must use just a main template because You call the same
> template for every class so when shape has values for 2 fields (I think must
> be unique for use a class for every shape but maybe u've got more than one
> value for each shape) Mapserver returns this values for your query.
>
> Try something like this:
>
> LAYER
> NAME Solos_AL
> METADATA
> "DESCRIPTION" "Solos"
> "RESULT_FIELDS" "Leg_solos"
> "RESULT_HEADERS" "Código"
> END
> LABELITEM "Leg_solos"
> LABELCACHE ON
> TYPE POLYGON
> STATUS OFF
> DATA Solos_AL
> CLASSITEM "Leg_solos"
> TOLERANCE 0 #<-- I think you must put at least value 1
> TOLERANCEUNITS pixels
> TEMPLATE "templates/template_solos.html" #<-- This is what I mean
> CLASS
> NAME "PA"
> EXPRESSION "PA"
> STYLE
> COLOR 253 241 240
> OUTLINECOLOR 0 0 0
> END
> LABEL
> FONT sans
> TYPE TRUETYPE
> PARTIALS TRUE
> SIZE 7
> OUTLINECOLOR 255 255 255
> END
> END
> CLASS
> NAME "PVA"
> EXPRESSION "PVA"
> STYLE
> COLOR 249 210 205
> OUTLINECOLOR 0 0 0
> END
> LABEL
> FONT sans
> TYPE TRUETYPE
> PARTIALS TRUE
> SIZE 7
> OUTLINECOLOR 255 255 255
> END
> END
> CLASS
> NAME "RL"
> EXPRESSION "RL"
> STYLE
> COLOR 150 149 149
> OUTLINECOLOR 0 0 0
> END
> LABEL
> FONT sans
> TYPE TRUETYPE
> PARTIALS TRUE
> SIZE 7
> OUTLINECOLOR 255 255 255
> END
> END
> .
> .
> .
> END #Layer
>
> What about your code for query? it works fine? You can try debug your code
> too.
>
> Hope it be helpful for You.
>
>
> Oscar.
>
>
> 2007/9/10, Eduardo Zenaide <ezenaide at gmail.com>:
> >
> > hi Oscar!
> >
> > i'm using php/mapscript
> >
> >
> > 2007/9/3, Oscar ^_^ <oscarfbh at gmail.com>:
> > >
> > > Can You give more information about what are u doing?
> > >
> > > Are you using mapscript or CGI or what?
> > >
> > >
> > >
> > >
> > > 2007/9/1, Eduardo Zenaide <ezenaide at gmail.com>:
> > > >
> > > > nobody? :(
> > > >
> > > > 2007/8/24, Eduardo Zenaide <ezenaide at gmail.com>:
> > > > >
> > > > > hi all,
> > > > >
> > > > > i'm experiencing something odd here.
> > > > > i have a soil layer with some IDs. its dbf is something like:
> > > > >
> > > > > leg_solos
> > > > >
> > > > > PVA
> > > > > PA
> > > > > RL
> > > > > SX
> > > > > RL
> > > > > RY
> > > > > RR
> > > > > ...
> > > > >
> > > > > when i do the query, using ROSA i click in a RL polygon. it
> > > > > returns:
> > > > >
> > > > > SX
> > > > > RR
> > > > > RL
> > > > > PA
> > > > > PA
> > > > > PVA
> > > > > PVA
> > > > > RY
> > > > > RY
> > > > >
> > > > > any other polygon returns same results - only changes the one in
> > > > > query and, sometimes, PAs appear above. like:
> > > > >
> > > > > SX
> > > > > RR
> > > > > PA
> > > > > PA
> > > > > SX
> > > > > PVA
> > > > > PVA
> > > > > RY
> > > > > RY
> > > > >
> > > > > (when querying SX polygon)
> > > > >
> > > > > here a visual example: http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg
> > > > >
> > > > >
> > > > > my map file (its really big, so i'm just sending relevant layer
> > > > > and classes):
> > > > >
> > > > > LAYER
> > > > > NAME Solos_AL
> > > > > METADATA
> > > > > "DESCRIPTION" "Solos"
> > > > > "RESULT_FIELDS" "Leg_solos"
> > > > > "RESULT_HEADERS" "Código"
> > > > > END
> > > > > LABELITEM "Leg_solos"
> > > > > LABELCACHE ON
> > > > > TYPE POLYGON
> > > > > STATUS OFF
> > > > > DATA Solos_AL
> > > > > CLASSITEM "Leg_solos"
> > > > > TOLERANCE 0
> > > > > TOLERANCEUNITS pixels
> > > > > CLASS
> > > > > NAME "PA"
> > > > > EXPRESSION "PA"
> > > > > STYLE
> > > > > COLOR 253 241 240
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > CLASS
> > > > > NAME "PVA"
> > > > > EXPRESSION "PVA"
> > > > > STYLE
> > > > > COLOR 249 210 205
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > CLASS
> > > > > NAME "RL"
> > > > > EXPRESSION "RL"
> > > > > STYLE
> > > > > COLOR 150 149 149
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > CLASS
> > > > > NAME "RY"
> > > > > EXPRESSION "RY"
> > > > > STYLE
> > > > > COLOR 238 235 220
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > CLASS
> > > > > NAME "RR"
> > > > > EXPRESSION "RR"
> > > > > STYLE
> > > > > COLOR 207 206 206
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > CLASS
> > > > > NAME "SX"
> > > > > EXPRESSION "SX"
> > > > > STYLE
> > > > > COLOR 181 214 174
> > > > > OUTLINECOLOR 0 0 0
> > > > > END
> > > > > LABEL
> > > > > FONT sans
> > > > > TYPE TRUETYPE
> > > > > PARTIALS TRUE
> > > > > SIZE 7
> > > > > OUTLINECOLOR 255 255 255
> > > > > END
> > > > > TEMPLATE "templates/template_solos.html"
> > > > > END
> > > > > END # layer Solos_final_dd
> > > > >
> > > > > ########################
> > > > >
> > > > > any thoughts?
> > > > >
> > > > > thanks :)
> > > > >
> > > > >
> > > > > --
> > > > > Eduardo Zenaide
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Eduardo Zenaide
> > >
> > >
> > >
> > >
> > > --
> > > Oscar ^_
> >
> >
> >
> >
> > --
> > Eduardo Zenaide
>
>
>
>
> --
> Oscar ^_
--
Eduardo Zenaide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070911/b8b0d62c/attachment.htm>
More information about the MapServer-users
mailing list