[OpenLayers-Users] Custome Layer Control
Mike Quentel
mikequentel at yahoo.com
Wed May 23 12:25:02 EDT 2007
Many thanks to MetaCarta for providing OL and maintaining the user list. OL is a great product.
I will say this: I greatly appreciate the email response given to the question below, as I am trying to solve some issues related to overlaying WMS on Google Maps base layer (the extents keep moving eastward). The advice given helps to point me in the right direction.
I know OL is an open source, BSD-licensed product; so I all the more appreciate whatever help anyone gives in advice.
Unfortunately, when one is under pressure every week to produce noticeable results (thanks to the popularity of Agile XP), taking the time to reverse engineer an API can be a lot of extra work, so if someone has a quick answer to even an easy question, every little bit of help is greatly appreciated.
Many thanks to anyone that responds to even the simplest question. I always appreciate anyone's attempt at helpful advice in this forum.
Mike Quentel
----- Original Message ----
From: Christopher Schmidt <crschmidt at metacarta.com>
To: bradleyspencer <brad at cubewerx.com.au>
Cc: openlayers users <users at openlayers.org>
Sent: Wednesday, 23 May, 2007 5:21:48 AM
Subject: Re: [OpenLayers-Users] Custome Layer Control
On Wed, May 23, 2007 at 06:56:31PM +1000, bradleyspencer wrote:
> Maybe someone has done this? Certainly it has been done inside the
> layerSwitcher control. I do not want to delve into the source code myself
> unless I have to.
As a developer, "I'd like to write my own code without having to
read/understand the existing code" is a frustrating position to have
someone take. We've spent a lot of time making the code easy to
read/understand: for example, in the case of the LayerSwitcher, there's
a 7 line function whose comment is:
"""
Cycles through the loaded data and base layer input arrays and makes
the necessary calls to the Map object such that that the map's
visual state corresponds to what the user has selected in the
control
"""
Reading this function would lead you to the setVisibility function,
which is well documented:
http://dev.openlayers.org/docs/OpenLayers/Layer.html#setVisibility
I understand that not everything is that simple, but looking at the code
in this case would probably have been easier than sending the email.
Keep this in mind as you develop, and don't be afraid to explore the
existing code: We've designed it so that it is explorable, and it's a
much better resource for how to do things than the mailing list will
typically be.
Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
More information about the Users
mailing list