Javascript ubicación [Actual como 13/05/2013]
http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/
Para la configuración de proxy
nota el código:
esri.config.los valores predeterminados.io.alwaysUseProxy = true;
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.BorderContainer");
var map;
function Init() {
esri.config.defaults.io.alwaysUseProxy = true;
esri.config.defaults.io.proxyUrl = "http://WebServerName/proxy.ashx";
dojo.style(dojo.byId("map"), { width: dojo.contentBox("map").w + "px", height: (esri.documentBox.h - dojo.contentBox("navTable").h - 40) + "px" });
map = new esri.Map("map");
var CountyDataLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name/ArcGIS/rest/services/Counties/MapServer");
map.addLayer(CountyDataLayer);
var RestrictedLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name/ArcGIS/rest/services/cadaster/ServiceName/MapServer");
map.addLayer(RestrictedLayer);
var resizeTimer;
dojo.connect(map, 'onLoad', function(theMap) {
dojo.connect(dijit.byId('map'), 'resize', function() {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
map.resize();
map.reposition();
}, 500);
});
});
}
dojo.addOnLoad(Init);
</script>
... and I used the following code in my proxy.config file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<!-- Proxy config is used to set the ArcGIS Server services that the proxy will forward to.
mustMatch: true to only proxy to sites listed, false to proxy to any site -->
<ProxyConfig mustMatch="true">
<serverItems>
<serverItem url="http://Server.Name"
matchAll="true" tokenUrl="http://Server.Name/ArcGIS/tokens"
username="MyUserName" password="MyPassword"
timeout="5" />
</serverItems>
</ProxyConfig>
este código es tomado de
http://forums.arcgis.com/threads/36823-How-do-you-reference-the-proxy.ashx-page