[OpenLayers-Users] Google Summer of Code 2008

Christopher Schmidt crschmidt at metacarta.com
Wed Mar 12 10:05:13 EDT 2008


On Wed, Mar 12, 2008 at 03:53:12PM +0200, Andrew de Klerk wrote:
> Chris 
> 
> Thanks for the insightful reply. If I am hearing you correctly, I could
> include,  for example, the enhanced layer switcher through an additional
> script tag. 

Certainly, if I were to write an enhanced layer switcher, that would be
my intention. 

> Would this override the existing layer switcher?, 

Presumably, anyone taking a tack of designing an enhanced LayerSwitcher
would be subclassing from LayerSwitcher, and therefore using a different
name (like "EnhancedLayerSwitcher") instead, so "no", it would be in
addition.

> or would I need to compile openlayers with the layer switcher
> excluded. 

If the design was done right, the answer to this would also be no.

> This is essentially what I was referring to, but you have answered my
> question. 
> 
> The problem I was trying to get to, is if you replace controls etc within
> the main openlayers script, and a new release comes out, you would need to
> keep track Of what you have modified and apply that to the new version - I
> would like to keep away from that. 

Right, any code that requires you to do that would be what I would call
"badly designed" :)  

> A classic example is the styling of the
> map tools etc - we have changed their colours, and I currently have
> commented placeholders in the code so that when new versions come out, I can
> go and modify them again (although I realize that this is due to be moved to
> the stylesheet)

Which map tools? In general, if you have to change things in the
Javascript, the OpenLayers code is doing something 'wrong'. This doesn't
neccesarily mean it's on the list to get fixed, of course, but it's in
your best interest to pursue fixing it, since you're doing extra legwork
every release until someone does... 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list