Skip to content

Instantly share code, notes, and snippets.

@phpmaps
Created April 10, 2014 16:26
Show Gist options
  • Save phpmaps/10399483 to your computer and use it in GitHub Desktop.
Save phpmaps/10399483 to your computer and use it in GitHub Desktop.
Web Map Security
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Web Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html,body,#map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
</style>
<script src="http://js.arcgis.com/3.8/"></script>
<script>
require([ "esri/map", "esri/arcgis/utils", "esri/urlUtils",
"dojo/domReady!" ], function(Map, arcgisUtils, urlUtils) {
//define proxy rule
urlUtils.addProxyRule({
proxyUrl : "proxy.php",
urlPrefix : "www.arcgis.com/sharing/rest"
});
//8ab1952ea6a94241b7f64ae4ae10e622
//4a675e9bc2994a7594ffeec7aaefd749
//21ed1ae438c242fa874879cc4a69e236
//405e2b31e8484a5da4b2819349b3c147
arcgisUtils.createMap("405e2b31e8484a5da4b2819349b3c147", "map");
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment