kmz_compressor 2.0.24 → 2.0.25

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.
@@ -2,6 +2,7 @@ window.MapLayerManager = function(map){
2
2
  var map = map;
3
3
  var layers = []
4
4
  var loadingCount = 0 // How many layers are being loaded
5
+ var zIndexCount = 0 // Each time a layer is created, increment the counter so we can use it to enforce a last request on top draw order
5
6
  var requestTimestamps = {}
6
7
  var layerLoadingEventName = 'map:layerLoading'
7
8
  var layerLoadedEventName = 'map:layerLoaded'
@@ -34,7 +35,7 @@ window.MapLayerManager = function(map){
34
35
  function loadKMLLayer(kmlURL, layerName, options) {
35
36
  // Replace spaces with pluses so we don't have problems with some things turning them into %20s and some not
36
37
  kmlURL = sanitizeURI(kmlURL);
37
- options = options || {}
38
+ options = jQuery.extend(true, {}, options); // Deep copy the options in case they are changed between now and when the map is ready to load
38
39
  options.map = map;
39
40
 
40
41
  var kmlLayer = new google.maps.KmlLayer(kmlURL, options);
@@ -90,6 +91,7 @@ window.MapLayerManager = function(map){
90
91
 
91
92
  function addLayer(layerName, kml){
92
93
  layers.unshift({name:layerName, kml:kml})
94
+ setDrawOrder(layerName, zIndexCount++)
93
95
  return layers[0]
94
96
  }
95
97
 
@@ -1,3 +1,3 @@
1
1
  module KMZCompressor
2
- VERSION = "2.0.24"
2
+ VERSION = "2.0.25"
3
3
  end
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.24
4
+ version: 2.0.25
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-07 00:00:00.000000000 Z
13
+ date: 2015-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails