Index: trunk/extensions/Maps/includes/services/GoogleMaps3/jquery.googlemap.js |
— | — | @@ -93,14 +93,14 @@ |
94 | 94 | */ |
95 | 95 | this.removeEarthType = function() { |
96 | 96 | if ( Array.prototype.filter ) { |
97 | | - options.types = options.types.filter( function( element, index, array ) { return element != 'earth'; } ); |
| 97 | + options.types = options.types.filter( function( element, index, array ) { return element !== 'earth'; } ); |
98 | 98 | } |
99 | 99 | else { |
100 | 100 | // Seems someone is using the o-so-awesome browser that is IE. |
101 | 101 | var types = []; |
102 | 102 | |
103 | 103 | for ( i in options.types ) { |
104 | | - if ( options.types[i] != 'earth' ) { |
| 104 | + if ( typeof( options.types[i] ) !== 'function' && options.types[i] !== 'earth' ) { |
105 | 105 | types.push( options.types[i] ); |
106 | 106 | } |
107 | 107 | } |
— | — | @@ -110,10 +110,6 @@ |
111 | 111 | }; |
112 | 112 | |
113 | 113 | this.addOverlays = function() { |
114 | | -// for ( i in this.markers ) { |
115 | | -// this.markers[i].setMap( map ); |
116 | | -// } |
117 | | - |
118 | 114 | // Add the Google KML/KMZ layers. |
119 | 115 | for ( i = options.gkml.length - 1; i >= 0; i-- ) { |
120 | 116 | var kmlLayer = new google.maps.KmlLayer( |
— | — | @@ -159,7 +155,9 @@ |
160 | 156 | mapOptions.streetViewControl = $.inArray( 'streetview', options.controls ) != -1; |
161 | 157 | |
162 | 158 | for ( i in options.types ) { |
163 | | - options.types[i] = eval( 'google.maps.MapTypeId.' + options.types[i] ); |
| 159 | + if ( typeof( options.types[i] ) !== 'function' ) { |
| 160 | + options.types[i] = eval( 'google.maps.MapTypeId.' + options.types[i] ); |
| 161 | + } |
164 | 162 | } |
165 | 163 | |
166 | 164 | // Map control styles |