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

GeoJson breaks marker listener #530

Open
alfroid2k opened this issue Mar 4, 2024 · 1 comment
Open

GeoJson breaks marker listener #530

alfroid2k opened this issue Mar 4, 2024 · 1 comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@alfroid2k
Copy link

alfroid2k commented Mar 4, 2024

Environment details

  1. Specify the API at the beginning of the title (for example, "Places: ...")
    Maps compose
  2. OS type and version
    Any version
  3. Library version and other environment information
    4.3.3

Steps to reproduce

When loading a geoJson layer the click listeners for the MarkerComposable stops working

Code example

                    GoogleMap(
                        modifier = Modifier.fillMaxSize(),
                        cameraPositionState = cameraPositionState
                    ) {
                        val context = LocalContext.current
                        MarkerComposable(state = MarkerState(position = LatLng(1.35, 103.87)), onClick = {
                            Toast.makeText(context, "marker clicked!!", Toast.LENGTH_SHORT).show()
                            true
                        }) {
                            Box(modifier = Modifier
                                .size(32.dp)
                                .background(color = Color.Blue))
                        }
                        MapEffect(key1 = "12313", block = { map ->

                            val layer = GeoJsonLayer(map, R.raw.anyjson, context)


                            layer.setOnFeatureClickListener { feature ->
                                Toast.makeText(context, "Map layer feature clicked", Toast.LENGTH_SHORT)
                            }

                            layer.addLayerToMap()
                        })
                    }
@alfroid2k alfroid2k added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 4, 2024
@wangela
Copy link
Member

wangela commented Mar 4, 2024

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@alfroid2k Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants