http://g-utka.ru/tsvetik/perechen/04340 ... 00443.HTML
Основная причина - для упрощения синхронизации перевалов на схеме и перевалов в каталоге.
В качестве движка использую OpenLayers и добавляю слой с метками из каталога вот таким образом.
- Код: Выделить всё
westra = new OpenLayers.Layer.Vector("Вестра", {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Cluster({distance: 10, threshold: 2}), new OpenLayers.Strategy.BBOX()],
styleMap: new OpenLayers.StyleMap({
"default": style,
"select": {
fillColor: "#8aeeef",
strokeColor: "#32a8a9"
}
}),
protocol: new OpenLayers.Protocol.HTTP({
url: "http://westra.ru/passes/classificator.php?place=228&type=new&export=kml",
format: new OpenLayers.Format.KML({
extractStyles: false,
extractAttributes: false
})
})
});
При загрузке сайта отладчик говорит:
XMLHttpRequest cannot load http://westra.ru/passes/classificator.p ... 1641869311. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://g-utka.ru' is therefore not allowed access.
Как с этим бороться?
То ли мне какие-то заголовки надо где-то в запросе прописать, то ли на вестре.