[OpenLayers-Users] ArgParser not working

chris1211 chris at powerhousetechgrp.com
Thu May 1 20:09:07 EDT 2008


I have tryed to add the ArgParser control and also tryed the permalink
control and none of them will work can some one pleeeeeeeeae help me!!!!!
I've been trying to figure this out for the last four days!!!


<!DOCTYPE html PUBLIC "-//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>WX Server</title>
<meta name="Description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#map {
	width: 100%;
	height: 400px;
	border: 1px solid black;
	visibility: visible;
}
#wrapper {
	width: 1020px;
}
#nodelist {
	position:absolute;
	width:700px;
	height:115px;
	left: 40px;
	top: 483px;
	border: thin inset #0000FF;
	background-color: #666666;
	float: right;
	overflow: auto;
	visibility: visible;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: lighter;
}
#apDiv1 {
	position:absolute;
	left:210px;
	top:249px;
	width:391px;
	height:205px;
	z-index:2;
}
#nodeList {
	position:absolute;
	width:923px;
	height:108px;
	z-index:1;
	left: 44px;
	top: 109px;
	background-color: #0000FF;
}
#apDiv2 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
	left: 207px;
	top: 106px;
}
#apDiv3 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
}
#apDiv4 {
	position:absolute;
	width:443px;
	height:19px;
	z-index:2;
	background-color: #CCCCCC;
}
#apDiv5 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:2;
	left: 156px;
	top: 280px;
}
#apDiv6 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:2;
	left: 74px;
	top: 375px;
}
#location {
	position:absolute;
	width:212px;
	height:15px;
	z-index:2;
	left: 336px;
	top: 95px;
	font-family: "Times New Roman", Times, serif;
	font-size: 12px;
	color: #CCCCCC;
	font-style: normal;
}
#apDiv7 {
	position:absolute;
	width:624px;
	height:119px;
	z-index:2;
	left: 262px;
	top: 105px;
}
#apDiv8 {
	position:absolute;
	width:572px;
	height:42px;
	z-index:2;
	left: 263px;
	top: 119px;
}
</style>
<script src="/lib/OpenLayers.js" type="text/javascript">
        </script>
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script> 
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script defer="defer" type="text/javascript">
var map;
        var untiled;
        var tiled;
        function setHTML(response) { 
            document.getElementById('nodelist').innerHTML =
response.responseText;
        };
        
        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
       
        function init(){
            var bounds = new OpenLayers.Bounds(
                -127.61950111389118, 23.735178565979016,
                -64.08176994323732, 50.59252300262448
            );
            var options = {
                controls: [],
                maxExtent: bounds,
                maxResolution: 0.24819426238536663,
                projection: "EPSG:4326",
                units: 'degrees'
 				
            };
            map = new OpenLayers.Map('map', options);
            
            
            // setup tiled layer
            base = new OpenLayers.Layer.WMS(
                "BASE GIS", "http://192.168.1.192/geoserver/wms",
                {
                    width: '1020',
                    layers:
'topp:ncounties,topp:PAH_N0R_0,topp:henryco,PAH,topp:torpoly,topp:svrpoly',
                    styles: '',
                    srs: 'EPSG:4326',
                    height: '400',
                    format: 'image/png',
                    tiled: 'true',
                      },
                {buffer: 0} 
            );
           
            map.addLayers([base]);
           
		   
		        
            // setup controls and initial zooms
        
			map.addControl(new OpenLayers.Control.PanZoomBar());
            map.addControl(new OpenLayers.Control.Navigation());
	        //map.setCenter(new OpenLayers.LonLat(-88.33,36.3),5);
             map.addControl(new OpenLayers.Control.ArgParser ());
map.addControl(new OpenLayers.Control.Permalink());
                map.addControl(new OpenLayers.Control.ScaleLine());
                map.addControl(new
OpenLayers.Control.Permalink('permalink'));

			  // support GetFeatureInfo
             if (!map.getCenter()) map.zoomToMaxExtent();
			map.events.register('click', map, function (e) {
                document.getElementById('nodelist').innerHTML = "Loading...
please wait...";
                var url =  map.layers[0].getFullRequestString(
                    {
                        REQUEST: "GetFeatureInfo",
                        EXCEPTIONS: "application/vnd.ogc.se_xml",
                        BBOX: map.getExtent().toBBOX(),
                        X: e.xy.x,
                        Y: e.xy.y,
                        INFO_FORMAT: 'text/html',
                        QUERY_LAYERS: 'PAH,topp:henryco,torpoly,svrpoly',
                        FEATURE_COUNT: 20,
                        WIDTH: map.size.w,
                        HEIGHT: map.size.h
                    },
                    "http://192.168.1.192/geoserver/wms"
                );
                OpenLayers.loadURL(url, '', this, setHTML, setHTML);
                OpenLayers.Event.stop(e);
            });

        }
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById &&
((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>
<style type="text/css">
<!--
#apDiv9 {position:absolute;
	width:203px;
	height:50px;
	z-index:3;
	left: 42px;
	top: 105px;
	background-color: #666666;}
#apDiv10 {position:absolute;
	width:739px;
	height:65px;
	z-index:3;
	left: 138px;
	top: 101px;
	background-color: #0066CC;}
.style2 {color: #FFFFFF}
#optionspanel {position:absolute;
	width:610px;
	height:301px;
	z-index:3;
	left: 206px;
	top: 111px;
	visibility: visible;}
-->
        </style>
<style type="text/css">
<!--
.style5 {font-size: 0.7px}
.style6 {color: #000000}
.style9 {font-size: 12px}
#QuickViewmaster {
	position:absolute;
	width:562px;
	height:57px;
	z-index:1;
	left: 177px;
	top: 129px;
	background-color: #EEE;
	border: thin dashed #333333;
}
-->
        </style>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet"
type="text/css" />
</head>
<body bgcolor="#FFFFFF" onload="init()">
<!-- start header -->
<div id="header">
  <div id="logo">
    <div id="QuickViewmaster">
      <div class="box2" id="quickviewheader">Quick View: To Load the
detailed view of a City please Click the City Below</div>
      <ul id="MenuBar1" class="MenuBarHorizontal">
            <li> # Paris                 </li>
        <li> # Henry </li>
        <li> # Paris Landing         </li>
        <li> # Puryear </li>
        <li> # Close </li>
      </ul>
    </div>
    <h1> # WXserver </h1>
    <h2>Designed by Chris Brisendine</h2>
  </div>
  <div id="menu">
    <ul>
      <li class="active"> #  Quick View </li>
      <li> # Options  </li>
      <li> # Flood &amp; Precip </li>
      <li> # Hide Info. Box </li>
      <li> # Show Info. Box </li>
    </ul>
  </div>
</div>
<!-- end header -->
<div class="style1" id="map"></div>
<!-- start page -->
<div id="footer">
  <div id="nodelist">Attributes Information Box</div>
  
</div>
<!-- end footer -->
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1",
{imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>

-- 
View this message in context: http://www.nabble.com/ArgParser-not-working-tp16996246p16996246.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list