trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
213 stars 74 forks source link

Fix mismatch in option names in R / JS code #123

Closed mz8i closed 6 years ago

mz8i commented 6 years ago

There is a discrepancy in option names for the Bing map tiles, which leads to the API key not being added to the URL R code sends apiKey and JS code accepts options.apikey (no camel-casing). I changed both to camel-casing since this seems to be more consistent.

schloerke commented 6 years ago

Hi @mz8i,

I'm giving leaflet.extras an update to leaflet 1.x.

Can you explain the apiKey issue a little more for me please? I can see that it sends lower case and retrieves lower case.

Thank you,

mz8i commented 6 years ago

@schloerke you are indeed correct, and sorry for that. I was apparently passing the parameter in the wrong format, and tried to quickly fix the problem, but rather than consult the documentation again, I essentially attempted to find the problem elsewhere. Funnily enough, my solution of modifying just the JS bindings worked, because the wrongly typed 'apiKey' got passed from R with the ellipsis (...) I am closing the PR and letting it be forgotten.