Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

I have to three textbox
1)one for Location
2)one for PinCode
3)one for Property have houses

when i search by location it is giving right result
but when i search by location and pincode i did not getting right result
what can i do .i search alot in the Google but i did not find right solution
Please tell me how to do.

how i search Location,pincode and property in the google map using asp.net

ex:Location = London,pincode = AB ,property = houses

so how i can get this type of result using JavaScript(JSON)




following my function:
C#
function FindLocaiton() {
        geocoder = new google.maps.Geocoder();
        InitializeMap1();

        var Area = document.getElementById("txtSearchArea").value;
        geocoder.geocode({ 'address': Area }, function (results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                map.setCenter(results[0].geometry.location);
                var marker = new google.maps.Marker({
                    map: map,
                    position: results[0].geometry.location,
                    title: 'Click me'
                });


                var pincode = document.getElementById("txtPinCode").value;
                geocoder.geocode({'' },






                var infowindow = new google.maps.InfoWindow({
                    content: 'Location info:<br/>Country Name:<br/>LatLng:'
                });
                google.maps.event.addListener(marker, 'click', function () {
                    // Calling the open method of the infoWindow
                    infowindow.open(map, marker);
                });

            }
            else {
                alert("Geocode was not successful for the following reason: " + status);
            }
        });
    }




C#
function Button2_onclick() {


       FindLocaiton();

       window.onload = InitializeMap1;
       var tableid = document.getElementById('tbgetdirection');
       tableid.style.display = 'none';
       var directiondiv = document.getElementById('directionpanel');
       directiondiv.style.display = 'none';
   }



<body>
XML
<div id ="map" style="height: 500px; width: 654px"></div>

</body>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900