add static getMyLocation function
MODIFY
www/Map.js
www/Map.js
@@ -476,6 +476,10 @@ Map.prototype.getMyLocation = function(params, success_callback, error_callback)
error_callback.call(self, result);
}
};
+ //exec undefined when called directly from plugin
+ if (!exec){
+ exec = this.exec;
+ }
exec.call(this, successHandler, errorHandler, 'CordovaGoogleMaps', 'getMyLocation', [params], {sync: true});
};
Map.prototype.getFocusedBuilding = function(callback) {

MODIFY
www/googlemaps-cdv-plugin.js
www/googlemaps-cdv-plugin.js
@@ -589,6 +589,7 @@ if (!cordova) {
BaseClass: BaseClass,
BaseArrayClass: BaseArrayClass,
Map: {
+ getMyLocation: Map.prototype.getMyLocation.bind({_isReady: true,exec: execCmd}),
getMap: function(div, mapOptions) {
var mapId;
if (common.isDom(div)) {

add static getMyLocation function