I have seen a few posts out there for this and I have tried everything that has been posted. I am using ASP.Net MVC 4 and am trying to get a custom module loaded. Each attempt has given me the same error...GET http://js.arcgis.com/3.15/myModules.custommenu.js.
I have a js file called custommenu.js located in /Scripts folder. Here is the code for the page...(all other javascript, JQuery etc are loaded in the layout).
<link rel="stylesheet" href="https://js.arcgis.com/3.15/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.15/esri/css/esri.css">
<h2>Map</h2>
<script type="text/javascript">
@*var baseUrl = @Html.ResolveServerUrl("~Scripts");
var dojoConfig = {
parseOnLoad: true,
packages: [{
"name": "myModules",
"location": location.pathname.replace(/\/[^/]+$/, '') + '/Scripts'
}]
};
</script>
<script src="https://js.arcgis.com/3.15/"></script>
<script type="text/javascript">
var map;
require(["esri/map", "dojo/domReady!", "myModules.custommenu"], function (Map) {
map = new Map("mapDiv", {
center: [-56.049, 38.485],
zoom: 3,
basemap: "streets"
});
});
</script>
<div class="claro">
<div id="mapDiv"></div>
</div>
I am new to arcgis and ESRI and am just trying to get a simple example working and am unable to...
Thanks in advance for any help.