Reference the ArcGIS API for JavaScript using StealJS

190 views Asked by At

Has anyone tried to reference the ArcGIS API for JavaScript using StealJS instead of adding

<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>

to the head tag as in ArcGIS's samples?

I tried to use:

steal("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/")
.css("http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri")

but StealJs thinks I am looking for "http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/.js" and reports not found(404).

thanks!

1

There are 1 answers

0
mchepurnoy On

Try to change your URL to http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/init.js You can download version of esri js API here http://www.esri.com/apps/products/download/ and look how files are actually stored in the API.