Skip to content

Commit

Permalink
Fix error that can't change map settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shin-JaeHeon committed Feb 19, 2019
1 parent 8cd493c commit 9f0456a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 체인지 로그
# 0.10.21
* 지도 설정을 변경해도 변경되지 않았던 오류 수정

# 0.10.20
* 컴포넌트가 제거되어도 지도에서는 제거되지 않은 오류 수정

Expand Down
2 changes: 1 addition & 1 deletion dist/vue-naver-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-naver-maps",
"version": "0.10.20",
"version": "0.10.21",
"description": "NAVER Maps component for vue.js",
"main": "dist/vue-naver-maps.js",
"author": {
Expand Down
8 changes: 8 additions & 0 deletions src/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
map: null,
}
},
watch: {
mapOptions: {
handler(newValue) {
this.map.setOptions(newValue);
}, deep: true,
}
},
methods: {
/* Normal Method */
/**
Expand Down Expand Up @@ -263,6 +270,7 @@
/**
* Creating maps.
*/
this.map = new window.naver.maps.Map('vue-naver-maps', Object.assign(this.mapOptions, {
center: new window.naver.maps.LatLng(this.mapOptions.lat, this.mapOptions.lng),
zoom: this.mapOptions.zoom ? this.mapOptions.zoom : 10,
Expand Down

0 comments on commit 9f0456a

Please sign in to comment.