[mapserver-users] RE: shpxy example

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Nov 30 09:24:34 EST 2010


Glad it worked! Documentation volunteers always are welcome. MapServer is big with lots of nooks and crannies so feel free to contribute, everybody...

Steve
________________________________________
From: Jackson, John [jxjackso at franklincountyohio.gov]
Sent: Monday, November 29, 2010 3:11 PM
To: Lime, Steve D (DNR); mapserver-users at lists.osgeo.org
Subject: RE: shpxy example

That makes perfect sense.

One thing I would like work on is improving mapserver’s documentation… (which I may try to write once I understand it more)… Not so much on specific pieces of syntax, but more on the thinking and theory of how to put use and combine multiple features together to put applications together.

Thanks again.

--John Jackson
--Deputy Auditor
--Franklin County Ohio

From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
Sent: Monday, November 29, 2010 4:02 PM
To: Jackson, John; mapserver-users at lists.osgeo.org
Subject: RE: shpxy example

Hi John: The ids variable is used to perform a runtime substitution. It’s not a MapServer specific variable, just something I used in that particular example. In the mapfile here’s the county layer:

  LAYER
    NAME county
    STATUS OFF
    DATA "data/bdry_counpy2_gen500"
    TYPE POLYGON
    CLASS
      EXPRESSION ('[COUN]' in '%ids%')
      STYLE
        COLOR "#BD9E5D" # "#A27528"
        OUTLINECOLOR 50 50 50
      END
    END
    CLASS
      COLOR 255 255 255
      OUTLINECOLOR 50 50 50
    END
    TEMPLATE "templates/county_example.html"
  END

The value for the CGI variable ids is substituted into the first class expression at runtime.  So, if ids=1,2,3,4,5 then the class expression becomes (’[COUN]’ in ‘1,2,3,4,5’). Ideally one should set a validation pattern for the ids variable to limit it’s possible values.

So, once the expression is changed if the attribute COUN is in the list of ids then we draw with the pukey brown, if not, then draw white. Does this help?

Steve



From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jackson, John
Sent: Friday, November 26, 2010 7:54 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] shpxy example

HI again all,

I’m working on a project where I’m trying to do the same thing as the shapexy example linked from http://mapserver.org/output/imagemaps.html

I’ve got an html imagemap working, and enough javascript together that it correctly concatenates a link, but the link doesn’t end up working…
The part I don’t understand how to get the map working in map mode. I’m not understanding the “ids” variable that is getting passed to mapserver. Are the id’s a field in the data set? I don’t see any documentation for it anywhere, and when I pass it, I just get my map back without anything selected.

Again, thanks in advance for your help.
Hope everyone had a wonderful thanksgiving.

--John Jackson
--Deputy Auditor
--Franklin County Ohio



More information about the mapserver-users mailing list