Closed voiddiddvue closed 1 year ago
官方demo:https://lbs.amap.com/demo/javascript-api/example/district/district-labels 我的代码:
import { Map, APILoader, } from '@uiw/react-amap'; import React from 'react'; // import './styles.css'; function Demo() { const countryLayer = new AMap.DistrictLayer.Country({ zIndex: 10, SOC: 'CHN', depth: 1, styles: { 'nation-stroke': '#0088ff', 'coastline-stroke': '#0088ff', 'province-stroke': '#888888', } }); return ( <div style={{ width: '100%', height: '1000px' }}> <Map layers={[countryLayer]}> </Map> </div> ); } export default function App() { return ( <APILoader akey="a7a90e05a37d3f6bf76d4a9032fc9129" version="2.0.5"> <Demo /> </APILoader> ); }
而如果改成layers={[new AMap.TileLayer.Satellite()]},则没有问题可以正常显示,请问要如何解决呢
我的锅,有显示
官方demo:https://lbs.amap.com/demo/javascript-api/example/district/district-labels 我的代码:
而如果改成layers={[new AMap.TileLayer.Satellite()]},则没有问题可以正常显示,请问要如何解决呢