|
||||
[Chameleon] legend for non-WMS sourcesPaul Spencer spencer@dmsolutions.caWed, 17 Dec 2003 22:55:08 -0500
|
Jacob, regarding legends and WMS, this is a known issue in mapserver that will likely get resolved for the next MapServer release as part of the work we are doing now on SLD support. Using contexts will only exaggerate this issue since it is entirely WMS based. As you are using Chameleon 1.1/2.0, using a mapfile is actually the only way that you can get the legend to work properly. Um. It now occurs to me that I don't know what exactly your problem is. It is possible to produce useable legends in both CWC2 (Chameleon 1.0) and Chameleon 1.1. In Chameleon 1.1 you should be using the LegendTemplate widget. This widget uses MapServer legend templates (see http://mapserver.gis.umn.edu/doc40/html-legend-howto.html) which are very flexible and allow you to build an astonishing range of legends. The LegendTemplate widget does allow you to control layer visibility too. You need to use a specific name for your per-layer checkboxes (legendlayername[] I think, check the legend_template_widget.html in the chameleon/htdocs directory for an example). If you are currently getting a legend, but cannot get class or layer images, that is simply a matter of setting up the template correctly (which I would encourage you to use the mapserver users list for support). If you cannot get any legend at all using the LegendTemplate widget, let me know what it is you are trying to do, including sending the widget tag you are using and the legend template file. Please file a bug in the Chameleon bugzilla regarding the production widget. But check first to see if it has already been reported. Cheers, Paul J. Delfos wrote: > Hi All, > > I'm having some difficulties getting the legend in Chameleon to work. It's > probably because I'm getting my data from a mapserver mapfile, in stead of > through WMS. The reason I use a mapfile, is because my data consists of > shapefiles. Can anyone tell me what would be the best way to access > shapefiles from Chameleon? Can it be done through the context, and if so, > will this make the legend work properly? It does pick up the metadata in > the layer manager.... but the legend widget seems to be set up not to > work, unless layers have a WMS source.... > > Also, the production popup for printing gives me some bugs. I tried > running it on different systems (IIS and apache), and got the same error. > It says "$szfilename" not defined. I managed to get around it by writing > some javascript which creates scaled output for at user-specified scale on > a user-specified pagesize. Most engineers (the sort of people I develop > this for) are after that. > > If anyone could give me some useful advise, I'd appreciate it. I am quite > experienced in (web) programming, but not in PHP.... > > > Thanks, > > Jacob > > __________________________________ > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing. > http://photos.yahoo.com/ > _______________________________________________ > Chameleon mailing list > Chameleon@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/chameleon > -- ----------------------------------------------------------------- |Paul Spencer spencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| -----------------------------------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |