-
Notifications
You must be signed in to change notification settings - Fork 57
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
Issue #158 #202
Issue #158 #202
Conversation
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.
@sdthaker thanks for opening this up. Unfortunately the issue didn't have a lot of good information about the proper resolution of the issue. The main missing detail is that apiKey
/token
is an optional parameter and not all services will require it.
If you want to take a stab at this then the proper way to resolve this would be to check for an error message if a request with an apiKey
/token
fails and then we could prompt the user that their provided apiKey
/token
property might be invalid or missing.
So should I revert back the code that I changed for all the test cases in |
@sdthaker I would probably start by reverting all changes you have made so far (sorry) and adding a check on these lines https://github.com/Esri/esri-leaflet-vector/blob/master/src/VectorTileLayer.js#L62-L67 when there is an error loading the style add the error messages there. You'll need to test lots of different scenarios with an invalid token (just any random string) to make sure you catch all the different error messages since each of these scenarios will produce different error messages:
|
After adding a console.log for the error variable, above line 62, building the static HTML files and opening each of them on the browser, I always see the error being printed as either undefined or null on the browser console. Am I testing this right? For some of the files, the error is not printed at all since I believe the execution of the script is halted somewhere before the code execution reaches L62-L67 since it shows some other error regarding this #102 |
I've added a I apologize, I'm quite new to this project so everything is haywire for me right now, still trying to make sense of what's the purpose of this project, what the classes in the src directory do, how everything is connected together etc, etc. Thanks! @patrickarlt |
Hi, please provide an update on this PR, whether it needs anything else to be added or if it's good to be merged! Thanks! |
Changes Made:
src/VectorTileLayer.js
when api key or token is not provided.spec/VectorTileLayerSpec.js
to pass api key or token so that test cases can pass, as discussed here.Testing
npm test
, passed all tests,/examples
by opening them onto the browser, to make sure the error is shown to the user on the console, as discussed here.Issue
Additional Notes
Please let me know if there are any other changes that are to be made as part of the PR. I might've missed something considering I'm quite new to this repo and open-source development in general. Thanks!