Zoom level 24 is the max you can zoom in, note that a single pixel at that zoom level is about 1 cm. If your screenshot is at zoom level 24, I would estimate those three pins are within half a meter of each other. There is no way to keep the text from overlapping using unclustered points. When you use clustering and are seeing multiple overlapping circles using the bubble layer, that's because the clusterMaxZoom option of the data source defaults to level 18, which means that when you zoom in closer than level 18, it stops clustering. You can change this value in the data source options.
One approach you could take is to use clustering (with adjusted max zoom to 24) and aggregate the text labels using cluster properties. Then display the cluster using a symbol layer and display the aggregated text. For example, if your text is stored in the "name" property of your features, you could do something like this.
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Add references to the Azure Maps Map control JavaScript and CSS files. -->
<link href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.css" rel="stylesheet" />
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.js"></script>
<script>
var map, datasource;
var sampleData = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": { "name": "Pin 1"},
"geometry": {
"coordinates": [
-122.15607542906952,
47.574635735979626
],
"type": "Point"
}
},
{
"type": "Feature",
"properties": { "name": "Pin 2"},
"geometry": {
"coordinates": [
-122.07369712074322,
47.56878542872829
],
"type": "Point"
}
},
{
"type": "Feature",
"properties": { "name": "Pin 3"},
"geometry": {
"coordinates": [
-122.11271842468733,
47.54830420657862
],
"type": "Point"
}
},
{
"type": "Feature",
"properties": { "name": "Pin 4"},
"geometry": {
"coordinates": [
-122.06502571986704,
47.56293446792915
],
"type": "Point"
}
}
]
};
//Colors for each EntityType property in point data: [Gas Station, Grocery Store, Restaurant, School]
var entityTypes = ['Gas Station', 'Grocery Store', 'Restaurant', 'School'];
function GetMap() {
//Initialize a map instance.
map = new atlas.Map('myMap', {
view: 'Auto',
//Add authentication details for connecting to Azure Maps.
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: '[YOUR_AZURE_MAPS_KEY]'
}
});
map.events.add('ready', function () {
//Create a data source and add it to the map.
datasource = new atlas.source.DataSource(null, {
cluster: true,
clusterMaxZoom: 24,
clusterProperties: {
'name': ['concat', ['concat', ['get', 'name'], '\n']],
}
});
map.sources.add(datasource);
datasource.setShapes(sampleData);
map.layers.add(
new atlas.layer.SymbolLayer(datasource, null, {
textOptions: {
textField: ['get', 'name']
}
})
);
});
}
</script>
</head>
<body onload="GetMap()">
<div id="myMap" style="position:relative;width:100%;min-width:290px;height:600px;"></div>
</body>
</html>