kmz_compressor 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,7 @@ window.MapLayerManager = function(map){
|
|
95
95
|
|
96
96
|
function getLayer(layerName){
|
97
97
|
var desiredLayer
|
98
|
-
|
98
|
+
eachLayer(function(layer, index){
|
99
99
|
if (layer.name == layerName){
|
100
100
|
desiredLayer = layer
|
101
101
|
return false;
|
@@ -144,6 +144,13 @@ window.MapLayerManager = function(map){
|
|
144
144
|
}
|
145
145
|
}
|
146
146
|
|
147
|
+
function setKMLOptions(layerName, options){
|
148
|
+
var layer = getLayer(layerName)
|
149
|
+
if (layer){
|
150
|
+
layer.kml.setOptions(options)
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
147
154
|
function areLayersLoaded(layerNames){
|
148
155
|
layerNames = makeArray(layerNames)
|
149
156
|
for (var i = 0; i < layerNames.length; i++){
|
@@ -184,7 +191,7 @@ window.MapLayerManager = function(map){
|
|
184
191
|
}
|
185
192
|
|
186
193
|
function removeLayer(layerName){
|
187
|
-
|
194
|
+
eachLayer(function(layer, index){
|
188
195
|
if (layer.name == layerName){
|
189
196
|
layer.kml.setMap(null)
|
190
197
|
layers.splice(index, 1);
|
@@ -195,11 +202,11 @@ window.MapLayerManager = function(map){
|
|
195
202
|
}
|
196
203
|
|
197
204
|
function removeLayers(){
|
198
|
-
|
205
|
+
eachLayer(function(layer){
|
199
206
|
removeLayer(layer.name);
|
200
207
|
})
|
201
208
|
}
|
202
|
-
function
|
209
|
+
function eachLayer(fn){
|
203
210
|
// NOTE: We use an iterator instead of a for loop because modifications to layers that occur during iteration can mess us up
|
204
211
|
// e.g. if we're responding to an event during the loop and the event adds a layer, we may end up re-iterating on a layer we've already processed
|
205
212
|
$.each(layers.slice(0), function(index, layer){
|
@@ -210,7 +217,7 @@ window.MapLayerManager = function(map){
|
|
210
217
|
// Keep layers synced with their state
|
211
218
|
function sweep(){
|
212
219
|
var foundLayers = [];
|
213
|
-
|
220
|
+
eachLayer(function(layer, index){
|
214
221
|
var kmlStatus = layer.kml ? layer.kml.getStatus() : null;
|
215
222
|
|
216
223
|
// If the layer just finished loading
|
@@ -266,7 +273,7 @@ window.MapLayerManager = function(map){
|
|
266
273
|
}
|
267
274
|
|
268
275
|
function closeInfowindowsExcept(layerName){
|
269
|
-
|
276
|
+
eachLayer(function(layer){
|
270
277
|
if (layer.name != layerName){
|
271
278
|
closeInfowindow(layer)
|
272
279
|
}
|
@@ -274,7 +281,7 @@ window.MapLayerManager = function(map){
|
|
274
281
|
}
|
275
282
|
|
276
283
|
function closeInfowindows(){
|
277
|
-
|
284
|
+
eachLayer(function(layer){
|
278
285
|
closeInfowindow(layer)
|
279
286
|
})
|
280
287
|
}
|
@@ -321,6 +328,7 @@ window.MapLayerManager = function(map){
|
|
321
328
|
hideLayer : hideLayer,
|
322
329
|
showLayer : showLayer,
|
323
330
|
setDrawOrder : setDrawOrder,
|
324
|
-
|
331
|
+
eachLayer : eachLayer,
|
332
|
+
setKMLOptions : setKMLOptions
|
325
333
|
}
|
326
334
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kmz_compressor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-04-
|
13
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|