ArcGIS API for JavaScript Version 3.11 Released

4926
23
10-06-2014 12:25 PM
BjornSvensson
Esri Regular Contributor

Today we released version 3.11 of the ArcGIS API for JavaScript.  The optimizer has been updated to support the latest version, and the API & SDK is also available for download. Note that the downloads have moved to a new place.

Read the blog at http://blogs.esri.com/esri/arcgis/2014/10/06/arcgis-api-for-javascript-version-3-11-released/ .

Or for the complete details, read the Whats New at https://developers.arcgis.com/javascript/jshelp/whats_new.html.

For those of you not usually reading any of the above, please read at least the first item, that says:

"This is important if you’re upgrading from earlier versions!

To update your code for version 3.11 references, replace the following URLs:

change /3.10/js/dojo/ to /3.11/ (note the dropped “/js/dojo”) and change /3.10/js/esri/ to /3.11/esri/ (note the dropped “/js”).

"

An example of this is shown below

<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">

23 Replies
RaimondsVerpejs
New Contributor II

Only change in code are 1 number "0" to "1".

Works fine:

<link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
<script src="https://js.arcgis.com/3.10/"></script>

Does not work:

<link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
<script src="https://js.arcgis.com/3.11/"></script>

Google Chrome console after changing API to 3.11

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raimonds,

   You are mixing protocols and different API versions in your code.

Try::

<link rel="stylesheet" href="http://js.arcgis.com/3.18/esri/css/esri.css">
<script src="http://js.arcgis.com/3.18/"></script>‍‍

Notice both use http protocol and both are calling the same version of the API.

0 Kudos
RaimondsVerpejs
New Contributor II

Full working code:

<html><head>
<link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
<script src="http://js.arcgis.com/3.10/"></script>

<script>
require([
"esri/geometry/Extent", "esri/map", "esri/layers/ArcGISTiledMapServiceLayer"
], function(Extent, Map, ArcGISTiledMapServiceLayer) {

esri.config.defaults.io.proxyUrl = "proxy.ashx";
esriConfig.defaults.io.alwaysUseProxy = true;

var initExtent = new esri.geometry.Extent(300000, 170000, 770000, 450000, new esri.SpatialReference({wkid: 3059}));
map = new esri.Map("map",{extent:initExtent});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("XXX/MapServer");
map.addLayer(basemap);

});
</script>
</head>

<body id="map"></body>
</html>

http or https protocol/same or differen API version its does not matter. Same error after v3.11.

Can anyone write working example for using proxy and custom basemap that works whit newest ArcGis Javascript API?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raimonds,

   This worked fine for me:

<html>

<head>
    <link rel="stylesheet" href="http://js.arcgis.com/3.18/esri/css/esri.css">
    <script src="http://js.arcgis.com/3.18/"></script>

    <script>
        require([
            "esri/geometry/Extent",
            "esri/map",
            "esri/layers/ArcGISTiledMapServiceLayer",
            "esri/layers/ArcGISDynamicMapServiceLayer",
            "esri/SpatialReference"
        ], function(Extent, Map, ArcGISTiledMapServiceLayer, ArcGISDynamicMapServiceLayer, SpatialReference) {
            esri.config.defaults.io.proxyUrl = "proxy.ashx";
            esriConfig.defaults.io.alwaysUseProxy = true;

            var initExtent = new Extent(300000, 170000, 770000, 450000, new SpatialReference({
                wkid: 3059
            }));
            map = new Map("map", {
                extent: initExtent
            });
            var basemap = new ArcGISDynamicMapServiceLayer("http://kartes.lgia.gov.lv/arcgis/rest/services/HRL/MapServer");
            map.addLayer(basemap);
        });
    </script>
</head>

<body id="map"></body>

</html>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Notice the removal of mixed AMD and Legacy coding patterns like you had and the use of the same api versions for both the css files and the js api files.

I could not find a tiled/cached map service for your country so I switched to a ArcGISDynamicMapServiceLayer.

0 Kudos