Ticket #2371 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Cannot populate Feature Points or colors using database values

Reported by: terraserver Owned by: sdlime
Priority: normal Milestone: 5.0 release
Component: MapServer CGI Version: 5.0
Severity: normal Keywords:
Cc:

Description

I am trying to dynamically produce a circle. This layer works fine:

LAYER

NAME "testlayer" STATUS DEFAULT DEBUG ON TYPE circle

FEATURE

POINTS

-78.61515 35.75584 -78.66222 35.78759

END

END

CLASS

NAME test COLOR 0 0 255 OUTLINECOLOR 0 0 0

END # CLASS

END # LAYER

However, when I try to dynamically populate the values I get these errors:

loadFeaturePoints(): Unknown identifier. Parsing error near (atrb_linestyle):(line 128)

OR

getSymbol(): Symbol definition error. Parsing error near (atrb_linecolor):(line 130)

With this layer

LAYER

NAME 'drawtest' STATUS DEFAULT DEBUG ON TYPE circle

CONNECTIONTYPE POSTGIS CONNECTION "dbname=project1 user=Admin password= host=localhost port=5432"

DATA "geom from (select geom, atrb_linestyle, atrb_linewidth, atrb_linecolor from ts_drawings_test where drawing_id = %drwl%) as myquery using unique geom using SRID=4269"

FEATURE

POINTS [atrb_linestyle] END

#POINTS -78.61515 35.75584 -78.66222 35.78759 END

END

CLASS

NAME test

COLOR [atrb_linecolor] #COLOR 255 255 0

OUTLINECOLOR 0 0 0

END # CLASS

END # LAYER

Change History

Changed 6 years ago by sdlime

  • status changed from new to closed
  • resolution set to invalid

What you are trying to do, or more importantly how you are trying to do it won't work. You don't need to use inline features if you have a datasource available to you. Have you tried turning your atrb_linstyle into a geometry object "on-the-fly" in PostGIS? That's the way to proceed. You need to create a line geometry the two points and render that with TYPE CIRCLE in MapServer.

The COLOR modification you're trying needs to happen in a style:

CLASS

NAME test STYLE

COLOR [atrb_linecolor] OUTLINECOLOR 0 0 0

END

END

Steve

BTW Marking the bug as invalid...

Note: See TracTickets for help on using tickets.