txs1992 / fast-amap Goto Github PK
View Code? Open in Web Editor NEW🚀🚀🚀 一个基于 Vue 的高性能 高德地图 组件库,A High Performance AMap Component Library Based on Vue.
Home Page: https://txs1992.github.io/fast-amap/
License: MIT License
🚀🚀🚀 一个基于 Vue 的高性能 高德地图 组件库,A High Performance AMap Component Library Based on Vue.
Home Page: https://txs1992.github.io/fast-amap/
License: MIT License
大佬可以增加一个控制InfoWindow加载完成后默认显示或者默认不显示的控制项么。因为有些业务需求需要通过Marker点击后再出现InfoWindow。现目前本人的项目是通过v-if进行控制渲染,但使用该方法回导致一系列加载时机的问题,让其变得难以控制。望大佬增加一个控制选项配置,感谢大佬。
由于本人才疏学浅,只能跟上大佬的一点点思路,去跟了一下大佬的源码。发现是大佬创建实例后,默认调用了open函数
handleOptionsChange() {
this.getAMapPromise().then(() => {
const map = this.getMapInstance(this.mid)
const options = this.getInstanceOptions()
if (!this.content && this.$el) {
options.content = this.$el
}
const instance = this.createInstance(options)
this.instance = instance
instance.open(map, this.position)
})
},
高德地图上有一些计算方法不知道在你的里面能不能用
fast-info-window 里面设置options不起作用 里面设置的属性不起作用,并且不能动态的去替换 希望能有个例子
<fast-info-window
is-cstom
ref="infoWindow"
mid="infoWindow"
:offset="[-13, -30]"
:position="[121.472644, 31.231049]"
:default-open="false"
:options="options"
>
</fast-info-window>
data里面
options: {
position: [123.472644, 31.231049],
content: `<div>测试内容</div>`
}
这样显示的是没内容的 如果把 :position="[121.472644, 31.231049]"
去掉 直接没东西了
也没办法根options里面的内容区动态的改变infowindow里面的东西 不知道是设计如此还是怎么回事
新的一些属性没有,比如说AMap.Marker的opts.zooms 并且老的一些过期了的 比如说 AMap的animation属性 这都没有在文档中标注出来,一顿爬坑
map-loader文件里添加AMapUI 报错
我用 AMap.Geolocation 插件 ip 定位后改变 center,但是地图不会动态改变 center。map 能否 watch center 动态改变?
官方示例这样写的
var layer = new AMap.TileLayer({
zooms:[3,20], //可见级别
visible:true, //是否可见
opacity:1, //透明度
zIndex:0 //叠加层级
})
var map = new AMap.Map('container',{
layers:[layer] //当只想显示标准图层时layers属性可缺省
});
在vue中
<fast-map
:mid="12"
ref="map"
:zoom="15"
:options="options"
:center="center"
:double-click-zoom="false"
@click="handleClick"
@complete="handleComplete"
:layers="layers"
@dragstart="handleMovestart"
@resize="handleMapmove"
>
data() {
return {
options: {
height: 800,
zooms: [3, 16]
},
center: [121.472644, 31.231049],
layers: [new Amap.TileLayer.Satellite(), new Amap.TileLayer.RoadNet()]
}
}
我如何拿到这个Amap呢
麻烦提供进群方式
非常好的项目,比官方的好多了。官方的现在连绑个自定义的数据的功能都没有。。
目前项目需求3D地图,不知道组件如何开启3D模式?
例如百度地图缩放控件
complete方法会触发两次 不知道为什么
当zoom改变时,再去设置zoom不起作用?
如使用高德的点聚合插件(AMap.MarkerClusterer),如何使用呢?望大佬指点
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.