Your screen shot doesn't match the scenario you're describing...are you sure you're specifying your paths correctly? For instance, you talk about �??/web/scripts/dojo/dojo/dojo.js�?� but your screen shot shows "js/dojo/dojo".How are you specifying your module path? Can you post the code you're using to define your module paths?I recommend reading up on how this works in dojo: http://dojotoolkit.org/reference-guide/dojo/registerModulePath.htmlAlso look into using modulePaths via dojoConfig/djConfig.
if (!dojo._hasResource["custom.config"]) { dojo._hasResource["custom.config"] = true; dojo.provide("custom.config"); dojo.declare("custom.Config", null, { constructor: function(){ } }); dojo.mixin(custom.Config, { configPath: "conf/config.txt", configObj: null, parseConfig: function(load, error){ dojo.xhrGet({ url: this.configPath, handleAs: "json", load: load, error: error }); } }); }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>index.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <link rel="stylesheet" type="text/css" href="css/main.css"> <link rel="stylesheet" type="text/css" href="js/arcgis_js_api/library/2.4/arcgis/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" type="text/css" href="js/arcgis_js_api/library/2.4/arcgis/js/dojo/dojox/grid/resources/claroGrid.css"> <script type="text/javascript" src="js/arcgis_js_api/library/2.4/arcgis/"> </script> <script type="text/javascript"> djConfig = { parseOnLoad: true }; </script> <script type="text/javascript"> dojo.require("esri.map"); dojo.registerModulePath("custom", "../../custom"); dojo.require("custom.config"); //this line throw error.... function init(){ console.log(custom.Config.configPath); } dojo.addOnLoad(init); </script> </head> <body class="claro"> <div id="headContainer"> <div id="head"> </div> </div> </body> </html>
dojo.registerModulePath("custom", "http://localhost:8080/cd/js/arcgis_js_api/library/2.4/arcgis/js/custom");
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.