google-code-export / marinemap

Automatically exported from code.google.com/p/marinemap
Other
1 stars 2 forks source link

loadshp in IE8 #433

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In IE8, the loadshp functionality does not appear to work properly. If you 
upload an invalid zip file/shp file, it displays the error message just fine - 
so the file is getting to the server, being validated and a json response is 
recieved. However when a valid shp/zip is uploaded, IE8 seems to choke on the 
final step of parsing the kml and finishing the editing process. 

Specifically, I believe the culprits are lines 204-205 in manipulators.js

{{{
 self.shape_ = self.gex_.pluginInstance.parseKml(response.input_kml);
 self.finishedEditingCallback_();
}}}

But I cannot for the life of me get IE8 developer tools to give me any feedback 
as to why they are failing or even where they are failing. 

Original issue reported on code.google.com by perrygeo...@gmail.com on 4 Nov 2010 at 9:00

GoogleCodeExporter commented 9 years ago
Made little progress so far but I think I've figured out the root of the 
problem (just not the solution):

So if you recall, the kml response from the server needs to be massaged to work 
with some jquery form plugin quirks. Specifically you have to put the kml into 
a json dictionary and wrap it in a textarea. This works for non-IE browsers and 
allows it to parse the json without mangling it. 

However, IE mangles it further by wrapping it in a <FONT color=blue> tag and 
escaping all the html entities. Grrrr. 

Invalid JSON: <FONT color=blue><textarea>{"status": "success",
"input_kml": "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>\n<kml xmlns=\"http:/...</FONT>

I have no idea where to go from here. At this point I feel like scrapping the 
whole jquery form plugin and starting from scratch but I'm not seeing an 
alternative. Uploading a file via ajax and getting an xml response can not be 
this hard!!!

Chad, do you have any time to help me debug. I'm just working on the live code 
on narwhal if you want to try without switching branches.

Original comment by perrygeo...@gmail.com on 22 Nov 2010 at 9:03

GoogleCodeExporter commented 9 years ago
Hey Matt,
Charles is in town and we're working on budgeting stuff tomorrow. I can give
a hand on Wednesday though. I'm totally in favor of dropping the jQuery form
plugin, but that means getting rid of file uploads until we have a better
solution. I have one in mind, lets discuss Wednesday if you are around.
-Chad

Original comment by underbluewaters on 23 Nov 2010 at 12:06

GoogleCodeExporter commented 9 years ago

Original comment by perrygeo...@gmail.com on 20 Sep 2011 at 8:14