收藏
回答

地图map组件填充问题?

目标小程序的填充是这个样子的,我的是下图这样的,红框的地方没有被填充,箭头的地方填充溢出,问题出在哪里了啊

回答关注问题邀请回答
收藏

1 个回答

  • Demons
    Demons
    2023-11-17

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2023-11-17
    有用
    回复 3
    • soho
      soho
      2023-12-14
      data: {
            //中心经度 
            latitude: 40.2,
            //中心纬度 
            longitude: 116.324520,    
            polygon:[{  
              points: [
                  {longitude:116.6212, latitude:41.0283},
                  {longitude:116.6157, latitude:41.053},
                  {longitude:116.6309, latitude:41.0608},
                  {longitude:116.6896, latitude:41.0445},
                  {longitude:116.6988, latitude:41.0208},
                  {longitude:116.6777, latitude:40.9715},
                  {longitude:116.7224, latitude:40.9273},
                  {longitude:116.7134, latitude:40.9103},
                  {longitude:116.7796, latitude:40.8771},
                  {longitude:116.8047, latitude:40.8409},
                  {longitude:116.8207, latitude:40.8483},
                  {longitude:116.8762, latitude:40.8212},
                  {longitude:116.8925, latitude:40.7803},
                  {longitude:116.9251, latitude:40.7729},
                  {longitude:116.9266, latitude:40.7449},
                  {longitude:116.9696, latitude:40.7064},
                  {longitude:117.0311, latitude:40.6921},
                  {longitude:117.1107, latitude:40.7082},
                  {longitude:117.2071, latitude:40.695},
                  {longitude:117.3179, latitude:40.6578},
                  {longitude:117.4092, latitude:40.6873},
                  {longitude:117.5143, latitude:40.6611},
                  {longitude:117.5004, latitude:40.6362},
                  {longitude:117.462, latitude:40.6531},
                  {longitude:117.4489, latitude:40.6515},
                  {longitude:117.4482, latitude:40.6278},
                  {longitude:117.4212, latitude:40.6354},
                  {longitude:117.4218, latitude:40.5694},
                  {longitude:117.3877, latitude:40.5608},
              ],
              fillColor: "#4F94CD33",
              // fillColor: "#ffff0033",
              strokeColor: "#000",
              strokeWidth: 2,
              zIndex: 5,
            }],
          // scale:[


          // ]
        },
      2023-12-14
      回复
    • soho
      soho
      2023-12-14
      <map 
                  style="width: 100vw;height: calc(100vh + 40rpx);" 
                  latitude="{{latitude}}"
                  longitude="{{longitude}}"
                  scale="{{scale}}" 
                  scale='7.5'
                  polygons="{{polygon}}" />
      2023-12-14
      回复
    • soho
      soho
      2023-12-14
      问题有新的进展了,现在只有开发工具上有这个问题,在手机上预览的时候就没有这个问题
      2023-12-14
      回复
登录 后发表内容