The applet clicks the button to return to the specified coordinate position function

Define the map component first

<map id="map"
        latitude="{
    
    {latitude}}" 
        longitude="{
    
    {longitude}}"
        show-location>
    </map>

 JS:

data:{
    
    latitude: '34.21797710060448',
    longitude: '108.71795654296875',

},
positioning(){
    this.setData({
      latitude: '33.957030069982316',
      longitude: '108.38665008544922',
    })
  },

Just need to change: latitude / longitude in data 

Guess you like

Origin blog.csdn.net/qq_17211063/article/details/130503667