Chapter 14. Custom Programming with MapServer's MapScript
If you have programming experience, you may want to do more to customize MapServer, incorporating MapServer capabilities directly into a custom application. Enter MapScript, an application program interface for MapServer.
Introducing MapScript
MapScript exposes the functionality of MapServer to various scripting languages. This reduces programming time for developers who want to add mapping capabilities to an application. Rather than create a custom method for mapping, the MapScript API provides some powerful tools that are robust and ready to use. It also provides a convenient way to interact with mapping data while still using your favorite programming language.
MapScript allows you to load, manipulate, and create map files. For example, you can change layer settings, manipulate map file classes, produce output images, export spatial data, and much more. Because it uses common scripting environments, MapScript functions can be combined with other functions of that language.
Several languages have MapScript support; PHP, Python, Perl, Java and Ruby are readily available. C# and TCL support are under development as well, and these are also included in the MapServer source code tree.
Get Web Mapping Illustrated now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.