Draft Pull Request - Web Map Core Issue #48: Expose an Option of the Map: Zoom in/out button #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Issue and Fix
This pull request was created to assist in the following issue on the web map core section. Issue #48 Expose an Option of the Map: Zoom in/out button. #48.
It offers a possible solution on what can be done to improve the situation. The zoom in/out button for the treetracker web map is situated at the bottom right corner, the zoom feature needs to be exposed as an option of the map. The reason for this issue is that for the zoom feature, the element will fade out when being used by users.
Code
This code can be configured to the web map repository so that it may allow the zoom feature to be exposed. There are two different calls used which are the expose and mask feature. The expose method takes all elements (returned by selector) and any jQuery selectors and are placed on top of the mask. The mask is loaded right after the expose/mask call. Furthermore, an existing element can be used as a mask. This code snippet was taken from the following website: https://jquerytools.github.io/documentation/toolbox/expose.html.
// place a white mask over page
$(document).mask();
// places the custom colored mask over page
$(document).mask("#789");
// place non-closable mask (on zoom element)
$(document).mask{ closeOnEsc: false, closeOnClick: false });
// places the mask but let selected zoom element show through (be exposed)
$("div.to_be_exposed").expose();
// closes the mask
$.mask.close();