From 9b52f2a7a5e4cee172a9392631e2a5e0ee0f1437 Mon Sep 17 00:00:00 2001
From: Silvio <silvio@socioambiental.org>
Date: Mon, 17 Aug 2015 17:16:16 -0300
Subject: Check for config.proxyUrl and config.createMap

---
 gmap_arcgis.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index b594597..4d92def 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -27,7 +27,7 @@ function gmapArcgis(config) {
   }
 
   // Proxy settings
-  if (config.proxyUrl != undefined) {
+  if (config.proxyUrl != undefined && config.proxyUrl != null) {
     gmaps.ags.Config.proxyUrl = config.proxyUrl;
 
     if (config.alwaysUseProxy != undefined) {
@@ -36,7 +36,7 @@ function gmapArcgis(config) {
   }
 
   // Map initialization
-  if (config.createMap == true && config.mapId != null && config.mapOptions != null) {
+  if (config.createMap != undefined && config.createMap == true && config.mapId != null && config.mapOptions != null) {
     config.map = new google.maps.Map(document.getElementById(config.mapId), config.mapOptions);
   }
 
-- 
cgit v1.2.3