提交 bc6922e9 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新地图定位控件 u-1

上级 a22a0ca1
...@@ -163,7 +163,7 @@ export default class AppMobMapPage extends Vue { ...@@ -163,7 +163,7 @@ export default class AppMobMapPage extends Vue {
* @memberof AppMobMapPage * @memberof AppMobMapPage
*/ */
initCurAddress(o: any) { initCurAddress(o: any) {
if (!this.marker.visible) { if (!this.marker.visible && !this.address) {
o.getCurrentPosition((status: any, result: any) => { o.getCurrentPosition((status: any, result: any) => {
if (result && result.position) { if (result && result.position) {
this.center = [result.position.lng, result.position.lat]; this.center = [result.position.lng, result.position.lat];
...@@ -171,6 +171,8 @@ export default class AppMobMapPage extends Vue { ...@@ -171,6 +171,8 @@ export default class AppMobMapPage extends Vue {
Object.assign(this.marker, { position: this.center, address: this.address, visible: true }); Object.assign(this.marker, { position: this.center, address: this.address, visible: true });
} }
}); });
} else if (this.address) {
this.handleSearch();
} }
} }
...@@ -234,8 +236,6 @@ export default class AppMobMapPage extends Vue { ...@@ -234,8 +236,6 @@ export default class AppMobMapPage extends Vue {
this.address = address as string; this.address = address as string;
} }
} }
} else if (this.address) {
this.handleSearch();
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册