Select to view content in your preferred language

Unable to complete setup : test map won't display

3174
15
02-22-2012 12:04 PM
LucieBoucher1
Deactivated User
Hi,

I've tried to setup the ArcGIS Javascript API on our server and I can't make it work.  I have followed all the steps described on the install.html page, changed the paths in all the files, fixed the IIS to add the Default.ashx page, but whenever I try to test my install with a basic code, there is never a map showing up.  I only have a large white rectangle displayed on the page.  I tried to used two different map services : one from arcgis.com and a local one, without success.

I was wondering if someone had experience the same type of issue when installing the API.  I used the 2.6 files.

Any tips on points to look for?

Thanks a lot!!!
0 Kudos
15 Replies
KellyHutchins
Esri Frequent Contributor
Have you checked for errors in the page using either Chrome Developer Tools or Firebug? Both of these tools are helpful when debugging/testing issues.
0 Kudos
LucieBoucher1
Deactivated User
There is one error (red X symbol) saying : "Uncaught exception : Could not load cross-domain resource : dojox.gfx.svg"

There are also several warnings (! inside a yellow triangle) about the tundra.css file :


  • Messages like "Expected declaration, but found #zoom.  Moving to the next declaration" with the "#zoom" element being replaced with #display, #vertical-align, #overflow, #filter, #text-indent, #letter-spacing, #text-align, #bottom, #background, #background-image...


  • Messages like "Property "zoom" unknown.  Declaration abandonned." with the "zoom" element being replaced with transform, transform-origin, filter, resize, moz-opacity, padding, text-overflow, top, border-radius...


I don't really know what to do with those infos...

Thanks again for your help!
0 Kudos
JeffPace
MVP Alum
There is one error (red X symbol) saying : "Uncaught exception : Could not load cross-domain resource : dojox.gfx.svg"

There are also several warnings (! inside a yellow triangle) about the tundra.css file :


  • Messages like "Expected declaration, but found #zoom.  Moving to the next declaration" with the "#zoom" element being replaced with #display, #vertical-align, #overflow, #filter, #text-indent, #letter-spacing, #text-align, #bottom, #background, #background-image...


  • Messages like "Property "zoom" unknown.  Declaration abandonned." with the "zoom" element being replaced with transform, transform-origin, filter, resize, moz-opacity, padding, text-overflow, top, border-radius...


I don't really know what to do with those infos...

Thanks again for your help!


Are you sure your local api is working? I would check the following things to test

1. Switch to the ArcGIS online api.  DOes the map work? if so, you have an error in your api installation.  If not you have an error in your map code
2. If your api installation is the problem, browse to one of the files in a webbrowser.  for example, at http://hoboken:8084/arcgis_js_api/library/2.6/arcgis/index.jsp I get a
printout of alot of code.
0 Kudos
LucieBoucher1
Deactivated User
Are you sure your local api is working? I would check the following things to test

1. Switch to the ArcGIS online api. DOes the map work? if so, you have an error in your api installation. If not you have an error in your map code
2. If your api installation is the problem, browse to one of the files in a webbrowser. for example, at http://hoboken:8084/arcgis_js_api/li...cgis/index.jsp I get a
printout of alot of code.


I tried to switch to ArcGIS online api.

In my html page, when I use :

  • the tundra.css stylesheet from ArcGIS online

  • the library from arcgis online

  • a map service from arcgis online

I see a map.

If I try to use my local tundra.css file and leave the library and the map service from arcgis online, I see a map. 🙂

If I try to use my local tundra.css file and my local map service, but leave the library from arcgis online, I see a map. 🙂

When I change the path to the local arcgis library, I loose the map. 😞

Here is the code I used  (I changed the server and project names...) 

<!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"/>
    <title>Simple Map</title>
    <link rel="stylesheet" type="text/css" href="http://server1/project1/arcgis_js_api/library/2.6/js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript" src="http://server1/project1/arcgis_js_api/library/2.6/arcgis"></script>
    <script type="text/javascript">
      dojo.require("esri.map");
      function init() {
        var myMap = new esri.Map("mapDiv");
        var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server1/ArcGIS/rest/services/cacheVecto/MapServer");
        myMap.addLayer(myTiledMapServiceLayer);
      }
      dojo.addOnLoad(init);
    </script>
  </head>
  <body class="tundra">
    <div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
  </body>
</html>


The line causing problem is apparently this one :
    <script type="text/javascript" src="http://server1/project1/arcgis_js_api/library/2.6/arcgis"></script>


When I use the firefox debug console, I still see the error "Uncaught exception : could not load cross-domain resources : dojox.gfx.svg" and several warnings concerning the jsapi.css and InfoWindow.css files.

Whenever I try to browse the index.jsp or index.php files from the arcgis_js_api/library/2.6/arcgis/ directory to a web browser, I receive an Error 404 message.  If I browse the Default.ashx page in a web browser, I see the following message :
"The XML page can not be displayed.  Name starts with a non valid character."

Thanks again!
0 Kudos
JeffPace
MVP Alum
Sounds like you local api is installed (you can see the css files) but you made an error localizing it. 

What do you get when you go to

http://server1/project1/arcgis_js_api/library/2.6/arcgis/index.jsp
0 Kudos
LucieBoucher1
Deactivated User
HTTP 404 ERROR, in the web browser

But the index.jsp file seems to be in the correct directory, aka C:/Inetpub/wwwroot/project1/arcgis_js_api/library/2.6/arcgis
0 Kudos
JeffPace
MVP Alum
HTTP 404 ERROR, in the web browser

But the index.jsp file seems to be in the correct directory, aka C:/Inetpub/wwwroot/project1/arcgis_js_api/library/2.6/arcgis


Well thats definately the problem, until you can access that project via the web, the api wont work.

CAn you get to it via localhost on that machine?
0 Kudos
derekswingley1
Deactivated User

But the index.jsp file seems to be in the correct directory, aka C:/Inetpub/wwwroot/project1/arcgis_js_api/library/2.6/arcgis


Are you trying to run a .jsp page from IIS?
0 Kudos
LucieBoucher1
Deactivated User
Well thats definately the problem, until you can access that project via the web, the api wont work.

CAn you get to it via localhost on that machine?


If I write the following adress in a browser :
http://localhost/project1
I receive a message saying that the content of the directory can not be displayed : forbidden access

If I write the following adress in a browser :
http://localhost/cisaille/arcgis_js_api/library/2.6/arcgis
There is a popup window asking me if I want to save a file or select a program to open it.  The file is named arcgis and its size is 623 Ko.

If I write the following adress in a browser :
http://localhost/cisaille/arcgis_js_api/library/2.6/arcgis/index.php
or
http://localhost/cisaille/arcgis_js_api/library/2.6/arcgis/index.jsp
I have an HTML 404 ERROR
0 Kudos