BrianBunker / cmv-widgets

Widgets based on the Esri jsapi, configured for the Configurable Map Viewer. Widgets include Drag and Drop, Goto, Map Navigation Hash, and Nearby.
https://brianbunker.github.com/cmv-widgets
MIT License
18 stars 24 forks source link

Fix the addition of shapefiles in DnD widget that was broken in my last Pull Request #31

Closed tmcgee closed 8 years ago

tmcgee commented 8 years ago

Fixes #30 which was introduced in PR #21

BrianBunker commented 8 years ago

Thanks for the PR. I see shapefiles working again, but was unsuccessful in loading the sample kml because the request is proxied (and there is no proxy on Github). I may be misunderstanding the error, but if not will you add a note to the readme about the limitation for the Github sample?

tmcgee commented 8 years ago

@BrianBunker Nothing I added is explicitly using the proxy. I believe that esri.request is determining whether to use the proxy or not. Possibly based on the utility.arcgis.com url? I can add a comment in the README about a proxy may be required.

The url for the demo in the README points to your other demo here: http://brianbunker.github.com/dojo-esri-dnd-widget. I'll correct that while I'm at it.

tmcgee commented 8 years ago

@BrianBunker I have updated the README as noted in my comment above.

BrianBunker commented 8 years ago

@tmcgee Thanks for the fix and for updating the readme! I believe esriRequest switches from a GET to a POST due to content size and the KML is larger than the GET limit.

tmcgee commented 8 years ago

@BrianBunker I thought about the file size as the POST trigger. So I tried with a very small KML file with the same result (still used the proxy). Since adding a shapefile submits the zip file via form data, I think it too would do a POST regardless of file size. Tiz a puzzlement for another day...