Google map оригинальное изображение маркера перекрывает выбранный маркер - PullRequest
0 голосов
/ 13 июня 2019

Здесь я загрузил изображение моей проблемы, где вы можете проверить, что выбранный маркер перекрывается оригинальным маркером. Я не знаю причину. Вот мой код для выбора маркера

 func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {

            //Here I am checking that selected marker is not my current location marker
            if marker != currentLocationMarker{

                if let selectedMarker = mapView.selectedMarker {
                    selectedMarker.icon = UIImage(named : "scooterPin")
                }

                mapView.selectedMarker = marker
                selectedScooterLocation = CLLocation(latitude: marker.position.latitude, longitude: marker.position.longitude)
                marker.icon = UIImage(named : "selectedScooterPin")

                currentLocationMarker.icon = UIImage(named : "currentLocationMarker")

                mapView.animate(to: GMSCameraPosition.camera(withLatitude: marker.position.latitude, longitude: marker.position.longitude, zoom: mapView.camera.zoom))

            }

            return true
    }

Overlapping marker image

...