Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@GeoDaoyu
Copy link
Contributor

@GeoDaoyu GeoDaoyu commented Jul 9, 2025

[English Template / 英文模板]

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 工作流程
  • 版本更新
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

#2567

💡 需求背景和解决方案

把mouseover事件绑定给map容器。

📝 更新日志

语言 更新描述
🇺🇸 英文 fix tmap mouseover event don't work
🇨🇳 中文 修复腾讯地图 mouseover 事件失效

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2025

⚠️ No Changeset found

Latest commit: 8cd97c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@petercat-assistant
Copy link

Walkthrough

This pull request addresses a bug fix related to the Tencent Map (tmap) where the mouseover event was not functioning properly. The solution involves binding the mouseover event to the map container to ensure it triggers as expected.

Changes

File Summary
examples/demos/point/fill.ts Added mouseout and mouseover event listeners to the scene for logging purposes.
packages/maps/src/tmap/map.ts Added logic to bind the mouseover event to the map container, ensuring the event is handled correctly.
🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@GeoDaoyu
Copy link
Contributor Author

GeoDaoyu commented Jul 9, 2025

现在提交的代码并没有解决问题,是我的解决思路。
我想的是,如果能从packages/map/legacy/handler/events/map_mouse_event.ts中引入MapMouseEvent类,那么问题应该很容易得到解决。
但是和packages/maps/src/utils/simpleMapCoord.ts 一样,我并不知道如何跨子包来引入文件。

@lzxue
Copy link
Contributor

lzxue commented Jul 9, 2025

现在提交的代码并没有解决问题,是我的解决思路。 我想的是,如果能从packages/map/legacy/handler/events/map_mouse_event.ts中引入MapMouseEvent类,那么问题应该很容易得到解决。 但是和packages/maps/src/utils/simpleMapCoord.ts 一样,我并不知道如何跨子包来引入文件。

maps 包里面可以应用map包的方法的吧,legacy 目录下的代码我现在不确定现在有没有使用,是不是有其他替代的

@GeoDaoyu
Copy link
Contributor Author

GeoDaoyu commented Jul 9, 2025

好的,我可以从@antv/l7-map里面导出MapMouseEvent 类。这样就解决了。

@GeoDaoyu GeoDaoyu marked this pull request as ready for review July 9, 2025 05:51
@lzxue lzxue merged commit 1709bda into antvis:master Jul 21, 2025
7 checks passed
@GeoDaoyu GeoDaoyu deleted the fix/tmap-mouseover branch July 21, 2025 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants