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:
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 () {
infowindow.open(map, marker);
});
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
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>
<div id ="map" style="height: 500px; width: 654px"></div>
</body>