diff --git a/samples/ui-kit-place-details/index.ts b/samples/ui-kit-place-details/index.ts index b1add48d..c18f0459 100644 --- a/samples/ui-kit-place-details/index.ts +++ b/samples/ui-kit-place-details/index.ts @@ -31,9 +31,9 @@ async function initMap(): Promise { let adjustedCenter = offsetLatLngRight(placeDetails.place.location, -0.005); map.innerMap.panTo(adjustedCenter); map.innerMap.setZoom(16); - marker.position = placeDetails.place.location; marker.style.display = 'block'; + marker.collisionBehavior = google.maps.CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL; /* [START maps_ui_kit_place_details_event] */ // Add an event listener to handle map clicks. @@ -71,4 +71,4 @@ declare global { } window.initMap = initMap; /* [END maps_ui_kit_place_details] */ -export {}; \ No newline at end of file +export {};