jekyll-maps 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e101ef0a8a4f48f829f8921b069f6e6c510db44a
4
- data.tar.gz: 7f7651c7b40013fbf08572742c04141c43d596c8
3
+ metadata.gz: f78a665bd5372843570e3b7ce2fdc259372d3b42
4
+ data.tar.gz: ab275cb5b36e62a4486ee46dd4497b8b8cdd26a9
5
5
  SHA512:
6
- metadata.gz: 378f1cd5f0dde347cf711b4390bf796db37e48aaae8d37d2fae6da1f4b8eff147b85350c8c6e127998c9ab47972834900a0cc0eedb6ab1051a70e6324085229e
7
- data.tar.gz: fbe266068425d1328478e7304db573e6b2f88027f05f5892b1aa64fbf9f7b6326512d56728e5d048a749eb9674683c761b56ddcdbacd4cf708fb1c26cc79cdd7
6
+ metadata.gz: e76302ce186d29bb54201505f164da6883bb09e6ca0765a89fe3bfee79f97114d46cfcc643159cc1ef080b92297190c95118ab3a541976f00b5c8cd82431e2da
7
+ data.tar.gz: b58410fca8011e807fe11f1f433e97d5a3f4a2fa20f3fc91fbe2e8c35857d8cd146a5db8423eceaf7c85ed815514deff1a1cda324de6927237f46bae023d498e
data/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.1.4 / 2016-07-31
2
+
3
+ * open info window when marker is clicked
4
+
1
5
  ## 1.1.3 / 2016-07-28
2
6
 
3
7
  * on-page map flag
@@ -47,6 +47,7 @@ var jekyllMaps = (function () {
47
47
  bounds = new google.maps.LatLngBounds(),
48
48
  options = this.options,
49
49
  map = new google.maps.Map(document.getElementById(data.id), options),
50
+ infoWindow = new google.maps.InfoWindow(),
50
51
  markers = data.locations.map(createMarker);
51
52
 
52
53
  map.fitBounds(bounds);
@@ -62,13 +63,21 @@ var jekyllMaps = (function () {
62
63
  marker = new google.maps.Marker({
63
64
  position: position,
64
65
  title: location.title,
66
+ image: location.image,
65
67
  url: location.url,
66
68
  map: map
67
69
  });
68
70
 
69
71
  bounds.extend(position);
70
72
  marker.addListener('click', function () {
71
- window.location.href = this.url
73
+ var contentString = '<div class="map-info-window"><h5>' + this.title + '</h5>',
74
+ link = 'View';
75
+ if (this.image.length > 0) {
76
+ link = '<img src="' + this.image + '" alt="' + this.title + '"/>';
77
+ }
78
+ contentString += '<a href="' + this.url + '">' + link + '</a></div>';
79
+ infoWindow.setContent(contentString);
80
+ infoWindow.open(map, this);
72
81
  });
73
82
 
74
83
  return marker;
@@ -19,7 +19,8 @@ module Jekyll
19
19
  :latitude => document["location"]["latitude"],
20
20
  :longitude => document["location"]["longitude"],
21
21
  :title => document["title"],
22
- :url => document["url"] || document.url
22
+ :url => document["url"] || document.url,
23
+ :image => document["image"] || ""
23
24
  }
24
25
  end
25
26
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Maps
3
- VERSION = "1.1.3".freeze
3
+ VERSION = "1.1.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoliy Yastreb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2016-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll