Commit a432a205c08d9f76af00bd789ac7c12e87ecadce
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/map.js
(19 / 6)
  | |||
22 | 22 | dashArray: '', | |
23 | 23 | fillOpacity: 0.7 | |
24 | 24 | }); | |
25 | info.update(layer.feature.properties); | ||
25 | |||
26 | //'<p><b>' + props.name + '</b> : <span class="yellow">' + props.rating + '</span>'+ | ||
27 | // ' / <span class="red">5</span> <small> >> ' + | ||
28 | // info.policyExplain(props.rating) + '</small></p>' | ||
29 | L.popup() | ||
30 | .setLatLng(e.latlng) | ||
31 | .setContent("<b>"+e.target.feature.properties.name+"</b></br><span class='yellow'>"+e.target.feature.properties.rating+"</span>/<span class='red'>5</span><small>>> "+info.policyExplain(e.target.feature.properties.rating)+"</small></br><a href=#>Funding</a></br><a href=#>Policy</a>") | ||
32 | .openOn(map); | ||
33 | |||
34 | // info.update(layer.feature.properties); | ||
26 | 35 | if (!L.Browser.ie && !L.Browser.opera) { | |
27 | 36 | layer.bringToFront(); | |
28 | 37 | } | |
… | … | ||
42 | 42 | info.update(); | |
43 | 43 | } | |
44 | 44 | ||
45 | function zoomToFeature(e) { | ||
45 | function zoomToFeature(e, feature) { | ||
46 | 46 | map.fitBounds(e.target.getBounds()); | |
47 | L.popup() | ||
48 | .setLatLng(e.latlng) | ||
49 | .setContent(e.target.feature.properties.name) | ||
50 | .openOn(map); | ||
47 | 51 | } | |
48 | 52 | ||
49 | 53 | function onEachFeature(feature, layer) { | |
… | … | ||
91 | 91 | 'licenseType': 'CR', | |
92 | 92 | 'licenseCost': '120000000 INR', | |
93 | 93 | 'licenseRange': '100 KM', | |
94 | 'url':'#/station/gka', | ||
94 | 'url':'#/survey/gka', | ||
95 | 95 | 'effectiveRange': '15 KM' | |
96 | 96 | }, | |
97 | 97 | { | |
… | … | ||
105 | 105 | 'licenseType': 'CR', | |
106 | 106 | 'licenseCost': '120000000 INR', | |
107 | 107 | 'licenseRange': '100 KM', | |
108 | 'url':'#/station/llv', | ||
108 | 'url':'#/survey/llv', | ||
109 | 109 | 'effectiveRange': '15 KM' | |
110 | 110 | }, | |
111 | 111 | { | |
… | … | ||
119 | 119 | 'licenseType': 'CR', | |
120 | 120 | 'licenseCost': '120000000 INR', | |
121 | 121 | 'licenseRange': '100 KM', | |
122 | 'url':'#/station/rbk', | ||
122 | 'url':'#/survey/rbk', | ||
123 | 123 | 'effectiveRange': '35 KM' | |
124 | 124 | }, | |
125 | 125 | { | |
… | … | ||
133 | 133 | 'licenseType': 'CR', | |
134 | 134 | 'licenseCost': '1 Crore', | |
135 | 135 | 'licenseRange': '100 KM', | |
136 | 'url':'#/station/kmv', | ||
136 | 'url':'#/survey/kmv', | ||
137 | 137 | 'effectiveRange': '70 KM' | |
138 | 138 | } | |
139 | 139 | ]; |