-
Notifications
You must be signed in to change notification settings - Fork 914
BaseClass
Base class of [
The BaseClass constructor is guaranteed to be an empty function, and so you may inherit from BaseClass by simply writing MySubclass.prototype = new plugin.google.maps.BaseClass();. Unless otherwise noted, this is not true of other classes in the API, and inheriting from other classes in the API is not supported.
###Example
var MyClass = function() {
plugin.google.maps.BaseClass.apply(this);
};
MyClass.prototype = new plugin.google.maps.BaseClass();
var myObject = new MyClass();
myObject.addEventListener("BUTTON_CLICK", function(buttonId) {
alert("BUTTON_CLICK: " + buttonId);
});
var button = document.getElementById("button");
button.addEventListener("click", function() {
myObject.trigger("BUTTON_CLICK", button.id);
});
Property | Return value | Description |
---|---|---|
addListener(eventName:string, handler:Function) | void | Adds the given listener function to the given event name. |
get(key:string) | * | Gets a value. |
set(key:string, value:*) | void | Sets a value. |
removeEventListener(eventName?:string, callback?:function) | void | Remove the event listener. If you omit both parameters, all event listeners that added to the object are removed. |
on(eventName:string, handler:Function) | void | Alias of addListener. |
off(eventName?:string, callback?:function) | void | Alias of removeEventListener. |
If you get an error, feel free to ask me on the official community or the issue list.
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md
New versions will be announced through the official community. Stay tune!
Feel free to ask me on the issues tracker.
Or on the official community is also welcome!
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md