"use strict";var img=require("../../utils/imgbase64"),app=getApp();app.originGetLocation=wx.getLocation,Component({lifetimes:{created:function(){},attached:function(){this.getMyPosition()},detached:function(){}},data:{currentLatitude:0,currentLongitude:0,img:img},methods:{choosePosition:function(){var t=this;wx.chooseLocation({success:function(e){t.setData({currentLatitude:e.latitude}),t.setData({currentLongitude:e.longitude}),Object.defineProperty(wx,"getLocation",{get:function(){return function(t){t.success({latitude:e.latitude,longitude:e.longitude})}}})}})},getMyPosition:function(){var e=this;wx.getLocation({type:"gcj02",success:function(t){e.setData({currentLatitude:t.latitude}),e.setData({currentLongitude:t.longitude})}})},openMyPosition:function(){wx.getLocation({type:"gcj02",success:function(t){wx.openLocation({latitude:t.latitude,longitude:t.longitude,scale:18})}})},resetPosition:function(){Object.defineProperty(wx,"getLocation",{get:function(){return app.originGetLocation}}),wx.showToast({title:"还原成功！"}),this.getMyPosition()},onGoBack:function(){this.triggerEvent("toggle",{componentType:"dokit"})}}});