Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
ra...@google.com <ra...@google.com> #3
Thank you for posting.
We'll need some more details to troubleshoot this issue - please provide the following, in particular steps to reproduce the issue:
-
Put together a simplified reproduction case (
http://sscce.org/ ) and add it to a git hosting provider (e.g. github, bitbucket, etc)? The easiest way to do this might be to fork the Google Maps Android API Samples Repository and modify one of the existing demo activities:https://github.com/googlemaps/android-samples -
List steps to reproduce the problem
- Maps SDK client library version (used to build your app):
- Maps renderer (Latest or Legacy):
- Devices you have verified this issue on:
- Google Play Services version on the device:
- Android version:
- Manufacturer and model:
- Was this working correctly on a previous version of Google Play Services? (If yes, which client library and SDK version?)
- Attach the following:
- screenshots
- sample code
- an APK if possible.
- If the problem exhibits itself in a released version of your app on the Play Store, optionally link us to the app, and explain how to reproduce the issue in your app.
For developers viewing this issue: please click the 'star' icon to be notified of future changes, and to let us know how many of you are interested in seeing it resolved.
al...@gmail.com <al...@gmail.com> #4
Link to project:
Relevant file:
Steps to reproduce:
- Add polygon and marker to map.
- Call
polygon.remove()
- Call
map.clear()
Expected: both marker and polygon are removed.
Actual: Neither marker nor polygon are removed.
Details:
- Maps SDK client library version (used to build your app): 19.0.0
- Maps renderer (Latest or Legacy): N/A
- Devices you have verified this issue on:
- Google Play Services version on the device: 24.26.32 (100400-650348549)
- Android version: 9
- Manufacturer and model: Xiaomi Redmi Note 8T
- Was this working correctly on a previous version? : N/A
Screenshot:
Sample code:
setContentView(R.layout.activity_main)
val mapFragment = supportFragmentManager.findFragmentById(R.id.map) as SupportMapFragment
mapFragment.getMapAsync { map ->
val polygon = map.addPolygon(
PolygonOptions()
.add(LatLng(0.0, 0.0), LatLng(0.0, 5.0), LatLng(3.0, 5.0), LatLng(0.0, 0.0))
.strokeColor(Color.RED)
.fillColor(Color.BLUE)
)
val marker = map.addMarker(MarkerOptions().position(LatLng(0.0, 0.0)))!!
polygon.remove()
map.clear() // Not working for marker as well
}
ra...@google.com <ra...@google.com> #5
Thank you for the information.
We have raised this internally.
Please note that we cannot give you any timelines, but you can star the issue to get notifications.
Description
Problem: Polygon cannot be removed after addition. Also hapenned for other users, seehttps://stackoverflow.com/q/78263290
Expected: Polygon removed from GoogleMap. Actual: Nothing happens.
Sample code:
Also add the following details: