kmz_compressor 2.0.25 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ window.MapLayerManager = function(map){
|
|
|
16
16
|
var retryDelay = retryDelay || 2000;
|
|
17
17
|
|
|
18
18
|
kmlURL = sanitizeURI(kmlURL);
|
|
19
|
-
options = jQuery.extend(true, {}, options); // Deep copy the options in case they are changed between now and when the map is ready to load
|
|
19
|
+
options = jQuery.extend(true, {zIndex:zIndexCount++}, options); // Deep copy the options in case they are changed between now and when the map is ready to load
|
|
20
20
|
|
|
21
21
|
return $.ajax(kmlURL, {type:'head', statusCode:{
|
|
22
22
|
202: function(){ setTimeout(function(){ cacheAndLoadKMLLayer(kmlURL, layerName, options, retryDelay * 2) }, retryDelay) },
|
|
@@ -35,8 +35,7 @@ window.MapLayerManager = function(map){
|
|
|
35
35
|
function loadKMLLayer(kmlURL, layerName, options) {
|
|
36
36
|
// Replace spaces with pluses so we don't have problems with some things turning them into %20s and some not
|
|
37
37
|
kmlURL = sanitizeURI(kmlURL);
|
|
38
|
-
options = jQuery.extend(true, {}, options);
|
|
39
|
-
options.map = map;
|
|
38
|
+
options = jQuery.extend(true, {zIndex:zIndexCount++, map:map}, options);
|
|
40
39
|
|
|
41
40
|
var kmlLayer = new google.maps.KmlLayer(kmlURL, options);
|
|
42
41
|
var layer = addLayer(layerName, kmlLayer)
|
|
@@ -91,7 +90,6 @@ window.MapLayerManager = function(map){
|
|
|
91
90
|
|
|
92
91
|
function addLayer(layerName, kml){
|
|
93
92
|
layers.unshift({name:layerName, kml:kml})
|
|
94
|
-
setDrawOrder(layerName, zIndexCount++)
|
|
95
93
|
return layers[0]
|
|
96
94
|
}
|
|
97
95
|
|
|
@@ -114,7 +112,7 @@ window.MapLayerManager = function(map){
|
|
|
114
112
|
$(map.getDiv()).trigger({type: layerHiddenEventName, layer:layer})
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
if (layer && layer.kml){
|
|
115
|
+
if (layer && layer.kml && !layer.oldMap){
|
|
118
116
|
layer.oldMap = layer.kml.getMap();
|
|
119
117
|
layer.kml.setMap(null)
|
|
120
118
|
layer.hidden = true
|
|
@@ -309,5 +307,20 @@ window.MapLayerManager = function(map){
|
|
|
309
307
|
|
|
310
308
|
// PUBLIC INTERFACE
|
|
311
309
|
|
|
312
|
-
return {
|
|
310
|
+
return {
|
|
311
|
+
cacheAndLoadKMLLayer : cacheAndLoadKMLLayer,
|
|
312
|
+
loadKMLLayer : loadKMLLayer,
|
|
313
|
+
centerWhenLoaded : centerWhenLoaded,
|
|
314
|
+
addLayer : addLayer,
|
|
315
|
+
removeLayer : removeLayer,
|
|
316
|
+
layerNames : layerNames,
|
|
317
|
+
map : map,
|
|
318
|
+
loadingCount : loadingCount,
|
|
319
|
+
closeInfowindows : closeInfowindows,
|
|
320
|
+
closeInfowindowsExcept : closeInfowindowsExcept,
|
|
321
|
+
hideLayer : hideLayer,
|
|
322
|
+
showLayer : showLayer,
|
|
323
|
+
setDrawOrder : setDrawOrder,
|
|
324
|
+
everyLayer : everyLayer
|
|
325
|
+
}
|
|
313
326
|
}
|
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.0
|
|
4
|
+
version: 2.1.0
|
|
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-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|