Skip to content

Commit

Permalink
map emit event when init finished
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgalkin committed Nov 6, 2017
1 parent 9581123 commit eb95faa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/YMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ export default {

this.myMap.geoObjects.add(myGeoObjects);

utils.createClusters(markers, this.clusterOptions, this.myMap);
utils.createClusters(markers, this.clusterOptions, this.myMap)
.then(() => this.$emit('map-is-initialized', this.myMap));
}
},
watch: {
Expand Down
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function createClusters(markers, options, map) {
clusterer.add(clusters[clusterName]);
map.geoObjects.add(clusterer);
}
return Promise.resolve();
}

export function getIconPreset(marker) {
Expand Down

0 comments on commit eb95faa

Please sign in to comment.