Loading...
 

Working with Views

Please read the documentation of the Mapserver and read the Maps Mapfile Tutorial if you need to learn the basics of a Mapfile.

Creating Views

Specifing the View

The VIEW must be used as VIEW1,VIEW2,VIEW(n)...VIEW30. Followed by a location id/location name and the extents in double qoutes.

VIEW1 "location id,  "
VIEW2 "location id,  "
VIEW3 "location id,  "
...
...
VIEW30 "location id,  "

Set View Extents

Get the map extents for the view you want to display and set the minx, miny, maxx, maxy values inside the double qoutes " " separated by coma ','.

VIEW1 "location id,minx,miny,maxx,maxy"

Adding in the Views

A Mapfile contains a WEB object. Inside the WEB object the METADATA keyword can be used to store your views and close it with an END. You can have up to a maximum of 30 views.

#
# Start of web interface definition
#
WEB
  ...
  ....
  .....
  METADATA
    VIEW1 "location id,minx,miny,maxx,maxy"
    VIEW2 "location id,minx,miny,maxx,maxy"
    VIEW3 "location id,minx,miny,maxx,maxy"
    ....
    ...
    VIEW30 "location id,minx,miny,maxx,maxy"
  END
  ....
  ...
  
END


List Slides