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: make the destination parameter of showDirections() be nullable. #136

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ipcjs
Copy link

@ipcjs ipcjs commented Nov 30, 2022

When it is null, use [destinationTitle] to search destination, currently only some maps support it.

  • [MapType.apple], supported
  • [MapType.google], supported
  • [MapType.googleGo], supported
  • [MapType.amap], supported
  • [MapType.baidu], supported
  • [MapType.tencent], partially supported, you need to manually click the input box to search.
  • others map not tested, fallback to [Coords.zero]

@ipcjs ipcjs changed the title make showDirectionsdestination nullable feat: make the destination parameter of showDirections() be nullable. Nov 30, 2022
val installedApps = context?.packageManager?.getInstalledApplications(0) ?: return listOf()
return maps.filter { map -> installedApps.any { app -> app.packageName == map.packageName } }
val installedPackageNames = (context?.packageManager?.getInstalledApplications(0) ?: emptyList())
.filter { it.enabled }
Copy link
Owner

Choose a reason for hiding this comment

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

nice, I like this enabled check :)

@ondanplatform
Copy link

any update? @mattermoran

@mattermoran
Copy link
Owner

@ondanplatform I'll try to get this cleaned up and tested this weekend

@ondanplatform
Copy link

@mattermoran thanks

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.

3 participants