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

                                                   })

                                            }

                                   }

  • 相关阅读:
    获取一张表的所有列
    SqlServer查询数据库所有用户表的记录数
    IE和Firefox在JavaScript方面的兼容性(转)
    ASP.NET2.0调用MySql的存储过程
    javascript在中ie与firefox的区别与解决方案(转)
    针对Firefox兼容性,要注意的一些问题 (转)
    JavaScript Import XML Document
    Remote建立分析
    sql2000和文本文件的写入和读取(转)
    firefox与IE对javascript和CSS的区别(转)
  • 原文地址:https://www.cnblogs.com/sunqq/p/11225006.html
Copyright © 2011-2022 走看看