Commit 8883e6e5 by liimin

fix(monitor): 修正坐标转换参数顺序错误

AMap.invoke调用时参数顺序错误,将3和5的位置互换以确保正确坐标转换
1 parent c4d32c73
...@@ -573,7 +573,7 @@ export default { ...@@ -573,7 +573,7 @@ export default {
convertCoordinate(item) { convertCoordinate(item) {
item = item.split(",") item = item.split(",")
return new Promise((resolve) => { return new Promise((resolve) => {
AMap.invoke('Convertor', [AMap.invoke('Point', item[0], item[1])], 3, 5, res => { AMap.invoke('Convertor', [AMap.invoke('Point', item[0], item[1])], 5, 3, res => {
const convertedPoint = res.points.length ? res.points[0] : item; const convertedPoint = res.points.length ? res.points[0] : item;
resolve(convertedPoint); resolve(convertedPoint);
}); });
...@@ -584,7 +584,7 @@ convertCoordinate(item) { ...@@ -584,7 +584,7 @@ convertCoordinate(item) {
let _this = this; let _this = this;
let params = this.getParams(); let params = this.getParams();
let _options = this.$route.query; let _options = this.$route.query;
if (!_this.rectangle) { if (!_this.rectangle) {
showToast({ showToast({
message: "请先划定区域", message: "请先划定区域",
...@@ -803,4 +803,4 @@ convertCoordinate(item) { ...@@ -803,4 +803,4 @@ convertCoordinate(item) {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../assets/scss/zoneCar.scss"; @import "../../assets/scss/zoneCar.scss";
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!