Google Maps API, OpenLayers, Leaflet and Mapbox.

They seem to ultimately do the same thing, each with their own side dishes.

Leaflet and OL (haven't really looked into mapbox yet) for example seem to provide some visual candy that google does not (i.e. animations along a path comes to mind), while the Google API can of course rely on google's services (geocoding, elevation).

Does a major reason, technical or otherwise, come to mind to avoid using them all at once ?

(some points that led to the question: coordinates are coordinates; the code that interacts with the libraries is my js anyway; I already manage my arrays - markers, shapes, overlays - separately, because I do other things with them too)

Edit :: the question is deemed to be too broad, but as the answer I was looking for is pretty much yes or no, save any additional info the answerer may select to provide, I am not sure how to narrow it down.

Obviously the different libraries can coexist, to what extent I cannot yet personally say; I am asking if they canNOT coexist due to some famously known issue that is known to everyone but me (as the latest arrival).

In this context, "No, it's fine", "No, save that OL wants to own the map", or "Yes, if you turn your back 2 minutes Leaflet will give Mapbox a wedgie" seem to me all fine answers. The key of all 3 being the boolean bit.

  • Many of the tools you listed perform overlapping tasks so you might want to (for example) only use Leaflet and not Mapbox.js or, if you use MapboxGL, not use Mapbox.js or Leaflet. Using different services from some of those providers is fine. For example, if you used a different Google APi to get elevation while you were using Leaflet to manage slippy tiles served up by Carto; that would be an example of using many services at once in a way that makes sense. – kuanb Aug 31 '17 at 19:07
  • The question arose when I saw that, in order to use google maps tiles as a layer in OL, you need to include the v3 api. That should mean you are then able to, for example, place and manage markers using v3's methods instead of OL's if you so wished. I am looking to ascertain if there are known ways they (the apis) just can't coexist. For example one may wish to exert exclusive control over the layers, one could hog #map or what have you. – deg Aug 31 '17 at 19:24

Browse other questions tagged or ask your own question.