MapTools.org

[Chameleon] Print Widget Output and Query

bartvde@xs4all.nl bartvde@xs4all.nl
Fri, 16 Jan 2004 16:46:02 +0100 (CET)
Hi Rene,

the radius does not determine the tolerance for feature info, only how
points are visualized.

You can control this behaviour by setting the tolerance:

  TOLERANCE 3
  TOLERANCEUNITS PIXELS

Best regards,
Bart

> Paul and Bart,
>
> I tried what you suggested and everything worked. The only thing is
> that the query seems to be really finicky and will only pick up the
> polygons. The lines and points will not show their attributes in the
> query, even though I set the radius=100. This does not seem to work,
> even on the polygons. I have to be within it in order to pick it up. I
> know the documentation says that it may not be supported by all servers,
> but am I looking in the wrong place? Is this a tolerance issue?
>
> The print preview worked great, I tried looking for that section in the
> code yesterday but I seemed to have missed it. It would be great to have
> the legend located outside the map so clients can have the full map view
> without any obstructions when printing, but that's not as important as
> getting the basic functionality set up first.
>
> Just to make sure, the legend in the print preview is a bug?
> Legend Output:
>
> *Airphotos                   ->Group Name
>     Airphoto Centres     ->Class Name
> *Airphotos
>     Lake and Water Bodies
> *Airphotos
>     Rivers and Streams
> *Airphotos
>     100 Series Highway
>     Trunk Roads
>     Secondary Roads
>     Railway
> *Airphotos
>     Shoreline
> *Airphotos
>
> Thanks,
> Rene
>
>>>> Bart van den Eijnden <bartvde@xs4all.nl> 2004-01-15 4:19:03 PM >>>
> Hi Rene,
>
> to answer your first question.
>
> There is an option popup widgets have for this which you could use in
> the
> CWC2 tag of the Print widget (Menubar="false"), but I am not sure if
> this
> applies to popup windows emerging from the popup widget, like the
> preview
> print does.
>
> If this does not work you could hack the code:
> Look for the window.open function in production.pthml and add
> menubar=yes
> to the options argument of the function.
>
> For the Query widget to work your layers in the MAP file should have
> the
> following:
>
> DUMP TRUE
> STATUS ON
> template "blank.html"
>
> and for WMS layer not the following METADATA:
> wms_queriable "0"
>
> Hope this helps.
>
> Best regards,
> Bart
>
> 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
>



This archive was generated by Pipermail.