[OpenLayers-Users] Fwd: Path problem with kml files
christopher.schmidt at nokia.com
christopher.schmidt at nokia.com
Wed Mar 16 16:21:04 EDT 2011
On Mar 16, 2011, at 3:56 PM, ext Ravi Pavuluri wrote:
> Hi Andres,
>
> Based on my experience with Google Maps API in the past, you need to keep the kml on a web accessible location. Localhost doesn't work.
The OpenLayers API is not the Google Maps API. KML is loaded directly in the
browser, not by a remote server. This is not the problem.
-- Chris
> -Ravi.
>
> From: Andres Deparis <andres.deparis at gmail.com>
> To: users at openlayers.org
> Sent: Wed, March 16, 2011 1:33:02 PM
> Subject: [OpenLayers-Users] Fwd: Path problem with kml files
>
>
> Hello all,
> I am trying to load some kml file into openlayer however, if I put my htm page in the browser this way: http://localhost/mypage.htm it does not find the kml file which is loaded in the root of the site.
> Now, if I load the page in the browser this way: file:///C:/inetpub/wwwroot/ , then openlayers can open it very fast and no problem.
>
> Can someone please help me to solve this problem? Below is my piece of code.
>
> Thank you all!
>
> map.addLayer(new OpenLayers.Layer.GML("KML", "myTest.kml",
> {
> projection: new OpenLayers.Projection("EPSG:
> 4326"),
> displayProjection: new OpenLayers.Projection("EPSG:900913"),
>
> format: OpenLayers.Format.KML,
> formatOptions: {
> extractStyles: true,
> extractAttributes: true,
> maxDepth: 2
> }
> }));
>
> Andres
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list