Xie, Ziyu

Results 128 comments of Xie, Ziyu

Thank you. It's a great feature. I will think about it.

@yavulan Interesting idea. But the two inputs are a little quirky in other scenarios. Dragging blocks would fly away from the mouse pointer. I prefer a more general solution. Do...

@qikong333 目前还没没有封装成service,但是你仍然可以原生一样地正常使用这个服务: 需要在map的ready事件后进行处理,例子: ```typescript import { Component, OnInit } from '@angular/core'; declare const AMap: any; @Component({ selector: 'app-demo', template: '' }) export class DemoComponent implements OnInit { constructor() { }...

AMap 需要在加载完地图之后使用,(在ngx-amap的naReady事件之后)。 如果缺少类型定义,需要安装 @types/amap-js-api 更新了 README.md,使用说明里的第5点。如果需要使用`AMapLoaderService`,需要更新到 3.0.1 版本

@zhanggongze 最新的版本中,`NgxAmapComponent` 提供了`getCenter()`方法可以获取到地图中心的坐标。返回的类型是`Promise`

@yuan-java 不是的,ngx-amap本身已经是懒加载的,forRoot只是全局配置而已,并非一启动就要加载地图模块,事实上,只会在用到map组件的页面才会真正加载高德的地图JSSDK。这点你可以看示例页面,打开首页的时候,高德地图的SDK是没有加载的。

确保你的module有正确引入 NgxAmapModule.forRoot({...})

@kylin-ma 通过`(ready)`事件可以拿到map对象

@oceankai 请提供一下项目依赖的: angular的版本号和ngx-amap的版本号?

@oceankai 还是没有提供Angular的版本号,但是看你CLI版本是1.7的话,可以估计Angular的版本是低于6.0的。所以请使用ngx-amap的1.3.2版本