<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marko Smiljanic</title>
    <description>The latest articles on DEV Community by Marko Smiljanic (@markosmilja).</description>
    <link>https://dev.to/markosmilja</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F83119%2Fb72b1f64-386d-4fed-be24-17f3c9faec8c.jpg</url>
      <title>DEV Community: Marko Smiljanic</title>
      <link>https://dev.to/markosmilja</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/markosmilja"/>
    <language>en</language>
    <item>
      <title>Beyond Marker Clustering</title>
      <dc:creator>Marko Smiljanic</dc:creator>
      <pubDate>Thu, 16 Apr 2026 13:16:31 +0000</pubDate>
      <link>https://dev.to/markosmilja/beyond-marker-clustering-1jmj</link>
      <guid>https://dev.to/markosmilja/beyond-marker-clustering-1jmj</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Say you have a map with with lots of map markers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxosnhy4vpoe4kl63r24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxosnhy4vpoe4kl63r24.png" alt="A map with lots of markers" width="768" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The map is slow and cluttered. How would you solve this the standard way? Most map providers include a clustering feature that gets you the following result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozneemvtnpnrf7kfjc0h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozneemvtnpnrf7kfjc0h.png" alt="A map with marker clusters" width="768" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While clustering solved the problem of lag and overlap when using using a large number of densely placed markers on a map, it created a massive UX problem. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clustering hides your data.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;It forces users to click blindly, hoping the blob they are expanding actually contains what they are looking for. It sacrifices geographical and contextual precision for the sake of performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  A better way
&lt;/h2&gt;

&lt;p&gt;I’ve been building &lt;a href="https://arenarium.dev/" rel="noopener noreferrer"&gt;arenarium/maps&lt;/a&gt;, a library that overcomes the clustering problems by focusing on the core problem - &lt;strong&gt;overlapping markers&lt;/strong&gt;. It does this by computing the optimal state for each marker based on a user provider rank. State consist of a zoom to reveal a marker and angles to point the marker based on zoom. The result is that each marker is optimally positioned to maximize clarity and information density.&lt;/p&gt;

&lt;p&gt;Lets examine a similar issue as before but solve with a better way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7hz6e540wcbjbln19cu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7hz6e540wcbjbln19cu.png" alt="arenarium/maps unmanaged markers" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Managing the same markers with arenarium/maps we get:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5bw9u7eg57w3wsyi4ss5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5bw9u7eg57w3wsyi4ss5.png" alt="arenarium/maps managed markers" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By avoiding clustering, we maintain &lt;strong&gt;spatial integrity&lt;/strong&gt;. If a marker represents a specific building or an event, it stays on that coordinate. There is no merging or snapping. This leads to a more elegant, professional, and ultimately more useful map interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  The structure of a marker
&lt;/h2&gt;

&lt;p&gt;As the user moves around the map, markers transition between three states based on zoom and priority:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Pin:&lt;/strong&gt; The background layer. It is meant to be a round element that represent the basic information about a marker using colors or icons. these provide a heat-map feel without cluttering the view.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Tooltip:&lt;/strong&gt; The primary layer. These are revealed based on rank when space allows. They contain the basic information that is always visible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Popup:&lt;/strong&gt; The extended layer. These are shown when a user clicks on a tooltip. They contain additional information that would make a tooltip too large such as images.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tkiyytyyq07qf617rbv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tkiyytyyq07qf617rbv.gif" alt="arenarium/maps managed markers gif" width="560" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a short gif showcasing a more complex markers. A user moves around a map viewing the markers and click on some of them for more information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provider compatibility
&lt;/h2&gt;

&lt;p&gt;The tool is built to be a plug-and-play solution regardless of your mapping provider. The architecture is split into two core parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;The Core Library (&lt;code&gt;@arenarium/maps&lt;/code&gt;):&lt;/strong&gt; The npm package that manages state logic and coordinates with the optimization compute API.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Integration Packages:&lt;/strong&gt; The npm packages that serve as an abstraction layer for &lt;strong&gt;Google Maps, Mapbox, and MapLibre&lt;/strong&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Check it out
&lt;/h2&gt;

&lt;p&gt;The website with live demos and full documentation is at &lt;a href="https://arenarium.dev/" rel="noopener noreferrer"&gt;arenarium.dev&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;What’s your biggest frustration with standard map markers or clustering? Let's talk in the comments.&lt;/p&gt;

&lt;p&gt;&lt;small&gt;Images at top of article provided by &lt;a href="https://blog.batchgeo.com/map-clustering-demo-tutorial/" rel="noopener noreferrer"&gt;source&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>maps</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
