<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Map and WMS Layer Integration Test</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=<your_key_here>" type="text/javascript">
</script>
<script src="http://localhost/wms_randre.js" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
//WMS Layer is added as a new GTileLayer//
var tileCounty = new GTileLayer(new GCopyrightCollection(""),1,15);
tileCounty.myBaseURL = 'http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/lincoln/lincoln.map';
tileCounty.myLayers = 'imagery';
tileCounty.myFormat = 'image/png; mode=24bit';
tileCounty.getTileUrl = CustomGetTileUrl;
var layer0=[G_PHYSICAL_MAP.getTileLayers()[0]];
var custommap0 = new GMapType(layer0, G_PHYSICAL_MAP.getProjection(), "Google", G_PHYSICAL_MAP);
var layer1=[G_PHYSICAL_MAP.getTileLayers()[0],tileCounty];
var custommap1 = new GMapType(layer1, G_PHYSICAL_MAP.getProjection(), "NAIP", G_PHYSICAL_MAP);
map.getMapTypes().length = 0;
map.addMapType(custommap0);
map.addMapType(custommap1);
map.setCenter(new GLatLng(47.32, -118.54), 14);
map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
}
}
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 950px; height: 600px"></div>
</body>
</html>