-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic layer using both f:image and token #1182
Conversation
first you write the tests... plenty of ways to skin a cat, but one would be for @jwasilgeo to PR against this branch and then merge this one to |
Thanks for starting up this testing effort, @gavinr. Much appreciated. I have pushed 4b84d4c which gets your new tests and all tests to pass. This is the same change I described here for
|
there's just one problem. @gavinr only wrote tests for the token. if you want to remove the override entirely you'd need to get the test below passing too, but I still recommend doing that in a follow up PR. it('should be able to pass a request for a direct image through a proxy', function () {
layer = L.esri.dynamicMapLayer({
url: url,
f: 'image',
proxy: './proxy.ashx'
});
var spy = sinon.spy(layer, '_renderImage');
layer.addTo(map);
expect(spy.getCall(0).args[0]).to.match(new RegExp(/\.\/proxy.ashx\?http:\/\/services.arcgis.com\/mock\/arcgis\/rest\/services\/MockMapService\/MapServer\/export\?bbox=-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+%2C-?\d+\.\d+&size=500%2C500&dpi=96&format=png24&transparent=true&bboxSR=3857&imageSR=3857&f=image/));
}); |
@jgravois thanks for the updated info in your comment, that helps clarify a few things after temporarily trying out your test snippet. |
@jgravois @gavinr please take another look when you can. The I plan to deal with adding a test(s) and adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@jgravois @gavinr while looking ahead to the future work I mentioned just above, I re-remembered that The changes proposed in this PR, for |
that is an improvement that would be better tackled in its own PR. if you're stuck on it, I've found that just commenting out the test and explaining where you're at in a draft PR is a good way to frame the discussion. |
That's a good plan to me, @jgravois. Thanks again for taking the time to talk this through with us. Otherwise are you both still feeling good about this PR as it is? |
Dynamic layer using both f:image and token
Dynamic layer using both f:image and token
This contains a few additional test cases, one of which is failing, illustrating the issue in #1180 .... I think :)
@jptheripper @jwasilgeo @jgravois do you think this covers the issue in #1180?