Created
May 6, 2014 15:24
-
-
Save morganherlocker/ce3ed86bf6fffcc186c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<!--The viewport meta tag is used to improve the presentation and behavior of the samples | |
on iOS devices--> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> | |
<title>Map with WMS</title> | |
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"> | |
<link rel="stylesheet" href="http://js.arcgis.com/3.9/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.9/"></script> | |
<script> | |
var map; | |
require(["esri/map", "esri/layers/WMSLayer", "esri/config"], | |
function(Map, WMSLayer, esriConfig, parser) { | |
esriConfig.defaults.io.proxyUrl = "/proxy"; | |
map = new Map("map", { | |
basemap: "streets", | |
center: [-98, 37], | |
zoom: 5 | |
}); | |
var wmsLayer = new WMSLayer("http://216.59.44.187:8080/geoserver/wms?service=WMS&version=1.1.0&"+ | |
"request=GetMap&layers=demo&styles=&bbox=-157.97679100000528,19.648975399722694,-52.72650000000229,61.59948349880581&width=827&height=330&srs=EPSG:3857&format=image%2Fpng" ,{ | |
format: "png" | |
}); | |
map.addLayer(wmsLayer); | |
}); | |
</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