<template> <l-map style="height:400px;"> <l-tile-layer :url="'https://webrd03.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}'" :options="{ foo:'bar'}" > </l-tile-layer> <l-rectangle :latlngs="latlngs" :options="options"></l-rectangle> </l-map> </template> <script> export default { data: () => ({ latlngs: [ [38.57393751557594, 95.61808317250322], [26.775039386999605, 117.6695877365569], ], options: { color: "red", fillColor: "blue" }, }), }; </script>
options 的详情配置,参考 polyline 和 path 类的 options
setBounds(<LatLngBounds> *latLngBounds*)
this
← LPolygon LCircle →