Create MarkerCluster dinamically

Hello,

I am creating a component to draw dinamically different markers in a map. I need to implements markerClustering too but it doesn't works. Can somebody help me? An example?

I paste the method to create dinamically the markers:

addMarker(latitudelongitudeindex) {
   let layerIndexnumber = 1;
   let markerMarkerSettingsModel[];
   let dynamicMarkerMarkerSettingsModel[] = this.maps.layersCollection[layerIndex].markerSettings;
   dynamicMarker.push(new MarkerSettings(this.maps'markerSettings'marker));
   let markerIndexnumber = dynamicMarker.length - 1;
   dynamicMarker[markerIndex].visible = true;
   dynamicMarker[markerIndex].dataSource = [
       { latitude: latitudelongitude: longitudename: 'dynamicmarker'id: index }
   ];
   dynamicMarker[markerIndex].template = '<div style="cursor:pointer; height:8px;width:8px;border-radius: 8px 8px; background-color:red; border:2px solid gray;"></div>';
   dynamicMarker[markerIndex].tooltipSettings =  { visible: truetemplate:`<div>Maquina:${index}</div>` };
  }

And I paste the main configuration of the layer

  public layersany[] = [
    {
      layerType: 'OSM',
    },
    {
      shapeData: barriosMadrid,
      type: 'SubLayer',
      animationDuration: 0,
      visible: true,
      shapeSettings: {
        fill: 'rgba(141, 206, 255, 0.3)',
        border: {
          color: '#1a9cff',
          width: 1
        }
      }
    },
  ];

7 Replies 1 reply marked as answer

SM Sharmi Murugan Syncfusion Team August 25, 2020 08:05 PM UTC

Hi Sergio, 
  
Thank you for contacting Syncfusion support. 
  
We are facing some difficulties when adding markers in the map with the provided code snippet by enabling the marker cluster feature. However, we will analyze and update you with further details on August 27, 2020. 
  
Regards, 
Sharmi. 



SM Sharmi Murugan Syncfusion Team August 27, 2020 07:27 PM UTC

Hi Sergio, 
  
Sorry for the inconvenience caused. 
  
We are tried to dynamically render the markers with marker cluster feature enabled. We are facing a issue when the cluster is rendered initially. The position of the marker cluster is not proper initially. When we perform zooming, the clusters are rendered properly. However, we are analyzing this issue further and update you with further details on August 31, 2020. 
  
Regards, 
Sharmi. 



SC Sergio cortes blanquez August 28, 2020 07:09 AM UTC

Ok, thanks!



SB Swetha Babu Syncfusion Team August 31, 2020 12:48 PM UTC

Hi Sergio,

Thank you for your update.

Most Welcome! Please let us know if you need further assistance.

Regards,
Swetha 



SB Swetha Babu Syncfusion Team September 1, 2020 04:04 PM UTC

Hi Sergio,

Thank you for your patience.

We have confirmed the reported issue as a bug and logged a defect report for the same. We will include this fix in our 2020 Volume 4 release which is expected by the end of September 2020.

Regards,
Swetha Babu


IR Indumathi Ravi Syncfusion Team September 2, 2020 07:12 PM UTC


Hi Sergio,


Sorry for the inconvenience caused.

We have confirmed the reported issue as a bug and logged a defect report for the same. We will include this fix in our 2020 Volume 3 release which is expected by the end of September 2020.

Regards, 
Indumathi R



SB Swetha Babu Syncfusion Team October 6, 2020 03:59 PM UTC

Hi Sergio,

Thank you for your patience.

We have included the fix for the reported issue of "Adding the Marker Cluster dynamically" in our Essential Studio Volume 3 Main Release(v18.3.0.35) which is rolled out and is available for download under the following link.

https://www.syncfusion.com/forums/158306/essential-studio-2020-volume-3-release-v18-3-0-35-is-available-for-download

We thank you for your support and appreciate your patience in waiting for our release. Please let us know if you need any further assistance.

Regards,
Swetha Babu


Marked as answer
Loader.
Up arrow icon