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

Getting specific type of source, querying source features on android and expose sources #255

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

michalgwo
Copy link
Contributor

Related to #39, but not fixing the issue entirely, as the implementations are only for Android. I don't have access to a Mac right now, so I can't implement it for iOS.

Example of usage:

val vectorSource = styleState.getSource("openmaptiles") as? VectorSource
val features = vectorSource?.querySourceFeatures(setOf("landuse"), null)

The first commit was to make it possible to cast Source to VectorSource, GeoJsonSource, and RasterSource. Exposed getSource() and getSources() make it possible to get a source outside of the Composable function as opposed to getBaseSource()

@sargunv sargunv added this to the v0.7.0 milestone Jan 17, 2025
@sargunv
Copy link
Owner

sargunv commented Jan 17, 2025

Thanks for this, I'll take care of the iOS side before merging

@michalgwo
Copy link
Contributor Author

I just realized that I set the predicate of querySourceFeatures as CompiledExpression instead of Expression. I fixed this and made it non-nullable.

@michalgwo
Copy link
Contributor Author

I'm sorry for so many changes after submitting the PR. I forgot about a few things. Now, everything should be fine.

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