Report Map

Visualisation: Spiderfier

This map shows the pins but if they are very close or overlapping, when the user clicks on the cluster it spreads them out ("spiderfies" them) with lines tracking them back to their original position. The user can then click the individual pins to get info about them.

Uses https://github.com/jawj/OverlappingMarkerSpiderfier.

By default the plugin uses a function to format the pins so that they look different if they are spiderfied or not. To modify the formatting you can provide your own marker formatting function and specify it in the JavaScript Initialization Code attribute.

This page uses a custom one specified in the page's Function and Global Variable Declaration: var spiderfyFormat = function(marker, status) { var iconURL = status == OverlappingMarkerSpiderfier.markerStatus.SPIDERFIED ? 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-waypoint-blue.png' : 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-poi.png'; apex.debug("spiderfy.format", marker, status, iconURL); marker.setIcon({url: iconURL}); };

The plugin's JavaScript Initialization Code has: this.options.spiderfyFormatFn = spiderfyFormat;