Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

微信小程序 Map polygons 多边形绘制不了?[BUG] #1035

Closed
hyyqcweb opened this issue Jun 5, 2020 · 0 comments · Fixed by #1038
Closed

微信小程序 Map polygons 多边形绘制不了?[BUG] #1035

hyyqcweb opened this issue Jun 5, 2020 · 0 comments · Fixed by #1038
Labels
bug Something isn't working

Comments

@hyyqcweb
Copy link

hyyqcweb commented Jun 5, 2020

bug 描述
微信小程序 Map polygons多边形绘制显示不了?

复现步骤

  • none

期望结果

  • 绘制出来多边形

复现代码

import React from 'react';
import { Map } from 'remax/wechat';

const polygon = [{
    points: [{
        latitude: 31.29990,
        longitude: 121.300435,
    },
        {
            latitude: 31.300004,
            longitude: 121.301980,
        },
        {
            latitude: 31.298730,
            longitude: 121.302334,
        },
        {
            latitude: 31.298565,
            longitude: 121.300810,
        }
    ],
    strokeWidth: 3,
    strokeColor: '#FFFFFFAA',
    fillColor: '#04ff00',
    zIndex: 100,
}];
const latitude = '31.298483';
const longitude = '121.305230';

const Test = () => {
    return (
        <Map
            style={{width: '100vw', height: '100vh'}}
            longitude={longitude}
            latitude={latitude}
            showLocation
            enableOverlooking
            polygons={polygon}
        >
        </Map>
    );
};

export default Test;

版本信息:

  • remax 版本: 2.0.7
  • 手机型号 iPhone X
  • 小程序端 微信小程序

其他信息

  • none
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant