Error on Attribution control

4 posts / 0 new
Last post
facugon
Error on Attribution control

Hello , 

I'm using your plugin in an application which already handle google and openstreetmaps base layers.

We offer a feature that allows users to switch between each , and we handle de attributionControl in an specific manner.

After correctly initializing the map and the base layers , this error is happening switching from MapQuest base layer to any other

  1. Uncaught TypeError: Cannot read property 'removeFrom' of undefined
    1. MQ.TileLayer.L.TileLayer.extend.onRemove
      @
      mq-map.js?key=KEY

      L.Map.L.Class.extend.removeLayer
      @
      leaflet-src.js:1695

if you go inside the compressed code of your plugin, it seems this is producing the error 

(...) D.mapquest.logo.removeFrom(D);D.mapquest.attributionControl.removeFrom(D); (...)

which is absolutly true, because in the way we initialize the attribution control, the image is not present.

this is the code we are using to initialize the map and the attribution control

    this.map = new L.Map(el,{
      zoomControl: false,
      attributionControl: false
    }); 
    L.control.attribution({ position: 'topleft' }).addTo(this.map);

creating the attribution control this way the image is not included. hence the mapquest.logo is undefined. we are included the attribution with the copyright information , but we dont want any image.

do you think you could fix this issue in the near time? we are thinking on contracting your service, to get access to your satellital base layers, which by the way are of very good quality,

thanks very much!


MQBrianCoakley
Removal of the logo is
Removal of the logo is against the Terms & Conditions. It may be permissable after consulting an account manager. You can contact one using the Contacst Us link in the upper right.

facugon
ok , I got it. The Logo stay

ok , I got it. The Logo stay then.

thanks


MQBrianCoakley
You're welcome. Let us know
You're welcome. Let us know if you have any other questions.