liuyg
2022-02-24 1bb17a6e080bf7b543ebc1f51f23cc6bd10fd08c
+地图完善
2 files modified
38 ■■■■ changed files
pages/grabOrders/map.vue 36 ●●●● patch | view | raw | blame | history
pages/grabOrders/map/js/moveUniAppMap.js 2 ●●● patch | view | raw | blame | history
pages/grabOrders/map.vue
@@ -7,8 +7,8 @@
            :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylinesCom"
            show-location="true">
            <cover-view class="dingwBut" @click="mapControlsBack">
                <cover-image :class="[beginFindDW?'dingwButImg':'']" src="./map/img/dingwei.png"
                    @click="mapControlsBack"></cover-image>
                <cover-image src="./map/img/dingwei.png" @click="mapControlsBack">
                </cover-image>
            </cover-view>
        </map>
        <view id="Umain" :style="{ height: activeHeight}" @touchstart="touchstart" @touchend="touchend"
@@ -148,15 +148,12 @@
                    iconPath: "/static/tabbar/addSelectedIcon.png",
                    clickable: true,
                }], //地图控件
                beginFindDW: false, //是否旋转
            }
        },
        methods: {
            mapControlsBack() {
                // console.log(1111)
                this.beginFindDW = true;
                this.getLocationInfo("notSet");
            },
            touchstart(e) {
                // console.log(e.changedTouches[0].clientY)
@@ -414,8 +411,8 @@
                        // console.log(res, "当前位置");
                        that.latitude = res.latitude
                        that.longitude = res.longitude
                        console.log(that.latitude)
                        console.log(that.longitude)
                        // console.log(that.latitude)
                        // console.log(that.longitude)
                        that.map.moveToLocation({
                            latitude: res.latitude,
                            longitude: res.longitude
@@ -437,7 +434,6 @@
                            radius: 10, //半径
                            strokeWidth: 2 //描边的宽度
                        }]
                        that.beginFindDW = false;
                        if (val != "notSet") {
                            let d = {
                                id: that.ourData.id,
@@ -559,6 +555,12 @@
            this.types = uni.getSystemInfoSync();
            var animation = uni.createAnimation({
                duration: 1000,
                timingFunction: 'linear',
            })
            this.animation = animation;
            let activeHeight = 0;
            this.getDom("#Umain", (res) => {
@@ -694,7 +696,7 @@
                toStrings(d);
            }
            toStrings(datas);
            console.log(data)
            // console.log(data)
            if (data.team) {
                data["teams"] = data.team.split(",");
            }
@@ -854,10 +856,10 @@
            //画线
            console.log(data)
            // console.log(data)
            let line = data.line.split("(")[1].split(")")[0].split(",");
            console.log(line[0].split(" ")[1])
            console.log(line[0].split(" ")[0])
            // console.log(line[0].split(" ")[1])
            // console.log(line[0].split(" ")[0])
            this.latitude = line[0].split(" ")[1];
            this.longitude = line[0].split(" ")[0];
            this.map.moveToLocation({
@@ -882,7 +884,7 @@
                dottedLine: false, //是否虚线
                arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
            }
            console.log(this.mypolylines)
            // console.log(this.mypolylines)
            // }, 1000)
            this.showWindow();
            // this.getLocationInfo(data);
@@ -1098,10 +1100,10 @@
        // &::after{
        //     content: url(map/img/dingwei.png);
        // }
        .dingwButImg {
            animation: mymove 5s infinite;
            animation-timing-function: linear;
        }
        // .dingwButImg {
        //     animation: mymove 5s infinite;
        //     animation-timing-function: linear;
        // }
    }
pages/grabOrders/map/js/moveUniAppMap.js
@@ -11,7 +11,7 @@
                }
            }).exec()
        }
        console.log(this.windowSize)
        // console.log(this.windowSize)
        this.start = 0;
        this.end = 0;