Browse Source

second commit

master
Irul24 2 years ago
parent
commit
249c04a309
  1. 8
      index.html
  2. 15
      js/boot.js

8
index.html

@ -12,12 +12,13 @@ @@ -12,12 +12,13 @@
<!-- Dojo Config & Register Custom Module -->
<script>dojoConfig = {}</script>
<!-- <script src='/js/library/dojo/dojo.js'></script> -->
<script type="text/javascript">
var locationPath = location.pathname.replace(/\/[^\/]+$/, "");
window.dojoConfig = {
parseOnLoad: true,
async: true,
// register module widget in packages array
packages: [
{
name: "utils",
@ -62,6 +63,9 @@ @@ -62,6 +63,9 @@
<script src="/js/boot.js"></script>
</head>
<!-- Main Body and main layout container -->
<body class="claro">
<div class="container" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false" style="width:100%; height:100%;">
<div id="menus" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'">
@ -89,10 +93,8 @@ @@ -89,10 +93,8 @@
</div>
</div>
<div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">
<!-- <div id="search">Search</div> -->
<div id="HomeButton"></div>
</div>
<!-- <div id="legendDiv" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'"></div> -->
</div>
</body>
</html>

15
js/boot.js

@ -1,20 +1,25 @@ @@ -1,20 +1,25 @@
// importing dojo&esri library & widget module
require([
// Esri Library
"esri/config",
"esri/WebMap",
"esri/views/MapView",
"dojo/domReady",
// Widget Module
"bufferRadius/bufferRadius",
"layer/LayerList",
"menu/menuBar",
"utils/home",
// dojo library
"dojo/domReady",
"dojo/parser",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane"
], function(Config, WebMap, MapView,ready,osx_buffer,Layer,menuBar,Osx_Home) {
], function(Config, WebMap, MapView,osx_buffer,Layer,menuBar,Osx_Home,ready) {
ready(function () {
const webmap = new WebMap({
portalItem: {
// autocasts as new PortalItem()
id: "60994025213a4874bdb2e39503c72407"
}
});
@ -22,9 +27,11 @@ require([ @@ -22,9 +27,11 @@ require([
var view = new MapView({
container: "map",
map: webmap,
center: [106.840837, -6.294844], // longitude, latitude
center: [106.840837, -6.294844],
zoom: 16
});
// call module widget
var bufferRadius = new osx_buffer(view);
var layerList = new Layer(view);
var menus = new menuBar();

Loading…
Cancel
Save