Guest User

Dojo 1.7 + JSAPI 2.7

a guest
Mar 8th, 2012
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <main.html>
  2. <script type="text/javascript">
  3. var dojoConfig = ( function ()
  4. {
  5. var base = location.href.split( "/" );
  6. base.pop();
  7. base = base.join( "/" );
  8. return {
  9. parseOnLoad : false,
  10. async : false,
  11. isDebug : true,
  12. packages : [
  13. {
  14. name: "ags",
  15. location: "http://mydevbox/arcgis_js_api/library/2.7/jsapi"
  16. },
  17. {
  18. name: "agsjs",
  19. location: base + "/agsjs"
  20. },
  21. {
  22. name : "infor",
  23. location : base + "/infor"
  24. }
  25. ]
  26. };
  27. } )();
  28. </script>
  29.  
  30. <loader.js>
  31. var djConfig = {
  32. scopeMap: [
  33. ["dojo", "esriDojo"],
  34. ["dijit", "esriDijit"],
  35. ["dojox", "esriDojox"]
  36. ]
  37. };
  38.  
  39. require ( ["dojo", "ags/init"],
  40. function ( dojo, _ )
  41. {
  42. var url = dojo.moduleUrl ( "ags" ) + "js/esri";
  43. dojo.registerModulePath ( "esri", url );
  44. djConfig = dojo.config;
  45. } );
RAW Paste Data