AnsweredAssumed Answered

Loading a File geodatabase on the Server

Question asked by psawyer_0324 on Jun 14, 2016

I am trying to learn how to write scripts with Javascript. I have this book named " Building Web Applications with ArcGIS." They provided the data and the sources is file geodatabases. I have the data stored onto our network drive. I can publish the mxd with the file gdb on to our server. However, i can not set the capibilities as feature access  when I go to share the map through ArcGIS Online as a web service. I have tested the script which works but I am unable to  see any layers when i run the script through chrome.


Is it possible to save the files as shapefile and publish to the server and then host theough ArcGIS Online. Below i have added a  code  the Author of this book has provided and how to add a map from the server into a javascript.


I asked people from Packt and they could not help.




<title>Bestaurants Web Application</title>

<link rel="stylesheet" href="arcgisjs/esri.css">

<script src="arcgisjs/3.10/init.js"></script>







function startup()


  //alert("map is about to load");


  //create the map object and load it into the 'mymap' div element

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


  //load the layer into an object

  var lyr = new esri.layers.ArcGISDynamicMapServiceLayer





  //add the layer to map

















<table border =1 width = '1000px' height = '700px' align =center>




<td colspan =2 width='100%' height ='10%'>

  <!-- The toolbar where we will place tools -->

  The toolbar that contains useful tools to interact with the map and search for restaurants  <b> (100% width and 10% height) </b>








<td width='20%' height ='40%'>

  <!-- The legend of the map goes here -->

  The legend items go here <br> <b>(20% width and 40% height) </b>


<td width='80%' height ='85%' rowspan =2 valign = top>

  <div id='mymap' class='arcgismap' >







<td width='20%' height ='40%'>

   <!-- The search results will go here -->

   The search results goes here, we will display the search for the users in this box <br> <b>(20% width and 40% height)</b>







  <td colspan =2 width='100%' height ='5%'>

  <!-- The status bar for displaying messages goes here -->

  The status bar goes here  <b> (100% width and 5% height)</b>