Change OpenLayers.ProxyHost in Subversion to be null. This means that Ajax
requests will 'just work' if the file is loaded locally (which was only the case before when using relative URLs). It also means that the examples better document how to set ProxyHost, since they no longer depend on an undocumented setting. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
var zoom = 5;
|
||||
var map, layer, glayer;
|
||||
|
||||
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||
function init(){
|
||||
map = new OpenLayers.Map( $('map') );
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<!--
|
||||
var map, layer;
|
||||
|
||||
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||
function init(){
|
||||
map = new OpenLayers.Map('map', {maxResolution:'auto'});
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
@@ -21,13 +22,13 @@
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
function addUrl() {
|
||||
var value = $('url').value;
|
||||
var parts = value.split("/");
|
||||
var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
|
||||
map.addLayer(newl);
|
||||
$("url").value = "";
|
||||
}
|
||||
function addUrl() {
|
||||
var value = $('url').value;
|
||||
var parts = value.split("/");
|
||||
var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
|
||||
map.addLayer(newl);
|
||||
$("url").value = "";
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
||||
* text of the license. */
|
||||
|
||||
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||
OpenLayers.ProxyHost = "";
|
||||
//OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
|
||||
|
||||
/**
|
||||
@@ -105,4 +105,4 @@ OpenLayers.parseXMLString = function(text) {
|
||||
);
|
||||
|
||||
return ajaxResponse;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user