Topics I write about


Recent posts

JavaScript Mapping API Size Comparison

New Blog


JavaScript Mapping API Size Comparison


As a huge web map performance nerd, when I come across a new web map I usually fire up my browser’s DevTools and check out the network tab during a hard reload. I think many web maps, especially those made with esri’s WebApp Builder or ArcGIS Online, are bloated messes. These services are fine for non-essential, quick and dirty web maps, but in my opinion have become over-utilized in the GIS community as a drop-in replacement for purpose-built APIs. I thought it would be interesting to compare hello world package sizes of common web mapping APIs to give myself visibility to the relative impact of mapping API dependencies. Disclaimer, these sizes were measured by me installing a hello world for each library locally on the publish date, so there are no guarantees of ongoing accuracy. ArcGIS Online was measured as average bundle size via network requests.

API gzipped build size in kb uncompressed build size in kb
OpenLayers 5 106.12 377.58
Leaflet 75.41 234.3
ArcGIS-JS 4.8 198.1 1,133
MapBox-GL 199.43 754.94
WebApp Builder 5,340 16,440
ArcGIS Online 4,004 15,480

Overall I personally recommend Leaflet for simple locator maps, OpenLayers for web apps that mimic traditional desktop GIS functionality, and MapBox GL for larger applications that prioritize visualization quality first and foremost. Personally I have a really hard time seeing the niche for the ArcGIS-JS API given its size and vendor lock-in, unless you absolutely need some of its specific features for your application to run. That being said, I firmly believe any of these libraries are a fantastic choice over a WebApp Builder or ArcGIS Online map in virtually every scenario.

In general I think most GIS managers and coordinators should take a good hard look at their web map offerings and run some real benchmarking tests to see just how heavy their applications are. Every time I use a WebApp Builder or ArcGIS Online map I get frustrated by how ugly and slow these apps are in order to facilitate the quick turnaround time. I once interviewed with a company that had decided to cease all truly custom web map development and only produce lightly customized WebApp Builder maps. Their argument was that fully customized applications are more difficult to maintain and WebApp Builder apps can do most things that they want. I think this mindset leads to junk products that have already lost a large portion of their users to long initial load times.