MapTools.org

[Chameleon] Print Widget Output and Query

Rene Teniere TENIERER@gov.ns.ca
Fri, 16 Jan 2004 09:10:15 -0400
Thanks Paul, I'll also give this a try in conjunction with what Bart has
suggested!

Rene

>>> pagameba@magma.ca 2004-01-15 4:40:17 PM >>>
Rene, answers in line.

Rene Teniere wrote:

> Hey,
> 
> Is there a way to have the file menu show up in the browser that
pops
> up when you print the map? I would like the user to be able to goto
> FILE->Page Setup... to adjust the print output and layout easily. 

in the widget tag for the PrintWidget, you can set the menu="true" 
attribute to get the file menu in the Map Production popup, but that 
doesn't affect the printer friendly view unfortunately.  I will see
what 
can be done about that, I think it should be possible to allow the 
settings that opened the Map Production page be passed on to the popup.

  Now that I think about it, though, I think that the file menu should

be on by default in the printer friendly preview :)

I can't add this change to CVS right now, but if you open 
production.phtml and find the line that opens the preview window (on 
line 316 in my copy)

         preview = window.open( "./preview.phtml?<?php echo 
SID."&selImageFormat=".$selImageFormat ?>",
                                   'preview',
 
'status=no,toolbar=yes,scrollbars=yes,resizable=yes,width=800,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');

the third line starts with status=no.  Edit this line to include 
menubar=yes at the beginning, as in:

'menubar=yes,status=no,toolbar=yes,scrollbars=yes,resizable=yes,width=800,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');


I will commit my change soon so you will be in sync with the latest 
version if you update.
Also,
> and I've noticed this on other chameleon sites, the legend in the
print
> output keeps repeating the same group name/layer name (goto:
> http://meadow.spatialfocus.com/cwc2/htdocs/nlr.phtml to see what I
> mean and print a test copy. Make sure scalebar is not checked, or
else
> it won't work).

ok, can you file a bug on this if there isn't already one in the 
chameleon bugzilla on maptools.org please.

> 
> Also, is there something special for the Query Widget to work? I
have
> it set up in the mapfile as well, however, it will not pick up any
> features. 

yes, you need to add a tag to any layers that you want to be queryable,

as in:

LAYER
  ...
  TEMPLATE "ttt.html"
END

the "ttt.html" can be anything, it doesn't really matter but MapServer

uses this value in CGI mode to display query results and it doesn't
make 
a difference between MapScript and CGI mode, so you have to set
TEMPLATE 
to something to make a query happen.  The QUERYMAP object is used to 
draw highlighted features after a query, since Chameleon doesn't redraw

the map after a query, this won't do anything.  It may be changed in a

future version, or become an attribute of the query widget.  But for
now 
it doesn't do anything.

> 
> <td>
> <cwc2 type="Query" visible="true"
> image="c:/chameleon11a/websites/test/images/button_query_1.png"
> imagehover="c:/chameleon11a/websites/test/images/button_query_2.png"
>
imageselected="c:/chameleon11a/websites/test/images/button_query_3.png"
> imagetip="Query Features" imagewidth="24" imageheight="24"
> popupwidth="490" popupheight="450" radius="1000"
maxfeatures="5"/></td>
> 
>   QUERYMAP
>     STATUS ON
>     SIZE -1 -1 
>     COLOR 255 255 0
>     STYLE HILITE
>   END
> 
> These are just a few nagging things to take care of for my chameleon
> template before I can move on.
> 
> Rene J.R. Teniere - BSc., D.GIS
> GIS Technician
> Nova Scotia Department of Natural Resources
> Forestry Division (GIS) - Truro
> 
> Phone: (902) 893-5655
> Mobile: (902) 209-8956
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon 
> 

Cheers,

Paul

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/| 
  -----------------------------------------------------------------



This archive was generated by Pipermail.