[mapserver-dev] New MapScript API Docs

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Sep 16 02:32:30 PDT 2019


It's actually the main reason why I moved the entire MS4W community on 
Windows (who hugely rely on the MapScripts: PHP/Python/Charp) to use 
SWIG MapScript - so we can more easily maintain one set of MapScript 
documents.  I saw that as the best way to move forward, for the few 
document volunteers to easily maintain MapScript docs (not a separate 
PHP document).   There have been some growing pains for this, but I'm 
very glad this happened.

-jeff



On 2019-09-15 4:20 PM, Seth G wrote:
> Howard - thanks for the encouragement for the docs. I guess if MapScript 
> is to be kept alive it may as well have up-to-date docs!
> I'm aware of the killing MapScript movement, and avoiding MapScript was 
> the entire reason behind my writing the mappyfile library [1]. Sean 
> Gillies who I believe was the last person to undertake significant 
> MapScript changes finished up by writing the blog post "Stop Using 
> MapScript"!
> 
> On the other hand MapScript has proved useful to many people and all 
> with little to no maintenance for the last 15 years, and SWIG is 
> fortunately still being maintained with a new v4 release a few months ago.
> 
> I've come to appreciate MapScript most in the following cases:
> 
> - allowing high quality cartographic output as part of Python workflows, 
> mainly using the `draw` functions in MapScript
> - as a second testing method for MapServer along with msautotest (via 
> the Python test suite which now has > 300 tests)
> - allowing reuse of MapServer functions directly in a scripting language 
> without having to jump out into the command line (legend generation, 
> scalebars, querying and reusing connection configurations etc.).
> 
> For Mapfile manipulation though I'd agree MapScript is far less useful 
> than string templating and `fromstring` functions in the host language.
> 
> Just to note - we have Andy to thank for setting up Perl MapScript tests 
> earlier this year - https://github.com/mapserver/mapserver/pull/5778
> Andy - if you have any interest in setting up some more Perl typemaps or 
> starting a Perl MapScript specific docs page let me know,
> 
> Seth
> 
> [1] https://mappyfile.readthedocs.io/
> [2] https://sgillies.net/2006/11/29/stop-using-mapscript.html
> 
> --
> web:http://geographika.co.uk
> twitter: @geographika
> 
> 
> On Sun, Sep 15, 2019, at 4:22 PM, Howard Butler wrote:
>>
>>     Why do you want to kill MapScript?  I have poured everything into
>>     mapscript.
>>
>>
>> To kill MapScript is a running haha-but-serious joke I've had going 
>> for a long time with some of the MapServer developers. My case to do 
>> so is that MapScript has never been on par with mapfile and the 
>> mapfile definition for specifying objects and their relationships. 
>> Object lifetimes and their relationships were historically indefinite 
>> and sometimes inconsistent in MapScript. Additionally, any backwards 
>> compatibility considerations are often accommodated in mapfile, but 
>> were not addressed consistently in MapScript.
>>
>> In my opinion, language-specific implementations were better off to 
>> use their own templating facilities and use the msLoad*FromString 
>> capability. This recognizes that mapfile is the definition of how 
>> MapServer renders images, it has validation of the object 
>> relationships, and the project does its best to protect mapfile 
>> compatibility as new versions are released.
>>
>> Seth has done a ton of work on MapScript to fix all that and made 
>> MapScript better than it ever was. All of his work means it will 
>> probably never die :)
>>
>> Howard


More information about the mapserver-dev mailing list