Hello,
I am working on a Openstreetmap project which includes routing. I can draw a map:
map = new OpenLayers.Map( $(‘map’), {controls: [] } );
layerTilesAtHome = new OpenLayers.Layer.OSM.Osmarender(“Osmarender”);
map.addLayer(layerTilesAtHome);
The map is drawn correctly.
Next I need to draw a route that is contained in a KML file:
var kmlFeedUrl = “http://www.yournavigation.org/gosmore.php?flat=52.215676&flon=5.963946&tlat=52.2573&tlon=6.1799&v=motorcar&fast=1&layer=mapnik”
kmlLayer = new OpenLayers.Layer.GML(“KML”, kmlFeedUrl, {
projection: new OpenLayers.Projection(“EPSG:4326”),
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true
}
});
map.addLayer(kmlLayer);
I can step through this code in the debugger without errors in these particular lines.
As you can see, the url returns a KML file.
Later I get the error ‘access denied’. The map is drawn anyway but no route is displayed.
Can anybody help?