Help DynamicMapService doesn't display

Discussion created by moralexluis on Aug 26, 2010
Latest reply on Aug 26, 2010 by moralexluis
Hi, I wonder If anyone could help me,

I got this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

<html lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Measure Distances</title>
  <link rel="stylesheet" type="text/css" href="">
  <script src="" type="text/javascript"></script>

    <script type="text/javascript">

        var geometryService;

        function init() {
            //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters.
            //If this null or not available the project and lengths operation will not work.  Otherwise it will do a http post to the proxy.
   = "/arcgisserver/apis/javascript/proxy/proxy.ashx";
   = false;

            var startExtent = new esri.geometry.Extent(-80.0571, 41.3697, -74.4321, 44.0822, new esri.SpatialReference({ wkid: 4326 }));
            var map = new esri.Map("map", { extent: startExtent });
            dojo.connect(map, "onLoad", initFunctionality);

            //map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer(""));
            map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://servarcgisprd/ArcGIS/rest/services/MapaBase/MapServer"));

            geometryService = new esri.tasks.GeometryService("");

            dojo.connect(geometryService, "onLengthsComplete", outputDistance);

        function initFunctionality(map) {
            var tb = new esri.toolbars.Draw(map);

            var lengthParams = new esri.tasks.LengthsParameters();

            //on draw end add graphic, project it, and get new length
            dojo.connect(tb, "onDrawEnd", function (geometry) {
                lengthParams.polylines = [geometry];
                lengthParams.lengthUnit = esri.tasks.GeometryService.UNIT_METER;
                lengthParams.geodesic = true;
                //call GeometryService.lengths() with projected geometry
                var graphic = esri.Graphic(geometry, new esri.symbol.SimpleLineSymbol()));


        function outputDistance(result) {
            dojo.byId("distance").innerHTML = dojo.number.format(result.lengths[0] ) + " meters";


    Click and hold down on the map to draw a line that will be added to the map.  The application will then use the geometry service to project and compute the length of the line.
    <div id="map" class="tundra" style="width:1024px; height:512px; border:1px solid #000;"></div>
    Distance: <span id="distance"></span>

Well the problem is that I press F5 to run it, and it does, but the map doesn't display ... I don't know why ... I thought it was the spatial reference but... I'm not sure
the spatial reference is:

Spatial Reference: PROJCS["WGS_1984_UTM_Zone_15N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-93.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Kilometer",1000.0]]

Anyone knows ?