Google Map API: Google map not displayed for specific Zip (Postal) Code in ASP.Net

Last Reply 11 months ago By dharmendr

Posted 11 months ago


i am using this google map code based on post code it shows map


this zipcode is valid GA 30340    USA zipcode i test it on google map and it shows result but i use this zipcode GA 30340 in below code it does not return the map


<script type="text/javascript" src=""></script>
<script type="text/javascript">
    window.onload = function DrawMap() {
        var geocoder = new google.maps.Geocoder();
        var address = document.getElementById("<%=HiddenField1.ClientID %>").value;
        geocoder.geocode({ 'address': address }, function (results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                var latitude = results[0];
                var longitude = results[0].geometry.location.lng();
                var data = {};
                data.title = results[0].formatted_address;
       = latitude;
                data.lng = longitude;
                var mapOptions = { center: new google.maps.LatLng(latitude, longitude), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP };
                var infoWindow = new google.maps.InfoWindow();
                var map = new google.maps.Map(document.getElementById("dvMap"), mapOptions);
                var myLatlng = new google.maps.LatLng(, data.lng);
                var marker = new google.maps.Marker({ position: myLatlng, map: map, title: data.title });
                (function (marker, data) {
                    google.maps.event.addListener(marker, "click", function (e) {
                        infoWindow.setContent("<div style = 'width:200px;height:50px'>" + data.title + "</div>");
              , marker);
                })(marker, data);
            } else {
                alert("Your post code is not correct please update your correct postcode.")
<%--<input name="txtPostalCode" type="text" value="400093" id="txtPostalCode" />
<input type="submit" value="Draw Map" onclick="DrawMap(); return false;" />--%>
<br />
<div id="dvMap" style="width: 300px; height: 400px">


You are viewing reply posted by: dharmendr 11 months ago.
Posted 11 months ago

Hi nauna,

That means the zipcode is not listed in the google api. So we can't do any thing for this.

You can ask the same in the official forums and raise an issue there.