-
Notifications
You must be signed in to change notification settings - Fork 0
/
new 1 (1).html
154 lines (131 loc) · 5.75 KB
/
new 1 (1).html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form method="post">
<font size= >SELECT CITY:</font>
<select id="city" onchange="giveSelection(this.value)">
<option value="NOIDA" > NOIDA </option>
<option value="DELHI"> DELHI</option>
<option value="GURGAON"> GURGAON</option>
</select>
<h3> SELECT AREA:</h3>
<select id="area">
<option value="SECTOR1/N" data-option="NOIDA">SECTOR 1</option>
<option value="SECTOR55/N" data-option="NOIDA">SECTOR 55</option>
<option value="SECTOR62/N" data-option="NOIDA">SECTOR 62</option>
<option value="CP" data-option="DELHI">CONNAUGHT PLACE </option>
<option value="ROHINI" data-option="DELHI">ROHINI</option>
<option value="SAAKET" data-option="DELHI">SAAKET</option>
<option value="SECTOR27/G" data-option="GURGAON">SECTOR 27</option>
<option value="SECTOR37/G" data-option="GURGAON">SECTOR 37</option>
<option value="SECTOR26/G/" data-option="GURGAON">SECTOR 26</option>
</select>
<h3>WHICH OFFICE YOU WANNA SELECT</h3>
<select id="SELECTOFFICE">
<option value="revenueoffice" >REVENUE DEPARTMENT</option>
<option value="electricdepartment" >ELECTRICAL DEPARTMENT</option>
<option value="pwdoffice" >PWD DEPARTMENT</option>
<option value="pancard" >PAN CARD</option>
<option value="postoffice" >POST OFFICE</option>
</select>
<input type="submit" value="submit" onclick="addr()">
<p id="demo"></p>
</form>
<p id='print'></p>
<script type="text/javascript">
var city = document.querySelector('#city');
var area = document.querySelector('#area');
var options2 = area.querySelectorAll('option');
function giveSelection(selValue)
{
area.innerHTML = '';
for(var i = 0; i < options2.length; i++)
{
if(options2[i].dataset.option === selValue)
{
area.appendChild(options2[i]);
}
}
}
giveSelection(city.value);
</script>
<script type="text/javascript">
function addr()
{
var city=document.querySelector('#city');
var area=document.querySelector('#area');
var office=document.querySelector('#SELECTOFFICE');
var next=new Array();
var last=new Array();
var fina =new Array();
var lon;
var lat;
var obj = {"PAN CARD@S H A & ASSOCIATES, UGF 6 OCEAN COMPLEX , P6 IN FRONT OF GIP MALL SECTOR 18 , NOIDA UTTAR PRADESH 201301":"[email protected]","PAN CARD@502-503, 5TH FLOOR, ARUNACHAL BUILDING 19 BARAKHAMBA ROAD CONNAUGHT PLACE DELHI 110001":"[email protected]","PAN CARD@Karvy Data Management Services Ltd SHOP NO.18, NEAR HUDA OFFICE GROUND FLOOR, OPP.AKD TOWER SECTOR 14 GURGAON HARYANA 122001":"[email protected]","PAN CARD@Vertex Customer Solutions India Private Limited A-1/46, SUSHANT LOK-II, SECTOR-55, GOLF COURSE ROAD NEAR AIT CHOWK AND PATHWAYS EARLY YEARS SCHOOL GURGAON HARYANA 122011":"[email protected]",
"POST OFFICE@a 31, Sector 62, Noida, Uttar Pradesh 201309":"[email protected]","POST OFFICE@Distt. Court Complex, Saket, Saket, Delhi - 110017":"[email protected]","POST OFFICE@India Post, Shop No. A-6, Opp. Rajiv Chowk Metro Staion Gate No. 8, Rajiv Chowk, Block A, Connaught Place, New Delhi, Delhi 110001":"[email protected]","POST OFFICE@Main Market ,Gurgaon Sector 14, Gurgaon - 122001":"[email protected]",
"POLICE STATION@Sector 18, Noida, 201301":"[email protected]","POLICE STATION@Sector-62, Noida,201301":"[email protected]","POLICE STATION@Baba Kharak Singh Marg, Near Hanuman Mandir, Connaught Place, New Delhi, Delhi 110001":"[email protected]","POLICE STATION@NEAR ABASH SOCIETY, HUDA MARKET, SEC - 56, Gurgaon, Haryana 122011":"[email protected]","POLICE STATION@Near Galaxy Hotel, Sec 15, Civil Lines, Gurgaon, Haryana 122001":"[email protected]"};
for(var propt in obj)
{
if(propt.indexOf(city) > -1)
{ next[propt]=obj[propt];
}
alert(propt + ': ' + obj[propt]);
}
for(var prop in next)
{ if(prop.indexOf(area) > -1)
{
last[prop]=next[prop];
}
alert(prop + ': ' + next[prop]);
}
for(var pro in last)
{ if(pro.indexOf(office) >-1)
{
fina[pro]=last[pro];
}
alert(pro + ': ' + next[pro]);
}
var i=0;
for (pro in fina)
{
var res=pro.split("@");
var adress=res[1] ;
document.getElementById("print").innerHTML = adress;
var loc=fina[pro].split("@");
lat[i]=loc[0];
lon[i]=loc[1];
i=i+1;
}
var n=i;
document.getElementById("demo").innerHTML = +res;
}
</script>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
i=0;
while(i<n)
{
var myCenter = new google.maps.LatLng(lat, lon);
function initialize() {
var mapProp = {
center:myCenter,
zoom:12,
scrollwheel:false,
draggable:false,
mapTypeId:google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker = new google.maps.Marker({
position:myCenter,
});
marker.setMap(map);
}
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</body>
</html>