Commit a432a205c08d9f76af00bd789ac7c12e87ecadce

  • avatar
  • arvind
  • Wed Sep 11 23:56:25 IST 2013
Fixing map code.  Info on the worldmap comes in a popup over hover.
  
2222 dashArray: '',
2323 fillOpacity: 0.7
2424 });
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> &gt;&gt; ' +
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>&gt;&gt; "+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);
2635 if (!L.Browser.ie && !L.Browser.opera) {
2736 layer.bringToFront();
2837 }
4242 info.update();
4343}
4444
45function zoomToFeature(e) {
45 function zoomToFeature(e, feature) {
4646 map.fitBounds(e.target.getBounds());
47 L.popup()
48 .setLatLng(e.latlng)
49 .setContent(e.target.feature.properties.name)
50 .openOn(map);
4751}
4852
4953function onEachFeature(feature, layer) {
9191 'licenseType': 'CR',
9292 'licenseCost': '120000000 INR',
9393 'licenseRange': '100 KM',
94 'url':'#/station/gka',
94 'url':'#/survey/gka',
9595 'effectiveRange': '15 KM'
9696 },
9797 {
105105 'licenseType': 'CR',
106106 'licenseCost': '120000000 INR',
107107 'licenseRange': '100 KM',
108 'url':'#/station/llv',
108 'url':'#/survey/llv',
109109 'effectiveRange': '15 KM'
110110 },
111111 {
119119 'licenseType': 'CR',
120120 'licenseCost': '120000000 INR',
121121 'licenseRange': '100 KM',
122 'url':'#/station/rbk',
122 'url':'#/survey/rbk',
123123 'effectiveRange': '35 KM'
124124 },
125125 {
133133 'licenseType': 'CR',
134134 'licenseCost': '1 Crore',
135135 'licenseRange': '100 KM',
136 'url':'#/station/kmv',
136 'url':'#/survey/kmv',
137137 'effectiveRange': '70 KM'
138138 }
139139];