Skip to content

Instantly share code, notes, and snippets.

@jeremiahajohnson
Last active August 29, 2015 14:08
Show Gist options
  • Save jeremiahajohnson/afeb68de4573e38bb0db to your computer and use it in GitHub Desktop.
Save jeremiahajohnson/afeb68de4573e38bb0db to your computer and use it in GitHub Desktop.
Quick starter for esri, bootstrap, jQuery, and jQuery UI
require([
"dojo/dom", "dojo/on", "dojo/query", "dojo/request","dojo/keys",
"dojo/_base/array",
"esri/map", "esri/config", "esri/urlUtils", "esri/InfoTemplate", "esri/tasks/GeometryService", "esri/toolbars/edit", "esri/graphic",
"esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol",
"esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/FeatureLayer",
"dojo/domReady!"
], function (
dom, on, dojoQuery, request, keys,
arrayUtils,
Map, esriConfig, urlUtils, InfoTemplate, GeometryService, Edit, Graphic,
Color,SimpleMarkerSymbol,SimpleLineSymbol, SimpleFillSymbol,
ArcGISDynamicMapServiceLayer, FeatureLayer
) {
//Init map
map = new Map("mapDiv", {
basemap: "topo",
logo: false,
sliderPosition: "bottom-right"
});
});
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quick Starter</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" />
<!-- ESRI CSS -->
<link rel="stylesheet" href="//js.arcgis.com/3.11/esri/css/esri.css" />
<link rel="stylesheet" href="//js.arcgis.com/3.11/dijit/themes/claro/claro.css" />
<!-- Local stylesheet -->
<link rel="stylesheet" href="styles.css" />
<!-- Favicon -->
<link rel="shortcut icon" href="images/favicon.ico"/>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div id="mapDiv"></div>
<!-- Latest compiled and minified JavaScript -->
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="//js.arcgis.com/3.11compact"></script>
<script src="javascript.js" type="text/javascript"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment