[mapserver-users] mapserver(ms4w) map script mode

ankur chitranshi ankuriimt at gmail.com
Wed May 18 21:44:17 PDT 2016


Actually we required a map should be displayed at scale of  1:4000 ration .




thanks in advanced



On Thu, May 19, 2016 at 4:05 AM, Jeff McKenna <jmckenna at gatewaygeomatics.com
> wrote:

> Hi Ankur,
>
> To be honest I don't fully understand your question.  Are you referring to
> the "DEFRESOLUTION" parameter in the MAP object of the mapfile?
>
> If you are referring to how to set a user defined scale for a layer (the
> "MAXSCALEDENOM" parameter), I always use MapServer in CGI mode to get this
> value.  I've added a (old) CGI viewer to download for MS4W users (
> http://www.ms4w.com/release/apps/cgi-viewer-ms4w.zip) - extract that to
> your MS4W root and restart Apache.  For new MS4W users installing through
> the setup installer, the mapfile and all paths will be automatically
> updated.  This simple CGI viewer will display MapServer's scale value as
> you zoom in; here is what it looks like: http://pasteboard.co/11y5aJzt.png
> It's not fancy but I actually still use it everyday!
>
> Here is how to set that in PHP mapscript:
>
>   $oMap = ms_newMapObj( "path/to/mapfile.map");
>   $oLayer = $oMap->getLayerByName("mylayer");
>   $oLayer->set("maxscaledenom", 1000000);
>   $oMap->save("path/to/mapfile.map");
>
> -jeff
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
>
> On 2016-05-18 8:10 AM, ankur chitranshi wrote:
>
>> hello all,
>>
>>  can any body help me out in how touser-define map scale manually in
>> mapserver(ms4w) map script mode
>>
>> --
>> thanks & regards
>> Ankur Chitranshi
>>
>>
>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
thanks & regards
Ankur Chitranshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160519/b5ba6f4e/attachment.html>


More information about the mapserver-users mailing list