报这种错误vue.esm.js:3767 TypeError: geometry.getVertices is not a function
<template> <div class="query"> <shiliangmap /> <div class="search-wrapper"> <el-input class="search" size="small" v-model="datasql" placeholder="请输入土地位置" ></el-input> <el-button class="btn" size="small" type="primary" @click="dataquery" >搜索</el-button > <el-button class="btn" size="small" type="primary" @click="pointquery" >几何查询</el-button > <el-button class="btn" size="small" type="primary" @click="clearMap" >清除</el-button > </div> </div> </template> <script> import shiliangmap from "../common/shiliangmap.vue"; export default { components: { shiliangmap }, name: "Mapsysmanage3Chaxun", data() { return { map: null, resultLayer:null, polygon: null, isDrawing: false, url: "http://localhost:8090/iserver/services/data-JiZhunDiJia/rest/data" }; }, mounted() { this.pointquery(); }, methods: { pointquery() { this.map = this.$store.getters._getDefaultshiliangmap; if (this.isDrawing) { return; } this.isDrawing = true; this.map.on("click", this.addPointToPolygon); this.map.on("dblclick", this.stopDrawing); this.polygon = L.polygon([], { color: "#409EFF" }).addTo(this.map); var geometryParam = new L.supermap.GetFeaturesByGeometryParameters({ datasetNames: ["基准地价:基准地价"], geometry: this.polygon.toGeoJSON(), spatialQueryMode: "INTERSECT" }); new L.supermap.FeatureService(this.url).getFeaturesByGeometry( geometryParam, serviceResult => { this.resultLayer = L.geoJSON(serviceResult.result.features, { onEachFeature: function(feature, layer) { layer.bindPopup(":" + feature.properties.项目位置); } }).addTo(this.map); }); }, addPointToPolygon(e) { this.polygon.addLatLng(e.latlng); }, stopDrawing() { this.map.off("click", this.addPointToPolygon); this.map.off("dblclick", this.stopDrawing); this.isDrawing = false; }, clearMap() { if (this.polygon) { this.map.removeLayer(this.polygon); this.polygon = null; this.isDrawing = false; // 将isDrawing标志设置为false } } } }; </script> <style> .query { width: 100%; height: 100%; position: relative; } .search-wrapper { position: absolute; top: 70px; /* 距离顶部的距离 */ right: 100px; /* 距离右侧的距离 */ display: flex; /* 使用 Flex 布局 */ align-items: center; /* 垂直居中 */ z-index: 100; } .btn { margin-left: 10px; } </style>