spatial_features 2.5.0 → 2.5.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f9a2d017923b7bb6f058501fa83c871a9d215f3
4
- data.tar.gz: 9e54295de270f2aaa04404bd2aec8ce71dc9b1dc
3
+ metadata.gz: c21a50dd4e235bfc2f855c476f8644db26bf75ca
4
+ data.tar.gz: 53d679df34b9a530c923de534e1fece3b8f839a4
5
5
  SHA512:
6
- metadata.gz: 61d4a13e97fa049f174e06d8fae41b5620db491c00e6a7e45eb5ae41cc0916771163e4e29d1732cb78a100ecdb3734ff392d214297b73aea0388b06d5ee25958
7
- data.tar.gz: dc79046fb16d330cc7025cbfa30e12234cccff8f1f94293924064e1b7985a5df915f3b05ed0c9397f78bd2dd08e2d89f4e52d2a127bbd3f530fa24a79c6077f2
6
+ metadata.gz: b094cfe9ba427e4c8eb38367b3b314f2f3713fd270baf83e2f4e0c21ba91c090892a5faf039f60866a43ceb09913c53ea68f1a405607f12484ebbb915fa90ef5
7
+ data.tar.gz: d969f8754ebb96c78aa7ebae18f49c6f671ef48e1aa21bec78aaf80eb22a87143c52df3adce2dbbe1afda3b301fb473b8c7a5d14baed12e6086d212f2af95b70
@@ -13,9 +13,10 @@ module SpatialFeatures
13
13
  }
14
14
  TABLE_STYLE = {
15
15
  :polygon_options => { :fill_color_styler => { :kind => 'fusiontables#fromColumn', :column_name => 'colour' },
16
- :stroke_color => { :kind => 'fusiontables#fromColumn', :column_name => 'colour' },
17
- :stroke_opacity => 0.5 },
18
- :polyline_options => { :stroke_color_styler => { :kind => 'fusiontables#fromColumn', :column_name => 'stroke_colour'} }
16
+ :stroke_color_styler => { :kind => 'fusiontables#fromColumn', :column_name => 'colour' },
17
+ :stroke_weight => 1
18
+ },
19
+ :polyline_options => { :stroke_color_styler => { :kind => 'fusiontables#fromColumn', :column_name => 'colour'} }
19
20
  }
20
21
 
21
22
  TABLE_TEMPLATE = {
@@ -50,6 +51,13 @@ module SpatialFeatures
50
51
  service.replace_rows(table_id, features_to_csv(features, colour))
51
52
  end
52
53
 
54
+ def set_style(table_id, style)
55
+ service.style_ids(table_id).each do |style_id|
56
+ service.delete_style(table_id, style_id)
57
+ end
58
+ service.insert_style(table_id, style)
59
+ end
60
+
53
61
  def service
54
62
  @service ||= Service.new(Configuration.service_account_credentials)
55
63
  end
@@ -26,7 +26,7 @@ module SpatialFeatures
26
26
  end
27
27
 
28
28
  def style_ids(table_id)
29
- tables.collect(&:style_id)
29
+ styles(table_id).collect(&:style_id)
30
30
  end
31
31
 
32
32
  def styles(table_id)
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "2.5.0"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace