[Mapserver-users] Help with simple(?) app

Hobbes Zatow hobbes_zatow at yahoo.com
Fri Aug 8 17:55:32 EDT 2003


Rich - Not sure I follow you on how to make the
changes.  Wouldn't the dimensions of each individual
state have to be specified?  Below is my current map
file in case it helps.  Thanks for any additional
info.

NAME USA
EXTENT -126 30 -66 44
SIZE 400 200
SHAPEPATH "/project/"

LAYER
        NAME counties
        DATA counties
        TYPE POLYGON
        STATUS DEFAULT
        CLASSITEM 'Aj'
        CLASS
                EXPRESSION ([Aj] > 95)
                COLOR 0 0 0
        END
        CLASS
                EXPRESSION ([Aj] > 90)
                COLOR 51 51 51
        END
        CLASS
                EXPRESSION ([Aj] > 75)
                COLOR 102 102 102
        END
        CLASS
                EXPRESSION ([Aj] > 50)
                COLOR 153 153 153
        END
        CLASS
                EXPRESSION ([Aj] > 25)
                COLOR 204 204 204
        END
END # end Layer

LAYER
        NAME states
        DATA states
        TYPE POLYGON
        STATUS DEFAULT
        CLASSITEM 'STATE_NAME'
        CLASS
               NAME "States"
               OUTLINECOLOR 0 0 0
        END
END

END # end of map file


--- Richard Greenwood <Rich at GreenwoodMap.com> wrote:
> At 09:47 AM 8/8/2003 -0700, you wrote:
> >I need to create a simple application that displays
> a
> >map of the US, then allows the user to click on a
> >state to get a zoomed-in view of just the one state
> >(without seeing bordering states).
> >
> >I am able to display the US map with mapserver/cgi
> >without a problem, but how do I:
> >
> >1. Display the zoomed-in state w/o bordering
> states?
> >
> >2. Program the "direct to state" zoom in
> capability?
> 
> Using just CGI I would use mode=itemquery. The map
> file should look 
> something like:
> 
> QUERYMAP
>          STATUS ON
>          STYLE SELECTED
> END
> 
> And make two layers:
> 
> Layer
>          NAME "STATE"    # displays only one state
>          TYPE  polygon
>          DATA states
>          STATUS default
> 
>          FILTERITEM ID
>          Filter "%ID%"
>          CLASS
>                  TEMPLATE mymap.html     # Use to
> display map
>                  OUTLINECOLOR 255 255 0  # Yellow
>                  SYMBOL 'solid' SIZE 6
>          END
> END
> 
> LAYER
>          NAME  "STATES"  # displays all states
>          STATUS ON
>          TYPE Polygon
>          DATA  "states"
>          CLASS
>                  TEMPLATE "mymap.html"   # Use to
> display attribute data
>                  SYMBOL "Solid"
>                  OUTLINECOLOR 0 0 0
>                  SIZE 2
>          END  # CLASS
> END
> 
> Both layers use same data.
> 
> Rich
> 
> 
> 
> Richard W. Greenwood, PLS
> Greenwood Mapping, Inc.
> Rich <at> GreenwoodMap <dot> com
> (307) 733-0203
> http://www.GreenwoodMap.com 
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the mapserver-users mailing list