Map fails to display in interactive mode (&mode=browse). Help!

Jeff McKenna jmckenna at DMSOLUTIONS.CA
Thu Oct 18 14:40:55 EDT 2007


Since you are an MS4W user you can download the "MapServer Itasca Demo 
Application" MS4W package, which is a CGI demo already configured, and 
follow what it does 
(http://www.maptools.org/ms4w/index.phtml?page=downloads.html).


kreshna_iceheart at yahoo.com wrote:
> So I'm experimenting with MapServer on my notebook
> with Windows XP SP2, Apache 2.0.54, and MapServer for
> Windows (MS4W) 1.2.2.
> 
> My file placement scheme is fairly complex, because I
> put map-related files (.MAP, .SHP, etc) and HTML files
> on different folders. Here's the folders where I put
> map-related files:
> C:\mapfiles\mapfile\
> C:\mapfiles\shp\
> C:\mapfiles\font\
> C:\mapfiles\simbol\
> 
> And here's the folders where I put HTML templates and
> TEMP files:
> C:\ms4w\Apache\htdocs\html\
> C:\ms4w\Apache\htdocs\temp\
> C:\ms4w\Apache\cgi-bin\ -=> where mapserv.exe
>  resides
> 
> 
> I do not use absolute folder hierarchy in my URL
> references, though. Instead, I use relative folder
> hierarchy. For example, here's how I write the URL on
> my browser, to call a map file from the folder where
> mapserv.exe resides (traversing from
> C:\ms4w\Apache\cgi-bin\to C:\mapfiles\mapfile\):
> http://localhost/cgi-bin/mapserv.exe?map=../../../mapfiles/mapfile/map01.map&layers=All&mode=map
> 
> 
> And
>  here's how I specify the SHP folders from my map
> files.
>   SHAPEPATH "../shp"
>   FONTSET "../font/font.dat"
>   SYMBOLSET "../simbol/simbol.sym"
>   IMAGECOLOR 210 233 255  # biru muda
> 
>   WEB
>      TEMPLATE
> '../../ms4w/Apache/htdocs/html/map01_tmp1.html'
>      IMAGEPATH '../../ms4w/Apache/htdocs/temp/'
>      IMAGEURL '../../ms4w/Apache/htdocs/temp/'
> 
> 
> So as you see above, I use relative folder hierarchy
> to specify those folders (IMO it's a good practice in
> linux environment).
> 
> 
> So far, I have created various map files and I haven't
> had any problems displaying maps (SHP layers) in
> static mode (&mode=map).
> 
> 
> Then I tried to use interactive 
> mode (&mode=browse). I have created a map file for
> that purpose, and I have made the necessary HTML
> template file and the HTML legends file. I attached
> those files with this mail:
> - map file: map01.map
> - HTML template: map01_tmp1.html
> - HTML legends: map01_leg.html
> 
> First, I tested my map file in static mode, and the
> maps are displayed correctly without problems.
> However, when I try to call the map file in browse
> mode, the map just failed to display. All I got is
> just red "X" where the map should be displayed.
> 
> (I cannot attach the screenshots because they're
> larger than 80k)
> 
> I have confirmed that it is not the problem with my
> browser; I have tried another browser (Opera) and the
> problem stays. Besides, non-MapServer web pages (like
> Google, etc) display pictures with no problem.
> 
> And when I checked the TEMP folder
> (C:\ms4w\Apache\htdocs\temp\), MapServer actually
> CREATED all those temporary GIF files whenever I open
> the map file using browser mode. In fact, when I view
> the resulting HTML codes from my browser, the page
> DOES refer to the temporary .GIF files being created
> by MapServer. I attached the resulting HTML code as
> well (03_the_resulting_html_code.txt).
> 
> Alas, the page just does not display those temporary
> .GIF files --it just displays all the red "X" marks.
> 
> So what's wrong here? Is it the fault of my browser?
> But I have tried other browser and the problem stays. 
> 
> Or maybe because my complex folder scheme? Probably
> because I use relative folder hierarcy to call the
> necessary files? But all map files I have created have
> no problems at all displaying the maps in static mode.
> 
> Or maybe there's a component I forgot to install?
> 
> Help!
> -Kresh
> 
> 
> 
> __________________________________________________________________
> So be it. If saying "NO" means being alone, then to hell with love, with women, with marriage, with God, religions, bars, nightclubs, computer games, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> ------------------------------------------------------------------------
> 
> 
>   *Peta Interaktif*
> 
>   
>   
> 
> *Skala*
> Skala batang 	*Tampilan Peta*
> Pilih Tampilan:
> < br> *Legenda*
> ------------------------------------------------------------------------
> [legend]
> ------------------------------------------------------------------------
> 
> 
>   
> ------------------------------------------------------------------------
> 
> [leg_layer_html visibility_flag=15]
>   
> *[leg_layer_name]*
> 
> [leg_class_html_visibility_flag=15]
>    [leg_class_name]
> 
> [/leg_class_html]
> 


-- 
Jeff McKenna
DM Solutions Group Inc.
http://www.dmsolutions.ca



More information about the mapserver-users mailing list