[mapserver-users] Re: Print template and WMS

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Oct 22 16:35:11 EDT 2009


The layers tag takes space separated layer names but since you have a space in your
WMS layer name (BLM Claim Names) it's not getting turned on. I don't recommend using
spaces or special characters in layer names for just this reason. If you change the
name to something like BLM_Claim_Names everywhere then I bet things start working...

Steve

>>> On 10/22/2009 at 3:01 PM, in message
<731ed3bb0910221301j2d32dd76i3bfc361422f8ffd3 at mail.gmail.com>, Ruby
<minerdiggins at gmail.com> wrote:
> Wow I'd missed the esc in the documentation! Thanks for the tip Steve.
> Unfortunatly that failed to invoke the WMS layer.
> Here is the returned URL:
> 
> http:/localhost:8888/cgi-bin/mapserv?map=/Applications/MAMP/d/DATA/custom.map&
> mapext=-112.609423+33.893223+-112.575663+33.918463&layers=BLM+Claim+Names+Washes
> +Roads&map_web=TEMPLATE+pgs/print.html&mapsize=1500+1182
> 
> Here is ms_error.txt for the above:
> 
> [Thu Oct 22 12:40:30 2009].462769 msDrawRasterLayerLow(Dem): entering.
> [Thu Oct 22 12:40:33 2009].204991 msDrawMap(): Layer 1 (Dem), 2.743s
> [Thu Oct 22 12:40:33 2009].250825 msDrawMap(): Layer 12 (Washes), 0.046s
> [Thu Oct 22 12:40:33 2009].273305 msDrawMap(): Layer 25 (roads1), 0.022s
> [Thu Oct 22 12:40:33 2009].331504 msDrawMap(): Layer 26 (Roads), 0.058s
> [Thu Oct 22 12:40:33 2009].331789 msDrawMap(): Layer 31 (mtrq), 0.000s
> [Thu Oct 22 12:40:33 2009].331833 msDrawMap(): Layer 32 (elfeet), 0.000s
> [Thu Oct 22 12:40:33 2009].331911 msDrawMap(): Layer 33 (copyright), 0.000s
> [Thu Oct 22 12:40:33 2009].332068 msDrawMap(): Layer 34 (compass), 0.000s
> [Thu Oct 22 12:40:34 2009].5448 msDrawMap(): Drawing Label Cache, 0.673s
> [Thu Oct 22 12:40:34 2009].5598 msDrawMap() total time: 3.668s
> [Thu Oct 22 12:40:36 2009].749263 msSaveImage() total time: 2.744s
> [Thu Oct 22 12:40:37 2009].37001 msSaveImage() total time: 0.095s
> [Thu Oct 22 12:40:37 2009].123848 mapserv request processing time (loadmap
> not incl.): 6.791s
> [Thu Oct 22 12:40:37 2009].124004 msFreeMap(): freeing map at 0x6004c00.
> 
> And ms_error.txt for the render on the main map page:
> 
> [Thu Oct 22 12:40:20 2009].407990 msDrawRasterLayerLow(Dem): entering.
> [Thu Oct 22 12:40:21 2009].391734 msDrawMap(): Layer 1 (Dem), 0.984s
> [Thu Oct 22 12:40:21 2009].520934 msDrawMap(): Layer 12 (Washes), 0.129s
> [Thu Oct 22 12:40:21 2009].536142 msDrawMap(): Layer 25 (roads1), 0.015s
> [Thu Oct 22 12:40:21 2009].571742 msDrawMap(): Layer 26 (Roads), 0.035s
> [Thu Oct 22 12:40:21 2009].572047 msDrawMap(): Layer 31 (mtrq), 0.000s
> [Thu Oct 22 12:40:21 2009].572093 msDrawMap(): Layer 32 (elfeet), 0.000s
> [Thu Oct 22 12:40:21 2009].572169 msDrawMap(): Layer 33 (copyright), 0.000s
> [Thu Oct 22 12:40:21 2009].572337 msDrawMap(): Layer 34 (compass), 0.000s
> [Thu Oct 22 12:40:21 2009].952978 msDrawMap(): Drawing Label Cache, 0.381s
> [Thu Oct 22 12:40:22 2009].26008 msDrawRasterLayerLow(BLM Claim Names):
> entering.
> [Thu Oct 22 12:40:22 2009].30731 msResampleGDALToMap in effect: cellsize =
> 0.000035
> [Thu Oct 22 12:40:22 2009].91613 msDrawGDAL(BLM Claim Names): using
> RAW_WINDOW=0 0 952 712
> [Thu Oct 22 12:40:22 2009].314730 msDrawMap(): Layer 24 (BLM Claim Names),
> 0.362s
> [Thu Oct 22 12:40:22 2009].314869 msDrawMap() total time: 2.817s
> [Thu Oct 22 12:40:23 2009].338078 msSaveImage() total time: 1.023s
> [Thu Oct 22 12:40:23 2009].469088 msSaveImage() total time: 0.120s
> [Thu Oct 22 12:40:24 2009].92737 mapserv request processing time (loadmap
> not incl.): 4.596s
> [Thu Oct 22 12:40:24 2009].92822 msFreeMap(): freeing map at 0x6004c00.
> 
> As you can see mapserver didn't even request a connection to the WMS layer
> when print.html map was rendered.
> 
> Do you think I might be having problems with the spaces in the layer name?
> 
> Thanks for the information Stevebean
> 
> 
> On Thu, Oct 22, 2009 at 11:51 AM, Steve Lime <Steve.Lime at dnr.state.mn.us>
>  wrote:
> 
>> What does a processed URL look like? That is, after MapServer has done the
>> various substitutions.
>>
>> Typically when using MapServer tags in a URL context you should be using
>> the escaped versions so
>> that spaces and other characters are properly represented. For example:
>>
>>
>>  
> http:/localhost:8888/cgi-bin/mapserv?map=[map]&mapext=[mapext_esc]&layers=[laye
> rs_esc]&map_web=TEMPLATE+pgs/print.html&mapsize=1500+1182
>>
>> Does that make a difference?
>>
>> Steve
>>
>> >>> On 10/22/2009 at 1:42 PM, in message
>> <731ed3bb0910221142g66ac67cavb1dff1eaa828b054 at mail.gmail.com>, Ruby
>> <minerdiggins at gmail.com> wrote:
>> > Thanks for your reply Steve,
>> > I am unsure how I could share the app. I cannot host from my ISP and the
>> > data approaches 5 GB.
>> > I am using mapserver 5.2 on MacOsx 10.4.1 and ms4w 5.2 on WindowsXP
>> ProSP3.
>> > The app is plain vanilla- no python, mapscript, java, or third party
>> > interfaces. Just straight html without frames, even the legend is html on
>> > the map page. The few lines of javascript I use are not app related, just
>> > invoking windows, sizing, calling a local app for gps download and the
>> > button to this one url for print.html. All files are local to the server
>> > except this one WMS layer.
>> >
>> > I develop on the Mac and port to the Windows machine, The Windows machine
>> is
>> > not connected to the WAN. I test on both machines. I set up a dummy dns
>> on
>> > the LAN and ms4w on the Windows machine does try to connect when invoked
>> > from the main window but makes not attempt for print.html, the same
>> behavior
>> > observed on the Mac version with a real WAN connection.
>> >
>> > The WMS layer loads fine in several different map templates I've built.
>> It
>> > is only when the URL
>> >
>> >
>> http:/localhost:8888/cgi-bin/mapserv?map=[map]&mapext=[mapext]&layers=[layers]&m
>> > ap_web=TEMPLATE+pgs/print.html&mapsize=1500+1182
>> >
>> > is called that mapserver does not attempt to connect the WMS layer. I
>> > suspect something is missing in the above URL.
>> >
>> > Thank you again,
>> > bean
>> >
>> >
>> >
>>


More information about the mapserver-users mailing list