拓恒飞手平台小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 anno fa
1 anno fa
1 anno fa
1 anno fa
1 anno fa
1 anno fa
1 anno fa
1 anno fa
1 anno fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Component({
  2. /**
  3. * 组件的属性列表
  4. */
  5. properties: {
  6. point: {
  7. type: Object,
  8. value: []
  9. }
  10. },
  11. /**
  12. * 组件的初始数据
  13. */
  14. data: {
  15. pointArr: []
  16. },
  17. // // 数据监听器
  18. observers: {
  19. point(value) {
  20. if (value.length === 0) return
  21. this.setData({lat: value[0].latitude, lon: value[0].longitude, pointArr: value})
  22. this.mapCtx = wx.createMapContext('myMap', this)
  23. this.mapCtx.addMarkers({
  24. markers: value,
  25. success(res) {
  26. console.log(res, value);
  27. }
  28. })
  29. this.mapCtx.includePoints({
  30. points: value,
  31. padding: [200, 300, 500, 300]
  32. })
  33. },
  34. },
  35. /**
  36. * 组件的方法列表
  37. */
  38. methods: {
  39. includePoints() {
  40. // let mapCtx =
  41. }
  42. }
  43. })