12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
- <title>JSAPI Loader</title>
- <style>
- html,
- body,
- #container {
- height: 100%;
- width: 100%;
- margin: 0;
- }
- </style>
- </head>
- <body>
- <div id="container" tabindex="0"></div>
- <script src="https://a.amap.com/Loca/static/mock/districts.js"></script>
- <script src="../dist/index.js"></script>
- <script>
- AMapLoader.load({
- key: '',
- version: '1.4.15',
- Loca: {
- version: '1.3.2'
- }
- }).then((AMap) => {
- var map = new AMap.Map('container', {
- zoom: 4,
- center: [107.4976, 32.1697],
- features: ['bg', 'road'],
-
-
- });
- var layer = new Loca.PointLayer({
- map: map
- });
- layer.setData(districts, {
-
- lnglat: 'center'
- });
- layer.setOptions({
- style: {
-
- radius: 5,
-
- color: '#07E8E4',
-
- borderColor: '#5DFBF9',
-
- borderWidth: 1,
-
- opacity: 0.9,
- }
- });
- layer.render();
- }).catch((e) => {
- console.error(e);
- });
- </script>
- </script>
- </body>
- </html>
|