Mapscript extent prediction
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Wed May 23 15:45:16 PDT 2007
In Swig-based MapScript (perl, python, etc...) there is a method called "fit" that
can be used to adjust an extent to a particular image size. For example:
$rect = new mapscript::rectObj(50, 50, 100, 100);
$rect->fit(200,100);
I *think* PHP/MapScript should have the same support. This is all from memory so
I could be off a tad in the syntax.
The math behind "fit" is the same Tamas mentions in his follow ups, but in a nicer
package.
Steve
>>> Johan Van de Wauw <johan.vandewauw at GMAIL.COM> 05/23/07 9:08 AM >>>
Hello everyone,
When generating a map using mapscript, I notice that the extent changes
(slightly) after calling the "draw" operation.
I don't seem to be the only one with this problem as eg the ka-map wiki
says:
Print output is related to viewport but image extent correspondence in not
yet perfect.
Is there a way to make this correspondence better, or is there a way to
get/predict the actual extent used in the image before (or without) calling
the "draw" method?
Johan
More information about the MapServer-users
mailing list