Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions Project_Code_12_FasterIsBetterPlacesAutocompletePart2.html
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,6 @@ <h1>Find Your New NYC Home</h1>
position: place.geometry.location,
id: place.id
});
// If a marker is clicked, do a place details search on it in the next function.
marker.addListener('click', function() {
getPlacesDetails(this, place);
});
placeMarkers.push(marker);
if (place.geometry.viewport) {
// Only geocodes have viewport.
Expand All @@ -694,28 +690,6 @@ <h1>Find Your New NYC Home</h1>
}
map.fitBounds(bounds);
}

// This function creates a marker for each place found in either places search.
function createMarkersForPlaces(place) {
var icon = {
url: place.icon,
size: new google.maps.Size(35, 35),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(15, 34),
scaledSize: new google.maps.Size(25, 25)
};

// Create a marker for each place.
var marker = new google.maps.Marker({
map: map,
icon: icon,
title: place.name,
position: place.geometry.location,
id: place.place_id
});
placeMarkers.push(marker);
}

</script>

<script async defer
Expand Down
2 changes: 1 addition & 1 deletion Project_Code_3_WindowShoppingPart1.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
infowindow.open(map, marker);
// Make sure the marker property is cleared if the infowindow is closed.
infowindow.addListener('closeclick',function(){
infowindow.setMarker(null);
infowindow.marker = null;
});
}
}
Expand Down