Drupal Google Maps clustering of nodes. I am trying to find a way I can cluster nodes on a Google Map from a custom entity according to particular regions in a country. I have been using the Geocoder module to geocode addresses but I now want to group these addresses into regional clusters. I need a way I can implement Google Map clustering in Drupal 8.

If there is a way to do it programtically please do not hesitate to illustrate.
In order to cluster your map pins/node results, you'll need to write your own javascript function to call the Google Maps Clustering Library/initialize the map (since as of Feb 23, 2018, the GMap module has yet to be fully ported/available for D8).

Based on Google's Marker Clustering Documentation/Example, I'd recommend creating a custom module that includes:


The Google Maps Marker Clusterer js library. 
Setting up a json endpoint/route for the location nodes/entities
Custom module javascript that loads the nodes from the endpoint above and parses them (their latitude &amp; longitude data) for the locations array in the init_map function.


Worth noting:
The Google Maps clustering library is grid-based, dividing the map into squares of a certain size. 

If you want regions bounded by state/provincial borders, this library won't satisfy the zoomed out map with multiple regions; you'll need something more custom. In such a case, you can:


add a taxonomy for the regions (with a custom set of geocoordinates for the center or political capital of each region) 
load a custom high level map with the regions defined/outlined with svg polygon paths and displaying custom cluster pins
on each specific regional map utilize the grid-based clustering library