Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] Add new Parameter to options

Hello List

I've created a custom toolbar as follows:

OpenLayers.Control.CustomNavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
    Map : null,
    initialize : function(options) {console.log(Map);}

Now I want to add the parameter Map to to the constructor:
var nav = OpenLayers.Control.CustomNavToolbar({Map:map})

On the console.log(Map) I get that object Map is not defined. When I call on the other hand console.log(options.Map) I get the actual object.

How can I define the parameter so that I can directly use "Map" instead of options.Map?

Thank you very much in advance

Back to the top