Mapbox GL JS vs. Mapbox.js

As far as i know, Mapbox GL JS is going to be the replacement for the current Mapbox JS which uses Leaflet in the background. A lot of things Leaflet does, GL can do too and more. But not everything. The same goes vice versa. GL can do things Leaflet can’t do. The big thing in GL is that it’s built around vector tiles using WebGL. From the introduction article:

Announcing Mapbox GL JS — a fast and powerful new system for web maps. Mapbox GL JS is a client-side renderer, so it uses JavaScript and WebGL to dynamically draw data with the speed and smoothness of a video game. Instead of fixing styles and zoom levels at the server level, Mapbox GL puts power in JavaScript, allowing for dynamic styling and freeform interactivity. Vector maps are the next evolution, and we’re excited to see what developers build with this framework.

If you really want a side by side comparison of the two, I’m sorry there is none as far as I know. There are too many things to mention/consider when making a comparison so it’s best you do such a thing by yourself based upon your own requirements. A good start would be comparing the examples for each framework because it gives a good idea of what both can do:

  • https://www.mapbox.com/mapbox-gl-js/examples/
  • https://www.mapbox.com/mapbox.js/example/v1.0.0/

After that you could compare their API’s:

  • https://www.mapbox.com/mapbox-gl-js/api/
  • https://www.mapbox.com/mapbox.js/api/v2.2.4/

One thing to keep in mind is that GL is brand spanking new and as we developers all know that comes with a price. Some kinks haven’t been ironed out. As for Leaflet, it’s very mature, widely used and very well tested/proven. If you’d like to take a peek at what problems there are currently with GL you could take a look at the issues over at Github, in the repository:

  • https://github.com/mapbox/mapbox-gl-js/issues

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)