[OpenLayers-Users] Showing remote KML files
Víctor González
victorzinho at gmail.com
Wed Sep 7 08:01:56 EDT 2011
Hello,
I am trying to show KML layers on mobile devices with OpenLayers and I have
tried this example: http://openlayers.org/dev/examples/mobile-layers.html. I
managed to show the KML layer correctly, but if I specify the full URL for
the .kml file, changing the creation of the KML layer to this:
var kml = new OpenLayers.Layer.Vector("KML", {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "http://openlayers.org/dev/examples/kml/sundials.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
}),
renderers: renderer
});
then the layer is not shown. I couldn't manage to find more info about this
or a clue of what is happening here. You can find the code I'm using here:
http://www.gearscape.org/tmp/ol.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110907/3caaef84/attachment.html
More information about the Users
mailing list