Commit a3e622fe9b58e7b4409e3f2e9ab36f1aea931a25

Few map improvements
  
11#map{
2width:1000px;
3height:500px;
2width: 1000px;
3height: 500px;
44margin-top: 30px;
55position: relative;
66}
2626 float: left;
2727 margin-right: 8px;
2828 opacity: 0.7;
29}
30.yellow {
31 color: #cead00;
32}
33.red {
34 color: #FF0000;
2935}
  
1212//Using a empty geojson object to instantiate the geojson layer
1313var empty_geojson = {"type":"FeatureCollection","features":[]};
1414function highlightFeature(e) {
15 console.log(e.target);
15 //console.log(e.target);
1616
1717 var layer = e.target;
1818
6666var map = L.map('map').setView([12.9725, 77.58443],4);
6767world_map.addTo(map);
6868india_map.addTo(map);
69var lat_lng = {
70 0:{'lat':28.099, 'lng':76.983, //GKA
71 'stnName': 'Gurgaon ki Awaz (CR)',
72 'freq': '107.8 MHz',
73 'power': '10KW',
74 'distName': 'Gurgaon',
75 'owner':'TRF(The Restoring Force)',
76 'content':'folk music and other self generated content',
77 'licenseType': 'CR',
78 'licenseCost': '120000000 INR',
79 'licenseRange': '100 KM',
80 'url':'#/station/gka',
81 'effectiveRange': '15 KM'},
82 1:{'lat':24.691, 'lng':78.413, //Lalitpur
83 'stnName': 'Lalit lokavani (CR)',
84 'freq': '91.1 MHz',
85 'power': '10KW',
86 'distName': 'Lalitpur',
87 'owner':'Unknown',
88 'content':'content from EDAA(ek duniya anek awaz)',
89 'licenseType': 'CR',
90 'licenseCost': '120000000 INR',
91 'licenseRange': '100 KM',
92 'url':'#/station/llv',
93 'effectiveRange': '15 KM'},
94 2:{'lat':24.999, 'lng':79.499, //Bundelkhand
95 'stnName': 'Radio Bundelkhand (CR)',
96 'freq': '91.1 MHz',
97 'power': '10KW',
98 'distName': 'Bundelkhand',
99 'owner':'Unknown',
100 'content':'content is downloaded from internet',
101 'licenseType': 'CR',
102 'licenseCost': '120000000 INR',
103 'licenseRange': '100 KM',
104 'url':'#/station/rbk',
105 'effectiveRange': '35 KM'},
106 3:{'lat':29.470, 'lng':79.647,
107 'stnName': 'Radio Kumaonvani ',
108 'freq': '',
109 'power': '10KW',
110 'distName': 'Mukteswar',
111 'owner':'',
112 'content':'Bollywod movie songs',
113 'licenseType': 'CR',
114 'licenseCost': '1 Crore',
115 'licenseRange': '100 KM',
116 'url':'#/station/kmv',
117 'effectiveRange': '70 KM'}
118};
69var lat_lng = [
70 {
71 'lat':28.099, 'lng':76.983, //GKA
72 'stnName': 'Gurgaon ki Awaz (CR)',
73 'freq': '107.8 MHz',
74 'power': '10KW',
75 'distName': 'Gurgaon',
76 'owner':'TRF(The Restoring Force)',
77 'content':'folk music and other self generated content',
78 'licenseType': 'CR',
79 'licenseCost': '120000000 INR',
80 'licenseRange': '100 KM',
81 'url':'#/station/gka',
82 'effectiveRange': '15 KM'
83 },
84 {
85 'lat':24.691, 'lng':78.413, //Lalitpur
86 'stnName': 'Lalit lokavani (CR)',
87 'freq': '91.1 MHz',
88 'power': '10KW',
89 'distName': 'Lalitpur',
90 'owner':'Unknown',
91 'content':'content from EDAA(ek duniya anek awaz)',
92 'licenseType': 'CR',
93 'licenseCost': '120000000 INR',
94 'licenseRange': '100 KM',
95 'url':'#/station/llv',
96 'effectiveRange': '15 KM'
97 },
98 {
99 'lat':24.999, 'lng':79.499, //Bundelkhand
100 'stnName': 'Radio Bundelkhand (CR)',
101 'freq': '91.1 MHz',
102 'power': '10KW',
103 'distName': 'Bundelkhand',
104 'owner':'Unknown',
105 'content':'content is downloaded from internet',
106 'licenseType': 'CR',
107 'licenseCost': '120000000 INR',
108 'licenseRange': '100 KM',
109 'url':'#/station/rbk',
110 'effectiveRange': '35 KM'
111 },
112 {
113 'lat':29.470, 'lng':79.647,
114 'stnName': 'Radio Kumaonvani',
115 'freq': '',
116 'power': '10KW',
117 'distName': 'Mukteswar',
118 'owner':'',
119 'content':'Bollywod movie songs',
120 'licenseType': 'CR',
121 'licenseCost': '1 Crore',
122 'licenseRange': '100 KM',
123 'url':'#/station/kmv',
124 'effectiveRange': '70 KM'
125 }
126];
119127var list_of_fm_stations = [
120128 {
121129 "S No.": "1",
21532153 return this._div;
21542154};
21552155
2156info.policyExplain = function(rating) {
2157 var explain = '';
2158 switch(rating) {
2159 case 0: ;
2160 case 1: ;
2161 case 2: explain = 'Strict policy';
2162 break;
2163 case 2.5: ;
2164 case 3: explain = 'Moderate policy';
2165 break;
2166 case 4: ;
2167 case 5: explain = 'Favourable policy';
2168 break;
2169 default: explain: '';
2170 break;
2171 }
2172 return explain;
2173};
2174
21562175// method that we will use to update the control based on feature properties passed
21572176info.update = function (props) {
2158 this._div.innerHTML = '<h4>Community radio</h4>' + (props ?
2159 '<b>' + props.name + '</b><br />' + props.rating + '/5'
2160 : 'Hover over a country');
2177 var text = (props) ?
2178 '<p><b>' + props.name + '</b> : <span class="yellow">' + props.rating + '</span>'+
2179 ' / <span class="red">5</span> <small> &gt;&gt; ' +
2180 info.policyExplain(props.rating) + '</small></p>'
2181 : 'Hover over a country';
2182 this._div.innerHTML = '<p><b>Comparison of Community Radio polices</b></p>' + text;
21612183};
21622184
21632185 info.addTo(map);