- Timestamp:
- 2019-06-24T16:41:04+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js
r33187 r33217 35 35 { 36 36 mapEnabled = true; 37 var resultsArea = $('#resultsArea'); 38 if (resultsArea.length > 0){ 39 resultsArea.css('min-height','500px'); 40 } 37 41 for(var i = 0; i < jsonNodes.length; i++) 38 42 { … … 167 171 { 168 172 lngDelta = (1 / Math.pow(10, i)); 173 // Want the grid superimposed on the map to be 5 or fewer steps, 174 // where delta is the grid size to make it so 175 // and precision is the number of decimal places. 169 176 if((lngDistance / lngDelta) <= 5 || lngDelta == 1) 170 177 { … … 172 179 break; 173 180 } 174 } 175 181 } 182 176 183 if(latDelta == 0.1){latDelta = 1; latPrecision = 0; } 177 184 if(lngDelta == 0.1){lngDelta = 1; lngPrecision = 0; } 185 186 187 // Want consistent precision for both lat and lng. 188 // So we choose the most conservative (whichever is more zoomed out) for both 189 if(latPrecision < lngPrecision) { 190 lngPrecision = latPrecision; 191 } else if (lngPrecision < latPrecision) { 192 latPrecision = lngPrecision; 193 } 178 194 179 195 /* … … 778 794 } 779 795 780 function getSubClassifier(sectionID) 781 { 796 function httpMapBrowseRequest(sectionID) 797 { 798 // Make ajax call to retrieve jsonNodes for section ID, and draw shapes on the map. 782 799 var url = gs.xsltParams.library_name + "?a=b&rt=s&s=ClassifierBrowse&c=" + gs.cgiParams.c + "&cl=" + sectionID + "&excerptid=jsonNodes"; 783 800 $.ajax(url)
Note:
See TracChangeset
for help on using the changeset viewer.