- Timestamp:
- 2019-07-02T21:09:46+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js
r33289 r33290 437 437 } 438 438 439 // In order for fitBounds to work out a non-zero bounds, have to use visibility, not display when hiding/showing the map. 439 // Refer to https://developers.google.com/maps/documentation/javascript/reference/map#Map.fitBounds 440 // In order for fitBounds() to work out a non-zero bounds, have to use visibility, not display when hiding/showing the map. 440 441 // AND should not set height to 0px when using visibility hidden. But not setting height to 0 means an invisible map takes up space. 441 442 // In order for the resulting invisible map, that still takes up space, to not break the flow of the visible items 442 443 // on the page, need to swap map between position relative when map visible versus position absolute when the map is hidden. 443 // https://developers.google.com/maps/documentation/javascript/reference/map#Map.fitBounds444 444 function showMap(callingFunction) { 445 445 … … 904 904 showMap("httpMapBrowseRequest"); 905 905 906 //var jsonNodesStr = "";907 906 for(var i = 0; i < jsonNodes.length; i++) 908 907 { … … 911 910 _docList.ids.push(doc.nodeID); 912 911 913 //$("#div"+doc.nodeID).attr("data-gps-map-json", JSON.stringify(jsonNodes[i]));914 //jsonNodesStr += JSON.stringify(jsonNodes[i]); // can't do this after createOverlayItems, as we get cyclical ref error915 912 var options = { 916 913 "mainDoc": true // TODO: should this be true or false???
Note:
See TracChangeset
for help on using the changeset viewer.