Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to develop a Mini Program Map component similar to Watermelon footprints

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to develop map components similar to watermelon footprint Mini programs. The content is detailed and easy to understand. The operation is simple and fast. It has certain reference value. I believe everyone will gain something after reading this article on how to develop map components similar to watermelon footprint Mini programs. Let's take a look at it together.

类似西瓜足迹小程序地图组件:

wxml:

class="button" bindtap="getlocation" style="margin-top:30px" markers="{{markers}}">定位longitude="{{longitude}}" latitude="{{latitude}}" markers="{{markers}}" covers="{{covers}}" style="width: 100%; height: 300px;margin-top:30px">js:

//获取应用实例var app = getApp()Page({data: {latitude: 0,//纬度longitude: 0,//经度speed: 0,//速度accuracy: 16,//位置精准度markers: [],covers: [],},onLoad: function () {},getlocation: function () {var markers = [{latitude: 28.211400,longitude: 112.914250,name: '喜地大厦',desc: '我的位置'}]var covers = [{latitude: 28.211400,longitude: 112.914250,iconPath: '/image/ic_position.png',rotate: 0}]this.setData({longitude: 112.914250,latitude: 28.211400,markers: markers,covers: covers,})wx.getLocation({type: 'gcj02',success: function (res) {var latitude = res.latitudevar longitude = res.longitudevar speed = res.speedvar accuracy = res.accuracyconsole.log("latitude:" + latitude)console.log("longitude:" + longitude)console.log("speed:" + speed)console.log("accuracy:" + accuracy)wx.openLocation({latitude: latitude,longitude: longitude,scale: 28})}})}})关于"类似西瓜足迹小程序地图组件如何开发"这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对"类似西瓜足迹小程序地图组件如何开发"知识都有一定的了解,大家如果还想学习更多知识,欢迎关注行业资讯频道。

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 205

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report