var app = getApp()
var that=null
var sopenFrame=null
var areas = null;
Page( {
  data: {
    loadingHidden:false,
            latitude:0,
            longitude:0,
            address:"",
            scale:15,
            markers:  []
  },
  onReady: function(e) {
    // 使用 wx.createMapContext 获取 map 上下文 
    this.mapCtx = wx.createMapContext('myMap');
  },
  onLoad: function(options) {
    
      that = this
      if(options.lat&&options.lon){
        that.setData({
          latitude:options.lat,
          longitude:options.lon,
          address:options.address,
          loadingHidden:true,
          markers:  [{
            id:8900,
            latitude: options.lat,
            longitude:  options.lon,
            iconPath: '../../images/position-picker2.png',
            width: 80,
            height: 80,
            callout: {
              content: options.address,
              display: 'ALWAYS',
              color: '#000',
              bgColor: '#fff',
              padding: 5,
              borderRadius: 10,
              borderColor: '#f1f1f1',
              fontSize: 14,
              borderWidth: 1,
              textAlign: 'center',
            }
          }]
         });
      }
      that.rdata()
    },rdata: function() {
   
     
    }
})
