Skip to main content

Introduction

This guide is aimed at experienced Dynamics 365 consultants and shows how to tweak the Custom.js file to listen to layers being toggled and will automatically enable given sublayers. It is assumed that readers have a knowledge of JavaScript and experience configuring Maptaskr. This guide should be read in conjunction with the Custom.JS guide which provides detailed step-by-step instructions on how to integrate Custom.JS with Maptaskr.

Maptaskr has a setting that enables functionality to turn on all sub layers upon turning on the layer (more information here: Enable Sub-Layer Selection). This setting works on a global level meaning that every single layer that gets turned on will have all sub layers automatically enabled. This can have a significant performance impact when dealing with large data sets.

This guide demonstrates a method of imitating this functionality on a per-layer basis with a very small code footprint.

warning

Please note that this tutorial has been written to suit the functionality and capability of Maptaskr v2.2.2.58 and above.

If you are using an older version of Maptaskr, then this guide will not be applicable and you will be required to upgrade to the latest version.