Rename the file names of Environment class for natives to PluginEnvironment.
RENAME
src/android/plugin/google/maps/Environment.java
src/android/plugin/google/maps/PluginEnvironment.java
@@ -20,7 +20,7 @@ import org.json.JSONException;
import java.lang.reflect.Method;
-public class Environment extends CordovaPlugin {
+public class PluginEnvironment extends CordovaPlugin {
public PluginManager pluginManager;
@Override

ADD
src/browser/PluginEnvironment.js
+
+module.exports = {
+ 'isAvailable': function(onSuccess, onError, args) {
+ onSuccess();
+ },
+ 'setBackGroundColor': function(onSuccess, onError, args) {
+ // stub
+ onSuccess();
+ },
+ 'getLicenseInfo': function(onSuccess, onError, args) {
+ // stub
+ onSuccess("cordova-plugin-googlemaps for browser does not need to display any open source lincenses. But for iOS, you still need to display the lincense.");
+ },
+};
+
+
+require('cordova/exec/proxy').add('PluginEnvironment', module.exports);

RENAME
src/ios/GoogleMaps/Environment.h
src/ios/GoogleMaps/PluginEnvironment.h
//
-// Environment.h
+// PluginEnvironment.h
// cordova-googlemaps-plugin v2
//
// Created by Masashi Katsumata.
#import <Cordova/CDV.h>
#import "CordovaGoogleMaps.h"
-@interface Environment : CDVPlugin
+@interface PluginEnvironment : CDVPlugin
- (void)isAvailable:(CDVInvokedUrlCommand*)command;
- (void)setBackGroundColor:(CDVInvokedUrlCommand*)command;

RENAME
src/ios/GoogleMaps/Environment.m
src/ios/GoogleMaps/PluginEnvironment.m
//
-// Environment.m
+// PluginEnvironment.m
// cordova-googlemaps-plugin v2
//
// Created by Masashi Katsumata.
//
//
-#import "Environment.h"
+#import "PluginEnvironment.h"
-@implementation Environment
+@implementation PluginEnvironment
dispatch_queue_t queue;

MODIFY
www/Environment.js
www/Environment.js
@@ -9,7 +9,7 @@ var argscheck = require('cordova/argscheck'),
var Environment = {};
Environment.setBackgroundColor = function(color) {
- cordova.exec(null, null, 'Environment', 'setBackGroundColor', [common.HTMLColor2RGBA(color)]);
+ cordova.exec(null, null, 'PluginEnvironment', 'setBackGroundColor', [common.HTMLColor2RGBA(color)]);
};
Environment.isAvailable = function(callback) {
@@ -21,14 +21,14 @@ Environment.isAvailable = function(callback) {
if (typeof callback === "function") {
callback(false, message);
}
- }, 'Environment', 'isAvailable', ['']);
+ }, 'PluginEnvironment', 'isAvailable', ['']);
};
Environment.getLicenseInfo = function(callback) {
cordova.exec(function(txt) {
callback(txt);
- }, null, 'Environment', 'getLicenseInfo', []);
+ }, null, 'PluginEnvironment', 'getLicenseInfo', []);
};

Rename the file names of Environment class for natives to PluginEnvironment.