lucianarodrig19 / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

Parser not able to retrieve the KML files #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write KML file from byte array
2. Save the KML file within application directory
3. Give url of directory to parser method parse('..')

What is the expected output? What do you see instead?
The kml should be rendered on google maps. There is an error message:
"log:  HTTP error 40 retrieving ...(full url I specify)" and "unable to 
retrieve ...the file".

What version of the product are you using? On what operating system?
r64. I'm using the js file in C# Asp.net, MVC 3 application. And embedding the 
Google Maps JS API V3. THis is on Windows 7, home prem.

Please provide any additional information below.
 I'm sure I have passed the correct url to the parse method, previously it was working. I have been using r58 version of the geoxml3.js file. I have tried latest r64 version but not working with that either.

I have more than 1 kml file that is being parsed in a loop, where the url for 
each file is passed.

Original issue reported on code.google.com by sheldonxbox9 on 7 Feb 2012 at 1:14

Attachments:

GoogleCodeExporter commented 9 years ago
More information is required. If r58 was working and doesn't work any more, it 
is a problem with your application, not geoxml3. 

What happens if you try to open that "file" with a browser?  Did you move it?

Original comment by geocodezip on 7 Feb 2012 at 2:29

GoogleCodeExporter commented 9 years ago
I haven't moved the file. I opened the kml file with a browser, it retrieved a 
working  file for download.

Where should the xml/kml file to be parse be located? In the same directory as 
the geoxml3.js file?

I tried this, but no luck:
  var myParser = new geoXML3.parser({map: map});   
  myParser.parse('@Url.Content("~/Scripts/coverage10.kml")');

I'm using r64, and still same problem.
I believe I'm referring the url correctly as same way is done for javascript 
files which run fine.

Original comment by sheldonxbox9 on 7 Feb 2012 at 3:45

GoogleCodeExporter commented 9 years ago
> Where should the xml/kml file to be parse be located? 

Any known relative path should work.

> In the same directory as the geoxml3.js file?

That would work.

Original comment by geocodezip on 7 Feb 2012 at 6:37

GoogleCodeExporter commented 9 years ago

Original comment by geocodezip on 22 Feb 2012 at 4:30

GoogleCodeExporter commented 9 years ago
I have a similar problem (testing in Firefox 16/Linux).  Was using egeoxml.js 
(worked fine in localhost environment) and am testing a conversion to geoxml3.  
Presently I am doing very simple tests of geoxml3 as a standalone parser 
(pending addition of further code to parse the description field).  The calling 
code:
 ...
        var myParser = new geoXML3.parser({afterParse: parseDesc});
        var url = 'http://localhost/maps/sites/tabtest.kml';
        myParser.parse(url);
 ...
 where parseDesc is some processing code.  
I also tried various relative addresses for the map: './tabtest.kml' and 
'tabtest.kml', get same error ('Unable to retrieve tabtest.kml') in all cases.
I know my httpd is working fine because I just tested it with egeoxml.js and 
other maps.   This is the html header:
-----------------
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
                <title>Test Parse</title>
                 <script type="text/javascript"
                src="http://maps.google.com/maps?file=api&v=3.s&"></script>

                <script type="text/javascript" src="./geoxml3.js"></script>
                <script type="text/javascript" src="./justparse.js"></script>
        </head>
<body ..>
....
</body>
</html>
-------------------
I am completely baffled.   

Original comment by kupde...@d.umn.edu on 7 Dec 2012 at 3:42

GoogleCodeExporter commented 9 years ago
Can you give me a link to an example that shows the problem?  Or attach all the 
files needed to recreate it?  Please create a new issue and attach the files to 
there, this issue is closed.

Original comment by geocodezip on 7 Dec 2012 at 4:15