Skip to Content
Web Mapping Illustrated
book

Web Mapping Illustrated

by Tyler Mitchell
June 2005
Beginner to intermediate
372 pages
10h 1m
English
O'Reilly Media, Inc.
Content preview from Web Mapping Illustrated

Reference Map Files

This section includes the complete listing of map files (Examples 12-13 through 12-16) used in this chapter. Additions to the files are highlighted. Lines to be removed are commented out by the preceding # symbols.

Example 12-13. The global_mosaic WMS layer added to the global.map file

MAP
  SIZE 600 300
  EXTENT -180 -90 180 90
  IMAGECOLOR 180 180 250
 IMAGETYPE PNG24

  UNITS DD

  WEB
    TEMPLATE global.html
    IMAGEPATH "/srv/www/htdocs/tmp/"
    IMAGEURL "/tmp/"
  END

  LAYER
    NAME global_landsat
    TYPE RASTER
    STATUS DEFAULT
    CONNECTIONTYPE WMS
    CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?"
    MINSCALE 20000
    METADATA
      "wms_server_version" "1.1.1"
      "wms_srs" "EPSG:4326"
      "wms_format" "image/jpeg"
      "wms_styles" ""
      "wms_name" "modis,global_mosaic"
    END
  END
  
  LAYER
    NAME countries
    TYPE POLYGON
    STATUS DEFAULT
    DATA countries_simpl
    LABELITEM 'NAME'
    LABELMAXSCALE 50000000  
    CLASSITEM 'NAME'
    CLASS
      NAME 'Bulgaria'
      EXPRESSION 'Bulgaria'
      STYLE
        OUTLINECOLOR 100 100 100
#     
               COLOR 255 255 150
      END
      LABEL
        SIZE LARGE
      END
    END
    CLASS
      NAME 'All Countries'
      EXPRESSION ('[NAME]' ne 'Bulgaria')
      STYLE
        OUTLINECOLOR 100 100 100
#        
               COLOR 200 200 200
      END
    END
  END
END

Example 12-14. Enabling a map file to serve up a layer using WMS

MAP
  SIZE 600 300
  EXTENT -180 -90 180 90
  IMAGECOLOR 180 180 250

  IMAGETYPE PNG24
  UNITS DD

  WEB
    TEMPLATE global.html
    IMAGEPATH "/srv/www/htdocs/tmp/"
    IMAGEURL "/tmp/"
    METADATA
      "wms_title" "My Global Map WMS Server"
      "wms_srs" "EPSG:4326"
    END
  END

  LAYER
    NAME countries
    TYPE POLYGON
    STATUS ON
    DATA countries_simpl
    MINSCALE ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Design of Web APIs

The Design of Web APIs

Arnaud Lauret
PostGIS in Action, Second Edition

PostGIS in Action, Second Edition

Regina O. Obe, Leo S. Hsu

Publisher Resources

ISBN: 0596008651Errata Page