The core methods (moveTo(), moveBy(), show(), and hide()) are by default included in the DynLayer. They are always available because they are used quite often.
The moveTo() Method:
The moveTo() method moves the layer to a specific coordinate:
If you need to only change one of x or y why you can send null for the value:
objectName.moveTo(x,null) or objectName.moveTo(null,y)
mylayer.moveTo(100,50) mylayer.moveTo(100,null) mylayer.moveTo(null,50)
The moveBy() Method:
The moveBy() method will shift the location of a layer by a specified number of pixels:
The show() and hide() Methods:
For changing the visibility I've included the methods show() and hide(). Their are no parameters to pass so their usage is simple:
In the standard DynLayer I haven't included any way to retrieve the visibility, only because I've found there's very few instances where you need to find the visibility (usually you already know if it's visible or not). But you could of course extend the DynLayer to keep track of that if need be.
Core Methods Demo:
Example: dynlayer-methods1.html [source]
The Dynamic Layer Object API