Samples don't work

475
4
04-01-2012 07:45 AM
demdeberanz
New Contributor II
0 Kudos
4 Replies
PaulBushore
Occasional Contributor
Looks like the services for at least the earthquakes are down:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...

Shows a does not exist or is invalid.  They may be doing maintenance or something got borked.  I can't imagine the overhead keeping up with all of the services that they have to be publishing 🙂
0 Kudos
demdeberanz
New Contributor II
Looks like the services for at least the earthquakes are down:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...

Shows a does not exist or is invalid.  They may be doing maintenance or something got borked.  I can't imagine the overhead keeping up with all of the services that they have to be publishing 🙂


Thank you!!! 😉
0 Kudos
PaulBushore
Occasional Contributor
Hello,

Just for your information, I was able to pack together a quick and dirty legend site.  Unfortunately, I can't make it accessible for you to view, but the code should work if you are using a 10 SP1 or higher map service.  It is basically a copy of the regular sample, but it loads a local dynamic map service at map load time.  You would change the piece in bold to point to your local map service or any other 10.01 or higher service.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples
      on iOS devices-->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Map with legend</title>
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
    <style>
      html, body { height: 98%; width: 98%; margin: 0; padding: 5px; }
      #rightPane{
        width:20%;
      }
      #legendPane{
        border: solid #97DCF2 1px;
      }
     
    </style>
    <script type="text/javascript">        var djConfig = { parseOnLoad: true };</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script>
    <script type="text/javascript">
        dojo.require("dijit.layout.BorderContainer");
        dojo.require("dijit.layout.ContentPane");
        dojo.require("dijit.layout.AccordionContainer");
        dojo.require("esri.map");
        dojo.require("esri.dijit.Legend");
        dojo.require("esri.layers.FeatureLayer");

        var map;


        function init() {

            map = new esri.Map("map");

            //Add the terrain service to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service    
            var basemap = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisvirt02/ArcGIS/rest/services/Voting/Voting/MapServer");
            map.addLayer(basemap);


            //add the legend
            dojo.connect(map, 'onLoad', function () {
                    var legendDijit = new esri.dijit.Legend({map: map}, "legendDiv");
                    legendDijit.startup();
            });

            dojo.connect(map, 'onLoad', function (theMap) {
                //resize the map when the browser resizes
                dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
            });
        }

        dojo.addOnLoad(init);
    </script>
  </head>
 
  <body class="claro">
    <div id="content" dojotype="dijit.layout.BorderContainer" design="headline" gutters="true" style="width: 100%; height: 100%; margin: 0;">
      <div id="rightPane" dojotype="dijit.layout.ContentPane" region="right">
        <div dojoType="dijit.layout.AccordionContainer">
          <div dojoType="dijit.layout.ContentPane" id="legendPane" title="Legend" selected="true" >
            <div id="legendDiv"></div>
          </div>
          <div dojoType="dijit.layout.ContentPane" title="Pane 2" >
            This pane could contain tools or additional content
          </div>
        </div>
      </div>
      <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;">
      </div>
    </div>
  </body>
 
</html> 
0 Kudos
ChadWilcomb
New Contributor III
Looks like the services for at least the earthquakes are down:

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...

Shows a does not exist or is invalid.  They may be doing maintenance or something got borked.  I can't imagine the overhead keeping up with all of the services that they have to be publishing 🙂


They must be back up because all these links work for me!
0 Kudos