I have edited my code below and put the full JS. I am trying to extract a list of places near a given zipcode or city. My first step would be to take the zipcode or city name and get the latlng coordinates and then get the list of places. I am getting the following errors "Cannot call method 'geocode' of undefined " & " Cannot read property 'offsetWidth' of null" Any help will be greatly appreciated.

```
    var placesList;
    var geocoder;
    var map;

    function initialize() {
        map = new google.maps.Map(document.getElementById('map'));
        geocoder = new google.maps.Geocoder();
    }

    function getLatLng(address, callback) {
        geocoder.geocode({
            address: address
        }, function (results, status) {
            if (status === google.maps.GeocoderStatus.OK) {
                var location = new google.maps.LatLng(result.lat(), result.lng());                    
                map.setCenter(location);
                var marker = new google.maps.Marker({
                    map: map,
                    position: location
                });
                callback(location);
            } else {
                alert('Geocode was not successful for the following reason: ' + status);
            }
        });
    }
    google.maps.event.addDomListener(window, 'load', initialize);
    getLatLng('14235', function (latLngLocation) {
        var pyrmont = latLngLocation;
        var request = {
            location: pyrmont,
            radius: 5000,
            types: ['park', 'zoo']
        };
        placesList = document.getElementById('places');
        var service = new google.maps.places.PlacesService(map);
        service.nearbySearch(request, callback);
        var request1 = {
            reference: place.reference
        };
        service.getDetails(request1, createMarkers);

        function callback(results, status, pagination) {
            if (status != google.maps.places.PlacesServiceStatus.OK) {
                return;
            } else {
                for (var i = 0; i < results.length; i++) {
                    var markerPlace = results[i];
                    createMarkers(markerPlace, status);
                }

                if (pagination.hasNextPage) {
                    var moreButton = document.getElementById('more');
                    moreButton.disabled = false;
                    google.maps.event.addDomListenerOnce(moreButton, 'click',
                        function () {
                            moreButton.disabled = true;
                            pagination.nextPage();
                        });
                }
            }
        }

        function createMarkers(place, status) {
            if (status == google.maps.places.PlacesServiceStatus.OK) {

                var bounds = new google.maps.LatLngBounds();
                var image = {
                    url: place.icon,
                    size: new google.maps.Size(71, 71),
                    origin: new google.maps.Point(0, 0),
                    anchor: new google.maps.Point(17, 34),
                    scaledSize: new google.maps.Size(25, 25)
                };

                var marker = new google.maps.Marker({
                    map: map,
                    icon: image,
                    title: place.name,
                    position: place.geometry.location
                });
                placesList.innerHTML += '<li>' + place.name + '<br>' +
                    (place.formatted_address ? place.formatted_address : place.vicinity) + '</li>';

                bounds.extend(place.geometry.location);
                map.fitBounds(bounds);

            }
        }
    });

    google.maps.event.addDomListener(window, 'load', initialize);

```