[Chameleon] New Widget :-D

Kralidis,Tom [Burlington] Tom.Kralidis at ec.gc.ca
Fri Apr 8 07:41:20 EDT 2005


Paul is correct.  The context 1.0.0 specification does not have slots
available to specify whether a WMS supports SLD or not.  You can,
however, specify an SLD URL and LegendURL in a Layer element.

If this is a huge issue, I would suggest this is brought up to the OGC
Context Working Group.

Cheers

..Tom


> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Paul Spencer
> Sent: Thursday, 07 April, 2005 20:33
> To: Godwin, Elizabeth
> Cc: chameleon at lists.maptools.org
> Subject: Re: [Chameleon] New Widget :-D
> 
> 
> Liz,
> 
> Godwin, Elizabeth wrote:
> > Hey Gang,
> >  
> > I'm working on a new widget for Chameleon 2.0 that will handle OGC 
> > layers a bit better.  YES, the LegendTemplate worked well,
> but I want
> > better handling of the legend information that may or may not be
> > available.  I also want it to look snazzy in a way I can't get the 
> > templates to behave, nor use Javascript to code.
> 
> I agree.  The legend template system doesn't work well with
> WMS layers 
> for getting legend graphics.  Definitely a problem.
> 
> Are you replacing the legend templates entirely?  Will this be a
> hardcoded representation of the legend or will it be 
> user-configurable 
> in some way?
> 
> >  
> > SO... one of the issues I'm running into, is that as it
> stands, or as
> > far as I can tell, Chameleon doesn't store/know which
> servers/services
> > are capable of handling SLD information.  And that is
> something I would
> > like to know.  For my application.  I imagine this is
> useful for others
> > using Chameleon for OGC purposes also.
> 
> I would say that Chameleon just doesn't know the information
> since it is 
> not carried with contexts.  However, it is available in the 
> capabilities 
> of a given server ... 
> WMT_MS_Capabilities/Capability/UserDefinedSymbolization
> 
>    <UserDefinedSymbolization SupportSLD="1" UserLayer="0"
> UserStyle="1" 
> RemoteWFS="0"/>
> 
> Unfortunately, grabbing this information is expensive (time
> wise) when 
> loading dynamic layers through a context unless some sort of 
> local cache 
> of WMS servers is kept.  I suppose it would be ideal if every 
> layer that 
> was added could trigger a download of the capabilities if it wasn't 
> already in the cache ...
> 
> >  
> > In my widget, I would like to perform a getlegendgraphic
> request when
> > relevant.  Relevent is servers that support this.  I would
> also like
> > error checking, so if it's capable, but there's an
> error...show message
> > not image.  This is where javascript wouldn't help me.
> >  
> > My first thought was to use the pear HTTP_Request function
> to evaluate
> > if the getlegendgraphic response is xml (error) or an image
> mime type,
> > but if there is some utility I should use instead..then I'd
> like to know.
> 
> you could set the img src to the getlegendgraphic request url
> and set an 
> onerror handler in the img tag so that if the request failed, 
> you could 
> replace the image with a standard 'unknown' image or something
> 
> >  
> > Alternatively (or in addition...?), if a metadata tag was added to
> > each
> > layer when it is added to the map object that specifies if 
> it handles
> > SLDs/getLegendGraphic, that would be nice.  Since Mapserver
> applies SLDs
> > to normal non-OGC layers nicely, this can also be something
> that applies
> > to all map layers.  Also, if it's in the mapfile, I can
> grab it from my
> > widget.  :-)
> 
> yeah ... that would be nice but that information is not
> available from 
> the context AFAIK.  If it is, it would be easy (relatively) 
> to add it to 
> the metadata.  For layers coming through the WMSBrowser, it would be 
> possible to modify the wmsparse to capture that additional 
> information 
> and store it in the wms cache.  However, it is not trivial to change 
> wmsparse and its not likely this would happen any time soon.
> 
> >  
> > If this is something I can add, I just need direction as to
> where this
> > should go.  AND CVS access (Paul???)  I'll give back the
> final results
> > to the community.
> 
> right ... getting on this right now.
> 
> >  
> > Cheers,
> >  
> > Liz Godwin
> >  
> >  
> > 
> > 
> > 
> ----------------------------------------------------------------------
> > --
> > 
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list