wip: creating test for BaseArrayClass
ADD
jsdoc.json
+{
+ "tags": {
+ "allowUnknownTags": false
+ },
+ "source": {
+ "include": "www",
+ "includePattern": ".js$",
+ "excludePattern": "(node_modules/|docs|__test__)"
+ },
+ "opts": {
+ "template": "node_modules/docdash/",
+ "encoding": "utf8",
+ "destination": "docs/",
+ "recurse": true,
+ "verbose": true
+ },
+ "templates": {
+ "cleverLinks": false,
+ "monospaceLinks": false
+ }
+}

MODIFY
www/BaseArrayClass.js
www/BaseArrayClass.js
@@ -3,8 +3,11 @@ var utils = require('cordova/utils'),
var ARRAY_FIELD = typeof Symbol === 'undefined' ? '__array' + Date.now() : Symbol('array');
-var nextTick = function(fn) { Promise.resolve.then(fn); };
-
+var nextTick = function(fn) { Promise.resolve().then(fn); };
+/**
+ * Create a BaseArrayClass.
+ * @class
+ */
function BaseArrayClass(array) {
BaseClass.apply(this);
var self = this;
@@ -35,7 +38,7 @@ BaseArrayClass.prototype.mapSeries = function(iteratee, callback) {
if (typeof callback === 'function') {
throw error;
} else {
- return Promise.then(error);
+ return Promise.reject(error);
}
}
@@ -48,7 +51,7 @@ BaseArrayClass.prototype.mapSeries = function(iteratee, callback) {
callback.call(self, []);
return;
} else {
- return Promise.then([]);
+ return Promise.resolve([]);
}
}
var _looper = function(currentIdx, resolve) {
@@ -73,7 +76,7 @@ BaseArrayClass.prototype.mapSeries = function(iteratee, callback) {
if (typeof callback === 'function') {
return callback.call(self, results);
} else {
- return Promise.then(results);
+ return Promise.resolve(results);
}
});
};
@@ -82,6 +85,15 @@ BaseArrayClass.prototype.mapSeries = function(iteratee, callback) {
/**
* The same as `Array.map` but runs async all `iteratee` function at the same time.
*
+ * ```
+ * baseArray.mapAsync(function(item, idx, callback) {
+ * ...
+ * callback(value);
+ * }).then(function(values) {
+ *
+ * });
+ * ```
+ *
* @name mapAsync
* @param {Function} iteratee - An async function to apply to each item in array.
* @param {Function} [callback] - A callback which is called when all `iteratee` functions
@@ -95,19 +107,10 @@ BaseArrayClass.prototype.mapAsync = function(iteratee, callback) {
if (typeof callback === 'function') {
throw error;
} else {
- return Promise.then(error);
+ return Promise.reject(error);
}
}
var self = this;
- //------------------------
- // example:
- // baseArray.mapAsync(function(item, idx, callback) {
- // ...
- // callback(value);
- // }, function(values) {
- //
- // });
- //------------------------
var results = [];
for (var i = 0; i < self[ARRAY_FIELD].length; i++) {
results.push(null);
@@ -119,7 +122,7 @@ BaseArrayClass.prototype.mapAsync = function(iteratee, callback) {
callback.call(self, []);
return;
} else {
- return Promise.then([]);
+ return Promise.resolve([]);
}
}
@@ -141,19 +144,37 @@ BaseArrayClass.prototype.mapAsync = function(iteratee, callback) {
if (typeof callback === 'function') {
return callback.call(self, results);
} else {
- return Promise.then(results);
+ return Promise.resolve(results);
}
});
};
-BaseArrayClass.prototype.map = function(fn, callback) {
+
+/**
+ * If you provide `iteratee` and `callback`, work as `mapAsync()`.
+ * If you provide `iteratee`, but omit `callback`, work as `Array.map()`.
+ *
+ * @deprecated
+ * @name map
+ * @param {Function} iteratee - An async function to apply to each item in array.
+ * @param {Function} [callback] - A callback which is called when all `iteratee` functions
+ * have finished. Results is an array of the transformed items from holding array.
+ * Invoked with (results);
+ * @return {Promise|any[]} a promise, if no calback if passed. If you omit `callback`, return transformed items.
+ */
+BaseArrayClass.prototype.map = function(iteratee, callback) {
var self = this;
- if (typeof fn !== 'function') {
- return;
+ if (typeof iteratee !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
}
- if (typeof fn === 'function' && typeof callback !== 'function') {
+ if (typeof callback !== 'function') {
//------------------------
// example:
// var values = baseArray.map(function(item, idx) {
@@ -161,14 +182,28 @@ BaseArrayClass.prototype.map = function(fn, callback) {
// return someValue;
// });
//------------------------
- return self[ARRAY_FIELD].map(fn.bind(self));
+ return self[ARRAY_FIELD].map(iteratee.bind(self));
}
- self.mapAsync(fn, callback);
+ return self.mapAsync(iteratee, callback);
};
-BaseArrayClass.prototype.forEachAsync = function(fn, callback) {
- if (typeof fn !== 'function' || typeof callback !== 'function') {
- return;
+/**
+ * The same as `Array.forEach` but runs async all `iteratee` function at the same time.
+ *
+ * @name forEachAsync
+ * @param {Function} iteratee - An async function to apply to each item in array.
+ * @param {Function} [callback] - A callback which is called when all `iteratee` functions
+ * have finished.
+ * @return {Promise} a promise, if no calback if passed.
+ */
+BaseArrayClass.prototype.forEachAsync = function(iteratee, callback) {
+ if (typeof iteratee !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
}
var self = this;
//------------------------
@@ -183,43 +218,92 @@ BaseArrayClass.prototype.forEachAsync = function(fn, callback) {
var finishCnt = 0;
var _arrayLength = self[ARRAY_FIELD].length;
if (_arrayLength === 0) {
+ if (typeof callback === 'function') {
callback.call(self);
return;
+ } else {
+ return Promise.resolve();
+ }
}
+ return new Promise(function(resolve) {
+
self[ARRAY_FIELD].forEach(function(item) {
- fn.call(self, item, function() {
+ iteratee.call(self, item, function() {
finishCnt++;
if (finishCnt === _arrayLength) {
- callback.call(self);
+ resolve(self);
}
});
});
+
+ })
+ .then(function() {
+ if (typeof callback === 'function') {
+ callback.call(self);
+ return;
+ } else {
+ return Promise.resolve();
+ }
+ });
};
-BaseArrayClass.prototype.forEach = function(fn, callback) {
+/**
+ * If you provide `iteratee` and `callback`, work as `forEachAsync()`.
+ * If you provide `iteratee`, but you omit `callback`, work as `Array.forEach()`
+ *
+ * @deprecated
+ * @name forEach
+ * @param {Function} iteratee - An async function to apply to each item in array.
+ * @param {Function} [callback] - A callback which is called when all `iteratee` functions
+ * have finished.
+ * Invoked with (results);
+ * @return {Promise} a promise, if no calback if passed.
+ */
+BaseArrayClass.prototype.forEach = function(iteratee, callback) {
var self = this;
- if (typeof fn !== 'function') {
- return;
+ if (typeof iteratee !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
}
- if (typeof fn === 'function' && typeof callback !== 'function') {
+ if (typeof callback !== 'function') {
//------------------------
// example:
// baseArray.forEach(function(item, idx) {
// ...
// });
//------------------------
- self[ARRAY_FIELD].forEach(fn.bind(self));
- return;
+ self[ARRAY_FIELD].forEach(iteratee.bind(self));
+ return Promise.resolve();
}
- self.forEachAsync(fn, callback);
+ return self.forEachAsync(iteratee, callback);
};
-BaseArrayClass.prototype.filterAsync = function(fn, callback) {
+
+/**
+ * The same as `Array.filter` but runs async all `iteratee` function at the same time.
+ *
+ * @name filterAsync
+ * @param {Function} iteratee - An async function to apply to each item in array.
+ * @param {Function} [callback] - A callback which is called when all `iteratee` functions
+ * have finished. Results is an array of the filtered items from holding array.
+ * Invoked with (results);
+ * @return {Promise} a promise, if no calback if passed.
+ */
+BaseArrayClass.prototype.filterAsync = function(iteratee, callback) {
var self = this;
- if (typeof fn !== 'function' || typeof callback !== 'function') {
- return;
+ if (typeof iteratee !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
}
//------------------------
// example:
@@ -233,29 +317,59 @@ BaseArrayClass.prototype.filterAsync = function(fn, callback) {
var finishCnt = 0;
var _arrayLength = self[ARRAY_FIELD].length;
if (_arrayLength === 0) {
+ if (typeof callback === 'function') {
callback.call(self, []);
return;
+ } else {
+ return Promise.resolve([]);
}
+ }
+ (new Promise(function(resolve) {
var results = [];
self[ARRAY_FIELD].forEach(function(item) {
- fn.call(self, item, function(isOk) {
+ iteratee.call(self, item, function(isOk) {
if (isOk) {
results.push(item);
}
finishCnt++;
if (finishCnt === _arrayLength) {
- callback.call(self, results);
+ resolve(results);
}
});
});
+ }))
+ .then(function(results) {
+ if (typeof callback === 'function') {
+ callback.call(self, results);
+ return;
+ } else {
+ return Promise.resolve(results);
+ }
+ });
};
-BaseArrayClass.prototype.filter = function(fn, callback) {
+/**
+ * If you provide `iteratee` and `callback`, work as `filterAsync()`.
+ * If you provide `iteratee`, but you omit `callback`, work as `Array.filter()`
+ *
+ * @deprecated
+ * @name filter
+ * @param {Function} iteratee - An async function to apply to each item in array.
+ * @param {Function} [callback] - A callback which is called when all `iteratee` functions
+ * have finished.
+ * @return {Promise} a promise, if no calback if passed.
+ */
+BaseArrayClass.prototype.filter = function(iteratee, callback) {
var self = this;
- if (typeof fn !== 'function') {
- return;
+ if (typeof iteratee !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
}
- if (typeof fn === 'function' && typeof callback !== 'function') {
+ }
+ if (typeof callback !== 'function') {
//------------------------
// example:
// baseArray.filter(function(item, idx) {
@@ -263,23 +377,60 @@ BaseArrayClass.prototype.filter = function(fn, callback) {
// return true or false
// });
//------------------------
- return self[ARRAY_FIELD].filter(fn);
+ return self[ARRAY_FIELD].filter(iteratee);
}
- self.filterAsync(fn, callback);
+ return self.filterAsync(iteratee, callback);
};
-BaseArrayClass.prototype.indexOf = function(item) {
- return this[ARRAY_FIELD].indexOf(item);
+/**
+ * Returns the first index at which a given element can be found in the array, or -1 if it is not present.
+ *
+ * @name indexOf
+ * @param {any} searchElement - Element to locate in the array.
+ * @param {number} [searchElement] - The index to start the search at.
+ * If the index is greater than or equal to the array's length, -1 is returned,
+ * which means the array will not be searched.
+ * If the provided index value is a negative number,
+ * it is taken as the offset from the end of the array.
+ * Note: if the provided index is negative, the array is still searched from front to back.
+ * If the provided index is 0, then the whole array will be searched. Default: 0 (entire array is searched).
+ * @return The first index of the element in the array; -1 if not found.
+ */
+BaseArrayClass.prototype.indexOf = function(item, searchElement) {
+ searchElement = searchElement === undefined || searchElement === null ? 0 : searchElement;
+ if (typeof searchElement !== 'number') {
+ throw new Error('searchElement must be a number');
+ }
+ if (searchElement < 0) {
+ throw new Error('searchElement must be over number than 0');
+ }
+
+ return this[ARRAY_FIELD].indexOf(item, searchElement);
};
+/**
+ * Removes all elements. Fire `remove_at` event for each element.
+ *
+ * @name empty
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `remove_at` event.
+ */
BaseArrayClass.prototype.empty = function(noNotify) {
var self = this;
var cnt = self[ARRAY_FIELD].length;
- for (var i = 0; i < cnt; i++) {
- self.removeAt(0, noNotify);
+ for (var i = cnt - 1; i >= 0; i--) {
+ self.removeAt(i, noNotify);
}
};
+/**
+ * Adds one element to the end of an array and returns the new length of the array.
+ * Fire `insert_at` event if `noNotify` is `false`.
+ *
+ * @name push
+ * @param {any} value - The element to add to the end of the array.
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `insert_at` event.
+ * @return {number} The new length property of the object upon which the method was called.
+ */
BaseArrayClass.prototype.push = function(value, noNotify) {
var self = this;
self[ARRAY_FIELD].push(value);
@@ -289,8 +440,24 @@ BaseArrayClass.prototype.push = function(value, noNotify) {
return self[ARRAY_FIELD].length;
};
+/**
+ * Adds one element to the end of an array and returns the new length of the array.
+ * Fire `insert_at` event if `noNotify` is `false`.
+ *
+ * @name insertAt
+ * @param {number} index - The position of the array you want to insert new element.
+ * @param {any} value - The element to add to the end of the array.
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `insert_at` event.
+ * @return {number} The new length property of the object upon which the method was called.
+ */
BaseArrayClass.prototype.insertAt = function(index, value, noNotify) {
var self = this;
+ if (typeof index !== 'number') {
+ throw new Error('index must be a number');
+ }
+ if (index < 0) {
+ throw new Error('index must be over number than 0');
+ }
if (index > self[ARRAY_FIELD].length) {
for (var i = self[ARRAY_FIELD].length; i <= index; i++) {
self[ARRAY_FIELD][i] = undefined;
@@ -300,28 +467,90 @@ BaseArrayClass.prototype.insertAt = function(index, value, noNotify) {
if (noNotify !== true) {
self.trigger('insert_at', index);
}
+ return self[ARRAY_FIELD].length;
};
+/**
+ * Returns a new array that is the clone of internal array.
+ *
+ * @name getArray
+ * @return {Array<any>} New array
+ */
BaseArrayClass.prototype.getArray = function() {
//return _array.slice(0); <-- Android browser keeps the same instance of original array
return JSON.parse(JSON.stringify(this[ARRAY_FIELD]));
};
+/**
+ * Returns item of specified position.
+ *
+ * @name getAt
+ * @param {number} index - The position of the array you want to get.
+ * @return {any} item
+ */
BaseArrayClass.prototype.getAt = function(index) {
+ var self = this;
+ if (typeof index !== 'number') {
+ throw new Error('index must be a number');
+ }
+ if (index < 0) {
+ throw new Error('index must be over number than 0');
+ }
+ if (index >= self[ARRAY_FIELD].length) {
+ throw new Error('index must be lower number than ' + self[ARRAY_FIELD].length);
+ }
return this[ARRAY_FIELD][index];
};
+/**
+ * Replaces item of specified position.
+ *
+ * @name setAt
+ * @param {number} index - The position of the array you want to get.
+ * @param {any} value - New element
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `set_at` event.
+ * @return {any} previous item
+ */
BaseArrayClass.prototype.setAt = function(index, value, noNotify) {
var self = this;
+ if (typeof index !== 'number') {
+ throw new Error('index must be a number');
+ }
+ if (index < 0) {
+ throw new Error('index must be over number than 0');
+ }
+ if (index > self[ARRAY_FIELD].length) {
+ for (var i = self[ARRAY_FIELD].length; i <= index; i++) {
+ self[ARRAY_FIELD][i] = undefined;
+ }
+ }
var prev = self[ARRAY_FIELD][index];
self[ARRAY_FIELD][index] = value;
if (noNotify !== true) {
self.trigger('set_at', index, prev);
}
+ return prev;
};
+/**
+ * Removes item of specified position.
+ *
+ * @name removeAt
+ * @param {number} index - The position of the array you want to get.
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `remove_at` event.
+ * @return {any} removed item
+ */
BaseArrayClass.prototype.removeAt = function(index, noNotify) {
var self = this;
+ if (typeof index !== 'number') {
+ throw new Error('index must be a number');
+ }
+ if (index < 0) {
+ throw new Error('index must be over number than 0');
+ }
+ if (index >= self[ARRAY_FIELD].length) {
+ throw new Error('index must be lower number than ' + self[ARRAY_FIELD].length);
+ }
var value = self[ARRAY_FIELD][index];
self[ARRAY_FIELD].splice(index, 1);
if (noNotify !== true) {
@@ -330,6 +559,13 @@ BaseArrayClass.prototype.removeAt = function(index, noNotify) {
return value;
};
+/**
+ * Removes item of the last array item.
+ *
+ * @name pop
+ * @param {boolean} [noNotify] - Sets `true` if you don't want to fire `remove_at` event.
+ * @return {any} removed item
+ */
BaseArrayClass.prototype.pop = function(noNotify) {
var self = this;
var index = self[ARRAY_FIELD].length - 1;
@@ -340,16 +576,44 @@ BaseArrayClass.prototype.pop = function(noNotify) {
return value;
};
+/**
+ * Returns the length of array.
+ *
+ * @name getLength
+ * @return {any} Number of items
+ */
BaseArrayClass.prototype.getLength = function() {
- return this[ARRAY_FIELD].length;
+ return parseInt(this[ARRAY_FIELD].length, 10); // In order to prevent manupulating through `length` property, conver to number mandatory using `parseInt`.
};
+/**
+ * Reverses an array in place. The first array element becomes the last, and the last array element becomes the first.
+ *
+ * @name reverse
+ */
BaseArrayClass.prototype.reverse = function() {
this[ARRAY_FIELD] = this[ARRAY_FIELD].reverse();
};
-BaseArrayClass.prototype.sort = function(func) {
- this[ARRAY_FIELD] = this.sort(func);
+/**
+ * The `sort()` method sorts the elements of an array in place and returns the array.
+ * The same as `array.sort()`.
+ *
+ * @name sort
+ * @param {Function} [compareFunction] - Specifies a function that defines the sort order.
+ * If omitted, the array is sorted according to each character's Unicode code point value,
+ * according to the string conversion of each element.
+ */
+BaseArrayClass.prototype.sort = function(compareFunction) {
+ if (typeof compareFunction !== 'function' && typeof compareFunction !== 'function') {
+ var error = new Error('iteratee must be a function');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
+ }
+ this[ARRAY_FIELD] = this.sort(compareFunction);
};

MODIFY
www/Map.js
www/Map.js
@@ -454,19 +454,27 @@ Map.prototype.animateCameraZoomOut = function(callback) {
return self.animateCamera(cameraPosition, callback);
};
/**
- * @desc Move the map camera with animation
- * @params {CameraPosition} cameraPosition New camera position
- * @params {Function} [callback] This callback is involved when the animation is completed.
+ * Move the map camera with animation
+ * @name animateCamera
+ * @param {CameraPosition} cameraPosition - New camera position
+ * @param {Function} [callback] - This callback is involved when the animation is completed.
+ * @return {Promise} if you omit `callback`.
*/
Map.prototype.animateCamera = function(cameraPosition, callback) {
- var self = this;
+ var self = this,
+ error;
var target = cameraPosition.target;
if (!target && 'position' in cameraPosition) {
target = cameraPosition.position;
}
if (!target) {
- return Promise.reject('No target field is specified.');
+ error = new Error('No target field is specified.');
+ if (typeof callback === 'function') {
+ throw error;
+ } else {
+ return Promise.reject(error);
+ }
}
// if (!('padding' in cameraPosition)) {
// cameraPosition.padding = 10;
@@ -476,11 +484,11 @@ Map.prototype.animateCamera = function(cameraPosition, callback) {
target = common.convertToPositionArray(target);
if (target.length === 0) {
// skip if no point is specified
+ error = new Error('No point is specified.');
if (typeof callback === 'function') {
- callback.call(self);
- return;
+ throw error;
} else {
- return Promise.reject('No point is specified.');
+ return Promise.reject(error);
}
}
}
@@ -503,9 +511,12 @@ Map.prototype.animateCamera = function(cameraPosition, callback) {
}
};
/**
- * @desc Move the map camera without animation
- * @params {CameraPosition} cameraPosition New camera position
- * @params {Function} [callback] This callback is involved when the animation is completed.
+ * Move the map camera without animation
+ *
+ * @name moveCamera
+ * @param {CameraPosition} - cameraPosition New camera position
+ * @param {Function} [callback] - This callback is involved when the animation is completed.
+ * @return {Promise} if you omit `callback`.
*/
Map.prototype.moveCamera = function(cameraPosition, callback) {
var self = this;

MODIFY
www/__test__/BaseArrayClass.spec.js
www/__test__/BaseArrayClass.spec.js
@@ -3,34 +3,53 @@ const BaseArrayClass = require('../BaseArrayClass');
describe('[BaseArrayClass]', () => {
- // describe('getLength()', () => {
- // it('() should return the same size with initial array', () => {
- // const initArray = [0, 1, 2];
- // const _ = new BaseArrayClass(initArray);
- // expect(_.getLength()).toBe(initArray.length);
- // });
- // });
+ describe('getLength()', () => {
+ it('() should return the same size with initial array', () => {
+ const initArray = [0, 1, 2];
+ const _ = new BaseArrayClass(initArray);
+ expect(_.getLength()).toBe(initArray.length);
+ });
+ });
describe('mapSeries()', () => {
- it('should error if no callback is given', () => {
+ it('should keep item order', () => {
+ const initArray = ['A', 'B', 'C'];
+ const _ = new BaseArrayClass(initArray);
+ expect(_.mapSeries(function(item, next) {
+ next(item);
+ })).resolves.toEqual(initArray);
+ });
+ });
+
+ describe('mapAsync()', () => {
+ it('should keep item order', () => {
+ const initArray = ['A', 'B', 'C'];
+ const _ = new BaseArrayClass(initArray);
+ expect(_.mapAsync(function(item, next) {
+ next(item);
+ })).resolves.toEqual(initArray);
+ });
+ });
+
+ describe('map()', () => {
+ it('should work as `mapAsync()` if callback is given', (done) => {
const initArray = ['A', 'B', 'C'];
const _ = new BaseArrayClass(initArray);
- expect(_.mapSeries(function() {})).rejects.toMatchSnapshot();
- });
- //
- // it('should keep item order', (done) => {
- // const initArray = ['A', 'B', 'C'];
- // const _ = new BaseArrayClass(initArray);
- // let answer = '';
- // _.mapSeries(function(item, next) {
- // next(item);
- // }, function(results) {
- // console.log(results);
- // expect(results).toEqual(initArray);
- // done();
- // });
- // });
+ _.map(function(item, next) {
+ next(item);
+ }, function(results) {
+ expect(results).toEqual(initArray);
+ done();
+ });
});
+ it('should work as `Array.map()` if callback is omitted', () => {
+ const initArray = ['A', 'B', 'C'];
+ const _ = new BaseArrayClass(initArray);
+ expect(_.map(function(item) {
+ return item;
+ })).toEqual(initArray);
+ });
+ });
});

DELETE
www/__test__/__snapshots__/BaseArrayClass.spec.js.snap
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`[BaseArrayClass] mapSeries() should error if no callback is given 1`] = `[TypeError: Promise.resolve.then is not a function]`;

MODIFY
www/plugin-loader-for-android_ios.js
www/plugin-loader-for-android_ios.js
@@ -100,6 +100,7 @@ if (!cordova) {
/*****************************************************************************
* Name space
*****************************************************************************/
+ /** @namespace plugin.google.maps */
module.exports = {
event: require('./event'),
@@ -110,13 +111,39 @@ if (!cordova) {
BaseClass: require('./BaseClass'),
BaseArrayClass: require('./BaseArrayClass'),
+
+ /** @namespace plugin.google.maps.Map */
Map: {
+ /**
+ * @function getMap
+ * @memberof plugin.google.maps.Map
+ * @static
+ */
getMap: cordovaGoogleMaps.getMap.bind(cordovaGoogleMaps)
},
+ /** @namespace plugin.google.maps.StreetView */
StreetView: {
+ /**
+ * @function getPanorama
+ * @memberof plugin.google.maps.StreetView
+ * @static
+ */
getPanorama: cordovaGoogleMaps.getPanorama.bind(cordovaGoogleMaps),
+ /**
+ * @readonly
+ * @enum {string}
+ * @memberof plugin.google.maps.StreetView
+ * @static
+ */
Source: {
+ /**
+ * Search panorama inside and outdoor
+ */
DEFAULT: 'DEFAULT',
+
+ /**
+ * Search panorama inside and outdoor
+ */
OUTDOOR: 'OUTDOOR'
}
},

wip: creating test for BaseArrayClass