小蒋同学
小蒋同学
  • 发布:2023-03-18 22:55
  • 更新:2023-04-07 21:58
  • 阅读:298

#插件讨论# 【 map地图标记点 - m3h宁 】贴上demo示例

分类:uni-app
关联插件: map地图标记点
<template>  
    <view class="content">  
        <menghnMap @regionchange="regionchange" @navigation="navigation" @markertaptap="markertaptap" @tapMap="tapMap"  
            :markers="markers" :latitude="latitude" :longitude="longitude" :showOper="showOper"/>  

    </view>  
</template>  

<script>  
    import menghnMap from '@/components/menghn-map/menghn-map'  
    export default {  
        components: {  
            menghnMap  
        },  
        data() {  
            return {  
                latitude: '22.568887404083515',  
                longitude: '113.88770606927332',  
                scrollTimer: null,  
                showOper:false,  
                markers: [{  
                        distance: 0.05828283926096898,  
                        id: 27595,  
                        latitude: "22.568887404083515",  
                        longitude: "113.88770606927332",  
                        title: '玄妙的',  
                        iconPath: '../../static/dwicon.png',  
                        width: 35,  
                        height: 35,  
                    },  
                    {  
                        distance: 0.05828283926096898,  
                        id: 27595,  
                        latitude: "22.568382855230592",  
                        longitude: "113.8894362439249",  
                        title: '玄妙的',  
                        iconPath: '../../static/dwicon.png',  
                        width: 35,  
                        height: 35,  
                    }  
                ],  
            }  
        },  
        onLoad() {  

        },  
        methods: {  
            regionchange(e) {//移动地图触发  
            if (this.scrollTimer != null) {//节流  
                clearTimeout(this.scrollTimer);  
            }  
            this.scrollTimer = setTimeout(() => {  
                if (e.type == 'end' && e.causedBy == 'drag') {  
                console.log('地图移动了');  
                }  
            }, 500)  
            },  
            navigation(e) {  
                console.log('navigation');  
            },  
            markertaptap(e) {  
                console.log('markertaptap');  
            },  
            tapMap(e) {//点击地图触发  
                this.showOper = !this.showOper;  
                console.log('tapMap');  
            }  

        }  
    }  
</script>  

<style scoped>  
    .delShow{  
        position: absolute;  
        top: ;  
    }  
</style>  
2023-03-18 22:55 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

大佬你好,我使用了你的插件,出现了以下报错请问这是什么情况,我的操作有什么问题吗

要回复问题请先登录注册