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:
crschmidt
2006-08-15 14:11:58 +00:00
parent 3faa7460ff
commit d11ddfbb87
3 changed files with 11 additions and 9 deletions
+1
View File
@@ -18,6 +18,7 @@
var zoom = 5; var zoom = 5;
var map, layer, glayer; var map, layer, glayer;
OpenLayers.ProxyHost = "/proxy/?url=";
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+8 -7
View File
@@ -13,6 +13,7 @@
<!-- <!--
var map, layer; var map, layer;
OpenLayers.ProxyHost = "/proxy/?url=";
function init(){ function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
@@ -21,13 +22,13 @@
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());
} }
function addUrl() { function addUrl() {
var value = $('url').value; var value = $('url').value;
var parts = value.split("/"); var parts = value.split("/");
var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value); var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
map.addLayer(newl); map.addLayer(newl);
$("url").value = ""; $("url").value = "";
} }
// --> // -->
</script> </script>
</head> </head>
+2 -2
View File
@@ -2,7 +2,7 @@
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */ * text of the license. */
OpenLayers.ProxyHost = "/proxy/?url="; OpenLayers.ProxyHost = "";
//OpenLayers.ProxyHost = "examples/proxy.cgi?url="; //OpenLayers.ProxyHost = "examples/proxy.cgi?url=";
/** /**
@@ -105,4 +105,4 @@ OpenLayers.parseXMLString = function(text) {
); );
return ajaxResponse; return ajaxResponse;
}; };