0.0.3 • Published 2 years ago

mo-modal-coordinate v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

MoModalCoordinate

This library was generated with Angular CLI version 13.3.0.

安装

npm i -S mo-modal-coordinate -registry https://registry.npmjs.org

index.html 引入百度地图

  <script type="text/javascript" src="//api.map.baidu.com/api?v=3.0&ak=key"></script>

使用

import { MoModalCoordinateService } from 'mo-modal-coordinate';
constructor(private moCoordinateSrv: MoModalCoordinateService) {}

/*
type Props = {
  centerCity?: string; //默认的中心点城市
  centerPoint?: string[]; // 默认中心点
  zoom?: number; // 地图大小16
};
*/
showModalCoordinate(props?: Props, modalOptions?: ModalOptions){
  this.moCoordinateSrv.create(props, modalOptions).subscribe(res => {
    if (res) {
      // 数据格式 {lat: '113.53062135659549', lng: '34.829533516515895'}
      console.log(res)
    }
  });
}
0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago