Hello, I have the same problem but my application goes online and if I try to load local gml I get: "Access to restricted URI denied" code: "1012", There is any option to load local data in in online application?
I think the "my maps" in Google maps do it, because is possible to specify a local path of a kml file located on the local machine. Regards. Antoni Vidal. -----Missatge original----- De: dev-boun...@openlayers.org [mailto:dev-boun...@openlayers.org] En nom de dev-requ...@openlayers.org Enviat: miƩrcoles, 25 de febrero de 2009 18:00 Per a: dev@openlayers.org Tema: Dev Digest, Vol 29, Issue 31 Send Dev mailing list submissions to dev@openlayers.org To subscribe or unsubscribe via the World Wide Web, visit http://openlayers.org/mailman/listinfo/dev or, via email, send a message with subject or body 'help' to dev-requ...@openlayers.org You can reach the person managing the list at dev-ow...@openlayers.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev digest..." Today's Topics: 1. Load external GML file in OpenLayers (Gorka L?pez Rivacoba) 2. Re: Load external GML file in OpenLayers (Andreas Hocevar) ---------------------------------------------------------------------- Message: 1 Date: Wed, 25 Feb 2009 16:50:46 +0100 From: Gorka L?pez Rivacoba <gorka.lopez.rivac...@gmail.com> Subject: [OpenLayers-Dev] Load external GML file in OpenLayers To: "d...@openlayers" <dev@openlayers.org> Message-ID: <f9537cf80902250750w3b4325c1jcba8727817a7f...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hello, I have an application an I want to load an external GML file. When I load it from an internal file (like ".\file.gml") it's ok, but when I load from an external file (like "C:\file.gml") there is an error: in this line: C:\DesarrolloTINSA\mfbase\openlayers\lib\OpenLayers\Request\XMLHttpRequest.js: this._object.open(sMethod, sUrl, bAsync, sUser, sPassword); I don't have any problem with permissions, because it is for internal porpouse. Is there any solution to this problem? Thanks. Best regards, Gorka L?pez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/dev/attachments/20090225/4125b761/attachment.html ------------------------------ Message: 2 Date: Wed, 25 Feb 2009 11:02:02 -0500 From: Andreas Hocevar <ahoce...@opengeo.org> Subject: Re: [OpenLayers-Dev] Load external GML file in OpenLayers To: Gorka L?pez Rivacoba <gorka.lopez.rivac...@gmail.com> Cc: "d...@openlayers" <dev@openlayers.org> Message-ID: <5b021dd0902250802l5a91f48q21197dc3b9f17...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi, 2009/2/25 Gorka L?pez Rivacoba <gorka.lopez.rivac...@gmail.com>: > I have an application an I want to load an external GML file. When I load it > from an internal file (like ".\file.gml") it's ok, but when I load from an > external file (like "C:\file.gml") there is an error: in this line: > > C:\DesarrolloTINSA\mfbase\openlayers\lib\OpenLayers\Request\XMLHttpRequest.js: > this._object.open(sMethod, sUrl, bAsync, sUser, sPassword); > > I don't have any problem with permissions, because it is for internal > porpouse. Is there any solution to this problem? Although you think so, the browser sees a security problem here. See http://en.wikipedia.org/wiki/Same_origin_policy for more details. Are you planning to go online with your application? If this is designed to run off disk, you should use corect file urls, like this: file:///C:/file.gml Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ------------------------------ _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev End of Dev Digest, Vol 29, Issue 31 *********************************** _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev