Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat maplib #2679

Merged
merged 4 commits into from
Mar 11, 2025
Merged

Feat maplib #2679

merged 4 commits into from
Mar 11, 2025

Conversation

lzxue
Copy link
Contributor

@lzxue lzxue commented Mar 10, 2025

[English Template / 英文模板]

🤔 这个变动的性质是?

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

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

语言 更新描述
🇺🇸 英文
🇨🇳 中文

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

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

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

Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: 9dca55b

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

Copy link

Walkthrough

This pull request introduces a new feature related to maplib. It includes changes to the .vscode/settings.json file, adds a new demo file tile-text.ts, and modifies the geojson.ts parser to improve type checking. Additionally, it updates the index.ts file to export the new tileText feature.

Changes

Files Summary
.vscode/settings.json Minor configuration changes.
examples/demos/bugfix/index.ts Added export for new tileText feature.
examples/demos/bugfix/tile-text.ts New demo file for tileText feature, showcasing map layers and configurations.
packages/source/src/parser/geojson.ts Improved type checking in the parser logic.
tests/integration/snapshots/* No changes in snapshot files.

@@ -31,7 +31,7 @@ function getFeatureID(feature: Feature<Geometries, Properties>, key?: string) {
}

// @ts-ignore
if (typeof (feature.properties[key] * 1) === 'number') {
if (!isNaN(feature.properties[key] * 1)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from typeof (feature.properties[key] * 1) === 'number' to !isNaN(feature.properties[key] * 1) is a more reliable way to check if the property can be converted to a number. This change improves type checking and prevents potential errors when the property is not a valid number.

@lzxue lzxue self-assigned this Mar 11, 2025
@heiyexing heiyexing self-requested a review March 11, 2025 02:28
@heiyexing heiyexing merged commit eb26d62 into master Mar 11, 2025
9 checks passed
@heiyexing heiyexing deleted the feat_maplib branch March 11, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants