Attribution control

4 posts / 0 new
Last post
coolfool007
Attribution control

I'm using your leaflet plug in and am running into two (related) issues:

1. the url for the script I'm loading is http://www.mapquestapi.com/sdk/leaflet/v2.s/mq-map.js?key=[keyremoved], and recently (in the past few days) some things stopped working without any changes on my end. Did you guys release a new version of the plugin and does the above link mean "use the newest version available"?  If so, how can I target the specific older version?  I need to be sure that your underlying plugin code is not changing from under me because your new code has not been quality assurance tested by my company (and in this case, it would have broken on a production system).

2. The specific issue I noticed in #1 is that we have to hook the attribution links that you guys add because the map is being hosted in an iframe, so we have to catch the click, pass it to the main page, and then have the main page navigate to it.  This would be fine and dandy but it looks like you do not use the attribution control that leaflet creates, so when I go to look for your attribution links they aren't there:

<div class="leaflet-bottom leaflet-right">

    <div class="mq-attribution-control leaflet-control">
        ©2016&nbsp;MapQuest,&nbsp;<a href="http://hello.mapquest.com/attributions-mapbox">© Mapbox</a>,&nbsp;© TomTom | <a class="termsLink" id="terms" href="http://hello.mapquest.com/terms-of-use" target="_blank">Terms</a>
    </div>
    <div class="leaflet-control-attribution leaflet-control"></div>
</div>

the ".leaflet-control-attribution" element is what is returned by the leaflet API map.attributionControl.getContainer(), but you add your own control ".mq-attribution-control" to house your attribution links, which makes it really gross to support multiple sources for map tiles. I should be able to call map.attributionControl.getContainer() and get the control that holds your attribution links.

Like I said, this used to work just fine, but stopped working in the past few days.  For reference, I'm using leaflet 0.7.5. Please advise.


MQBrianCoakley
When using the .s in the url,
When using the .s in the url, the latest subversion will be used. This was updated on Tuesday morning. To follow a specific version you can use the full version number, like v2.1. This will keep you on the tested version until the newest version can be verified and the url updated.   The attribution control is an enhancement request I've forwarded on to the development team. Thanks for the information.

coolfool007
Thank you for your quick

Thank you for your quick reply.  

It'd be great if you could update your documentation to reflect that you can point to a specific version.  The previous examples used "2.s" and I see that the current example uses "2.2".  Maybe even link to a page where you list out the versions and what changed in them.

Also, I will ask that you treat the attribution control as a bug rather than an enhancement. It is positioned correctly in v2.1, and incorrectly in v2.2.  The incorrect placement makes it very hard to code against leaflet in a vendor agnostic manner, which is kind of the whole point of leaflet.


MQBrianCoakley
I will forward the suggestion
I will forward the suggestion about the version on to the product team. It used to explain that long ago.   The version release notes can be found on the main plugin user guide page here.   I forwarded your categorization distinction on to the development team to prioritize.   Thanks again for the information and suggestions.