Saturday 28 April 2018

mapserver - My WMS Server returna a template without image instead of map's image


I have a server on localhost (using apache and mapserver in windows). I want to create a wrapper and do it using this document : http://mapserver.org/cgi/wrapper.html - Apache ReWrite rules (using Apache mod_rewrite)



I create a .htaccess file and write this code:


RewriteEngine on
RewriteRule map?(.*) cgi-bin/mapserv.exe?map=C:\\OSGeo4W\\apache\\htdocs\\rasht\\RashtMap.map&$1

My WMS Server load with this address correctly and return an image of map:


http://localhost/cgi-bin/mapserv.exe?map=C:\OSGeo4W\apache\htdocs\rasht\RashtMap.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=Base,Street&STYLES=&CRS=EPSG:32639&BBOX=373204.15,4128154.94,377063.25,4131409.17&WIDTH=800&HEIGHT=500&FORMAT=image/png

But with wrapper address only load my template without any image.I want a response like previous address. I type this address as wrapper address :


http://localhost/map?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=Base,Street&STYLES=&CRS=EPSG:32639&BBOX=373204.15,4128154.94,377063.25,4131409.17&WIDTH=800&HEIGHT=500&FORMAT=image/png


What is wrong?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...