-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
MapLibreGL.VectorSource onPress returns no geometry on Android #538
Comments
I can't reproduce with the current v10 pre-releases, can you try upgrading? |
@KiwiKilian I already did. I previously tried upgrading to If it's not confidential, may I know what's the |
See the here updated example: https://github.com/maplibre/maplibre-react-native/pull/524/files#diff-4084478957dc154afe7df0124654c8135ef0cbfdf2f3916d8b249b0b95c821e5 You can try withing your app like this: <MapLibreGL.MapView style={{ flex: 1 }}>
<MapLibreGL.VectorSource
id="maplibre-tiles"
url="https://demotiles.maplibre.org/tiles/tiles.json"
onPress={(event) => {
console.log(
`VectorSource onPress: ${event.features}`,
event.features,
);
}}
>
<MapLibreGL.FillLayer
id="countries"
sourceLayerID="countries"
style={{
fillColor: "#ffffff",
fillAntialias: true,
}}
/>
</MapLibreGL.VectorSource>
</MapLibreGL.MapView> |
Ok, I've tested a bit more and it seems to be flaky in my example. Sometimes there is a geometry, other times it's |
@KiwiKilian yes I tested your example and was about to tell you that. Thanks for confirming that you're able to see it too |
# [10.0.0-beta.9](v10.0.0-beta.8...v10.0.0-beta.9) (2024-12-15) ### Bug Fixes * `VectorSource` `onPress` returning null geometry on Android ([250ee6f](250ee6f)), closes [#538](#538)
🎉 This issue has been resolved in version 10.0.0-beta.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks @jimmyasyraf for catching, debugging and fixing this! Most appreciated. |
Steps to Trigger Behavior
Expected Behavior
For each feature in
event.features
there should be geometryActual Behavior
For each feature in
event.features
it returnsnull
for Android. In iOS it returns the geometry with no problem.Environment
@maplibre/maplibre-react-native
Version: 9.0.1react-native
Version: 0.73Additional context
The event for
onPress
for<MapLibreGL.ShapeSource>
for Android is fine too, it returns the geometryEDIT: I'm only referring to the geometry returned in the onPress event (for Android). Visually, the layer is displayed perfectly fine in the map.
The text was updated successfully, but these errors were encountered: