MapQuest, Leaflet + Angular.js

6 posts / 0 new
Last post
MapQuest, Leaflet + Angular.js


We have a project that uses angular with leaflet, (ui-leaflet angular directive) it is not so straight forward to use the mapQuest plugins together with angular leaflet directive.

Has anyone done any work with this? We are having trouble getting a single layers object with base layers and overlays to comply with the mapQuest plugin.

Any suggestions?



There are angular plugins out
There are angular plugins out there they may help. Here is one with samples.

UI-leaflet & Mapquest don't play nice.

Hi Brian,

Thanks for the reply. We are already using those plugins that is the ui-leaflet directive that the angular team has forked from tombatossals. We are way down the road with angular and leaflet, we have done a ton of integration with it. we now want to use mapquest, but the automagic setup of layers doesn't play nice with the way the angular directive works with layers.

The plugin was definitely not
The plugin was definitely not built with angular in mind. But if you could post a sample url where we can see how it's not working we may be able to take a look.

angular layer integration

basically I'm trying to use the layers object defined as

 layers: {
        baselayers: {
          osm: {
            name: 'Open Street Map',
            url: 'https://{s}{z}/{x}/{y}.png',
            type: 'xyz',
        overlays: {
          alerts: {
            name: "Alerts",
            type: "markercluster",
            visible: true


then extended with the mq layers.

and an overlays object with alerts that I add markers to.


Sheesh, sorry I missed this.
Sheesh, sorry I missed this. But it appears to be working. I can see the MapQuest layers in the second map.