Module: ol

ol


Methods

module:ol.getUid(obj){string}

util.js, line 49

Gets a unique ID for an object. This mutates the object so that further calls with the same object as a parameter returns the same value. Unique IDs are generated as a strictly increasing sequence. Adapted from goog.getUid.

Name Type Description
obj Object

The object to get the unique ID for.

Returns:
The unique ID for the object.

module:ol.inherits(childCtor, parentCtor)

util.js, line 14

Inherit the prototype methods from one constructor into another.

Usage:

function ParentClass(a, b) { }
ParentClass.prototype.foo = function(a) { }

function ChildClass(a, b, c) {
  // Call parent constructor
  ParentClass.call(this, a, b);
}
inherits(ChildClass, ParentClass);

var child = new ChildClass('a', 'b', 'see');
child.foo(); // This works.
Name Type Description
childCtor function

Child constructor.

parentCtor function

Parent constructor.

Deprecated
  • Yes