Home
Analytics
Using Dojo
paule85
Hey community,
I am new in BIRT and I want to use Dojo. I've written a method which should load a map with the "dojo.addOnLoad()" statement but nothing happened. I wrote the Javascript part into an "Edit Text Item". By loading the code in a normal HTML file everything was fine. Where is my fault ?
greets Christian
Find more posts tagged with
Comments
mwilliams
Hi Christian,
Are you just trying to call the dojo toolkit? Or did you add the jars to the correct spot inside BIRT and are you importing the classes properly in your script?
Are you getting any errors?
paule85
The dojo library is on the esri server. And there is no jar. The dojo lib is written in Javascript. <br />
The error message is that "dojo is undefined" - but why ? The client loads the library...<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<div id="map" style="width:500px; height:500px" ></div>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.addonload(init);
var agsMap;
function init() {
agsMap = new esri.Map("map", {slider: false});
esriConfig.defaults.map.slider = {left: "20px", top: "10px", width:null, height: "30px"};
esriConfig.defaults.map.sliderLabel = null;
var serviceLayer1 = new esri.layers.ArcGISDynamicMapServiceLayer("http://vsdev0755.dev.esri-de.com/ArcGIS/rest/services/bisuite/MapServer");
agsMap.addLayer(serviceLayer1);
}
</pre>