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

Getting MapScript

How do you get MapScript? There are variety of methods, some easier than others. The common requirement for running MapScript is that the scripting language itself must be available. The header files for the language may also be required if building the MapScript modules from source code.

Building MapScript from Source Code

Building MapScript from source for each language isn't detailed here, but there is a common approach.

To build MapScript for a language, support for that language must have been configured and built into MapServer itself when it was compiled. This sets up the various files in the MapScript language folders that are needed for the next step.

The MapServer source code directory structure includes a folder called mapscript. This folder has subsequent folders for each language that has some form of MapScript support. The folder may have a Makefile that is ready to be used by the make command, or it may have some setup scripts. Running these produces MapScript modules or libraries (depending on the language), and the scripts can often be used to help install them too. For example, with Python, you build and then install MapScript by running:

> python setup.py build
> python setup.py install

There are several other files and directories that are part of the Simplified Wrapper and Interface Generator (SWIG) environment. SWIG is used to port MapScript to certain languages. This is now the standard method for producing a MapScript extension for additional ...

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.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg

Publisher Resources

ISBN: 0596008651Supplemental ContentErrata Page