zoukankan      html  css  js  c++  java
  • 微信小程序多边形地图显示

    最近在做地图遇到的问题,要显示多边形

    html

    <map id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" polygons="{{polygons}}" bindregionchange="regionchange"
         show-location style=" 100%; height: 100vh;">
    </map>

    js

    data: {
     
        latitude: "24.47951",
        longitude: "118.08948",
        polygons: [{
          points: [{
            longitude: 117.265348,
            latitude: 38.907694
          }, {
            longitude: 112.610832,
            latitude: 37.82133
          }, {
            longitude: 113.125956,
            latitude: 35.944515
          },
            {
              longitude: 115.425619,
              latitude: 34.966053
            },
            {
              longitude: 117.062978,
              latitude: 36.585177
            }],
          fillColor: "#ffff0033",
          strokeColor: "#FFF",
          strokeWidth: 2,
          zIndex: 1
        },
          {
            points: [{
              longitude: 111.818599,
              latitude: 34.707698
            }, {
              longitude: 108.985415,
              latitude: 34.441382
            },
              {
                longitude: 107.771193,
                latitude: 33.120195
              },
              {
                longitude: 110.78835,
                latitude: 32.778928
              }],
            fillColor: "#ffff0033",
            strokeColor: "#FFF",
            strokeWidth: 2,
            zIndex: 1
          }]
      },
  • 相关阅读:
    1007 Maximum Subsequence Sum(25 分)
    1006 Sign In and Sign Out(25 分)
    1005 Spell It Right
    1004 Counting Leaves
    Struts10分钟入门
    MyBais入门
    Hibernate注解
    save,flush,evict
    HQL连接查询
    Hibernate-延迟加载和立即加载
  • 原文地址:https://www.cnblogs.com/huichaoboke/p/12290657.html
Copyright © 2011-2022 走看看