Skip to content

Commit c17b39c

Browse files
committed
turn markers into a real property, closes GoogleWebComponents#183
1 parent 29f29b4 commit c17b39c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
bower_components
2+
.idea

google-map.html

+10-5
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@
331331
additionalMapOptions: {
332332
type: Object,
333333
value: function() { return {}; }
334+
},
335+
336+
/**
337+
* The markers on the map.
338+
*/
339+
markers: {
340+
type: Array,
341+
value: function() { return []; },
342+
readOnly: true
334343
}
335344

336345
},
@@ -347,10 +356,6 @@
347356
'_debounceUpdateCenter(latitude, longitude)'
348357
],
349358

350-
created: function() {
351-
this.markers = [];
352-
},
353-
354359
attached: function() {
355360
this._initGMap();
356361
},
@@ -441,7 +446,7 @@
441446

442447
this._observeMarkers();
443448

444-
this.markers = newMarkers;
449+
this.markers = this._setMarkers(newMarkers);
445450

446451
// Set the map on each marker and zoom viewport to ensure they're in view.
447452
if (this.markers.length && this.map) {

0 commit comments

Comments
 (0)