-
Notifications
You must be signed in to change notification settings - Fork 799
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
Updating a Feature Layer with useCors: false causes syntax error for some services #1064
Comments
@ahalota I am also getting this error. However, I get some success if I set the isModern flag to false when adding the feature layer. Anyway, I've created a jsbin with your code and added the isModern: false so you can see what happens. |
why are you setting either way, you found a JSONP bug in ArcGIS Server that only affects myCallback({
// ...
"features": [
// ...
]
}); // response NOT wrapped in a callback
{
"type": "FeatureCollection",
"features": [
// ...
]
} the error is reproducible in 10.6, but not in ArcGIS Online hosted feature services the reason you don't see the problem in Esri Leaflet immediately is that we use |
Yes – will forward / discuss with the server devs |
At the time it hadn't allowed CORS from my host, the admin changed it for me, so I enabled it after that and just ignored the issue. |
thx @garymd210! |
not much more we can do in esri-leaflet. closing. |
I've seen this issue only show up with the layer published below. Did not get the same issue with the marker feature layer shown in the polygon. (Sorry, tried and failed to set up a jsfiddle for this...pasted below my whole sample code.
If you plug this on and set up the console. Click 'toggle layer', and it adds the feature layer just fine. Removing its ok, but when it gets re-added it shows this error in the console:
What is this error related to? It seems to get the response just fine, but after initially removing a layer I am not able to re-add it again. This happens only with the option useCors: false.
EDIT: This also happens when I am moving around the map once I have added the layer. Basically the request that is sent out to get the data gives back that error (it's usually several logs on the console at once, I assume a few requests are sent out to grab the data for each subset of the area)
The text was updated successfully, but these errors were encountered: