zoukankan      html  css  js  c++  java
  • 快应用---组件(map)

    map组件

             1)关于map组件的相关属性

                 <map  style="{{width}};height: {{height}}"   //自定义组件的宽高

                            latitude="{{latitude}}"  longitude="{{longitude}}"  //调整地图组件的中心位置

                            scale="{{scale}}" coordtype="{{coordtype}}"></map>   //缩放级别

              2)地图组件支持的四种覆盖物,包括:marker,groundoverlay,polyline 和circle.

                    markers :[

                         {

                              latitude:'',longitude:'',coordType:'wgs84', iconPath:'',''   

                          }

                    ]

                    groundoverlays: [

                         {

                              northEast:'', southWest:'',iconPath:'',opacity:0.4

                          }

                    ],

                    polylines:[{ points:[POINT1,POINT2]}],

                    circles: [

                          {

                                latitude: POINT1.latitude,longitude:POINT2.longitude,coordType:'wgs84',radius: 50

                           }

                    ]

               3) 展示maker的callout气泡

                   maker可以通过点击或常显的方式显示一个文本为用来描述和对应的maker相关的信息;

                   makers:[

                         {

                                '100%',

                               height: '50%',

                               latitude: BEI.latitude,

                               longitude: BEI.longitude,

                               coordType:BEI.coordType,

                               iconPath: '',

                                '100px',

                               callout:{

                                       content:'这里是 北京',

                                       padding: '20px 5px 20px 5px',

                                        borderRadius: '20px',

                                        textAlign: 'left',

                                         display: 'always'

                               }

                          }

                    ]

                   4) maker的移动

                      <map  style=" {{width}};height:{{height}}" id="map" scale="{{scale}}" markers="{{markers}}" polylines="{{polylines}}" @tap="tap"></map>

                      <script>

                               const POINT1 = {  latitude:'',longitude:'' };

                                const POINT2 = {  latitude:'',longitude:'' };

                                export default {

                                       private: {

                                              100%,

                                              height: 50%,

                                              scale: 17,

                                               markers: [

                                                    {

                                                           id:1,

                                                           latitude: POINT1.latitude,

                                                           longitude:POINT1.longitude,

                                                           anchor: [ x: 0.5,y:0.5 ],

                                                           iconPath: '',

                                                            '100px'

                                                     }

                                               ],

                                               polylines: [{points: [POINT1,POINT2]}}

                                            },

                                            tap(){

                                                 this.$element('map').translateMarker({

                                                          markerId: 1,

                                                          destination: POINT2,

                                                           autoRotate:true,

                                                           duration: 5000

                                                   })

                                            }

                                   }

  • 相关阅读:
    hive_学习_00_资源帖
    大数据_学习_02_目录贴_大数据学习总结
    hadoop_异常_02_ExitCodeException exitCode=1: chmod: changing permissions of `/ray/hadoop/dfs/data': Operation not permitted
    hbase_异常_05_End of File Exception between local host is: "rayner/127.0.1.1"; destination host is: "localhost":9000;
    hbase_异常_04_util.FSUtils: Waiting for dfs to exit safe mode...
    hbase_异常_03_java.io.EOFException: Premature EOF: no length prefix available
    hbase_异常_02_hbase无法访问16010端口
    hbase_异常_01_Hbase: Failed to become active master
    【HDU】2147 kiki's game
    【HDU】1517 A Multiplication Game
  • 原文地址:https://www.cnblogs.com/sunqq/p/11225006.html
Copyright © 2011-2022 走看看