您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

EditPoint.js 769B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * @Author: Caven
  3. * @Date: 2020-03-17 17:52:29
  4. * @Last Modified by: Caven
  5. * @Last Modified time: 2020-05-11 23:13:57
  6. */
  7. import Edit from './Edit'
  8. const { OverlayType, Transform } = DC
  9. class EditPoint extends Edit {
  10. constructor(plotInfo) {
  11. super(plotInfo)
  12. this._position = this._overlay.position
  13. }
  14. _mouseClickHandler(e) {
  15. this._position = e.target ? e.position : e.surfacePosition
  16. this._unbindEnvet()
  17. this._plotEvent.raiseEvent({
  18. type: OverlayType.POINT,
  19. points: [Transform.transformCartesianToWGS84(this._position)]
  20. })
  21. }
  22. _mouseMoveHandler(e) {
  23. this._position = e.target ? e.position : e.surfacePosition
  24. this._viewer.tooltip.showAt(e.windowPosition, '左击选择点位')
  25. }
  26. }
  27. export default EditPoint