SOLVED - Double url encoding breaks some dynamic layers
Jelfff opened this issue · 3 comments
Describe the bug
When using dynamicLayers to restyle data each single quote is double encoded to %2527. As a result, the data does not display. This double encoding happens for data type esriSMS. It does not happen for data type esriSLS.
Here is an example of a call that is sent to the server. Note all the instances of %2527
The ArcGIS server sends back this message:
{"error":{"code":400,"message":"Missing 'source' in dynamic layer definition for 'id': -1.","details":[]}}
Expected behavior
If I decode the above call I get:
This call produces the desired result
Actual behavior
To Reproduce
This is my code attempting to restyle the data. You can see the call to the server on the console. The restyled data should appear when the map opens.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Information
- Version of Leaflet (
L.version
): 1.7.1 - Version of Esri Leaflet (
L.esri.VERSION
): 2.5.3 - Your OS: [e.g. iOS] windows 10 PC
- Browser and Version [e.g. chrome 80.0, safari 12.1.1] Firefox 86.0.1
Additional context
Add any other context about the problem here. If you're are not using the CDN, please note what loading/bundling library you are using (webpack, browserify, RequireJS)? I am hosting my own copy of leaflet 2.5.3
Hi, thanks for the report. When I click the link under "To Reproduce", I get an error page with no call to the server in the console - could you please provide a simplified replication case using JS Bin (or similar) so it's easy for us to see the code that's causing the problem? Thanks!
Ack! The "To reproduce" link was broken by github's url encoding. I will post something later today to demo the problem.
Oops! Problem is at my end. Sorry for false alarm!