Commit a3e622fe9b58e7b4409e3f2e9ab36f1aea931a25
- Diff rendering mode:
- inline
- side by side
mouchak/static/css/map.css
(8 / 2)
  | |||
1 | 1 | #map{ | |
2 | width:1000px; | ||
3 | height:500px; | ||
2 | width: 1000px; | ||
3 | height: 500px; | ||
4 | 4 | margin-top: 30px; | |
5 | 5 | position: relative; | |
6 | 6 | } | |
… | … | ||
26 | 26 | float: left; | |
27 | 27 | margin-right: 8px; | |
28 | 28 | opacity: 0.7; | |
29 | } | ||
30 | .yellow { | ||
31 | color: #cead00; | ||
32 | } | ||
33 | .red { | ||
34 | color: #FF0000; | ||
29 | 35 | } |
mouchak/static/js/map.js
(84 / 54)
  | |||
12 | 12 | //Using a empty geojson object to instantiate the geojson layer | |
13 | 13 | var empty_geojson = {"type":"FeatureCollection","features":[]}; | |
14 | 14 | function highlightFeature(e) { | |
15 | console.log(e.target); | ||
15 | //console.log(e.target); | ||
16 | 16 | ||
17 | 17 | var layer = e.target; | |
18 | 18 | ||
… | … | ||
66 | 66 | var map = L.map('map').setView([12.9725, 77.58443],4); | |
67 | 67 | world_map.addTo(map); | |
68 | 68 | india_map.addTo(map); | |
69 | var 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 | }; | ||
69 | var 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 | ]; | ||
119 | 127 | var list_of_fm_stations = [ | |
120 | 128 | { | |
121 | 129 | "S No.": "1", | |
… | … | ||
2153 | 2153 | return this._div; | |
2154 | 2154 | }; | |
2155 | 2155 | ||
2156 | info.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 | |||
2156 | 2175 | // method that we will use to update the control based on feature properties passed | |
2157 | 2176 | info.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> >> ' + | ||
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; | ||
2161 | 2183 | }; | |
2162 | 2184 | ||
2163 | 2185 | info.addTo(map); |