0

I am a novice getting started to work on a proof of concept to develop a web app powered by JS API.

I have a prototype that was put together back in July 2013 with JS API version 3.5. See below for the stylesheet links in index.html. I am looking to change this to the latest version 3.11.

Previous:

 <link rel="stylesheet" type="text/css" href="//serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dojo/resources/dojo.css">
 <link rel="stylesheet" type="text/css" href="//serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">
 <link rel="stylesheet" type="text/css" href="//serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">
 <script src="//serverapi.arcgisonline.com/jsapi/arcgis/3.5"></script>
 <script type="text/javascript">
    require(["viewer/Controller"], function (Controller) {
  Controller.startup();
   });
 var myvar = null;
 </script>

Changed to: (Note 3.11 in the new links)

 <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css">
 <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">

However when I change

<script src="//serverapi.arcgisonline.com/jsapi/arcgis/3.5"></script>

to

<script src="//js.arcgis.com/3.11/"></script>

the TOC/Legend layer is not loading any more and I get the error message:

"TypeError: Cannot read property 'geometry' of undefined". enter image description here Attached screen shot for the detailed message that shows up in Chrome developer Console. I have no clue what's causing this error. Can someone guide me? How should I go about updating the version, some best practices will be of immense help to me.

1
1

My best advise is to tear down your code to the most basic component (or even a few lines to successfully load a map) and put back together the features one by one. You'll notice which feature breaks as you go along and you can fix them separately.

Also consult the "release notes" starting with 3.6 up.

You can try upgrading one minor version at a time (eg. 3.5->3.6, 3.6->3.7) and see where it breaks and take note of what changed between the versions. I've done this too in the past, but it didn't work out as well as the above suggestion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.