<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009>add maxResolution and maxExtent <FONT face=Arial 
color=#0000ff size=2><SPAN class=140293617-02052009>to your map declaration, 
then it should work.</SPAN></FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009><FONT face="Times New Roman" color=#000000 size=3>map = 
new OpenLayers.Map('map', {</FONT><BR>...</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT 
size=2>maxResolution: Math.abs(117107.3758-940177.4915)/256,<BR>maxExtent: new 
OpenLayers.Bounds(117107.3758, 11491.8435, 940177.4915, 326719.7326)<SPAN 
class=140293617-02052009>,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009>...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=140293617-02052009></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>the&nbsp;<SPAN 
class=140293617-02052009>b</SPAN>ounds come from : </FONT><A 
href="http://spatialreference.org/ref/epsg/32119/"><FONT face=Arial 
size=2>http://spatialreference.org/ref/epsg/32119/</FONT></A></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>*&nbsp; WGS84 
Bounds: -84.3200, 33.8000, -75.4300, 36.5800<BR>* Projected Bounds: 117107.3758, 
11491.8435, 940177.4915, 326719.7326<BR>* Scope: Large and medium scale 
topographic mapping and engineering survey.<BR>* Last Revised: 2007-01-19<BR>* 
Area: USA - North Carolina<BR></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=140293617-02052009><FONT face=Arial 
color=#0000ff size=2>By the way. In the mapfile you should use&nbsp;extent in 
the same projection as your map projection, also it doesn't effect the 
output.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140293617-02052009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=140293617-02052009><FONT face=Arial 
color=#0000ff size=2>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140293617-02052009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=140293617-02052009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Von:</B> 
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag 
von </B>cole gillespie<BR><B>Gesendet:</B> Samstag, 2. Mai 2009 
01:59<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] 
Problem with Mapserver + PostGIS + Openlayers<BR></FONT><BR></DIV>
<DIV></DIV>Users,<BR><BR>I am having trouble with my Openlayers map. I have a 
mapfile that I am trying to view inside of Openlayers. I feel like I am doing 
every thing right but all I am getting to show up inside of Openlayers is a 
white image. Below I will include both my map file and my openlayers html file. 
Any suggestions on what I am doing wrong would be greatly 
appreciated.<BR><BR>///////////////////////////////Mapfile///////////////////////////////////////////<BR><BR>MAP<BR>&nbsp; 
EXTENT -84.321869 33.752878 -75.400119 36.588157<BR>&nbsp; FONTSET 
"fonts/fonts.list"<BR>&nbsp; IMAGECOLOR 255 255 255<BR>&nbsp; IMAGETYPE 
png<BR>&nbsp; SHAPEPATH "/ms4w/apps/tutorial/data"<BR>&nbsp; SIZE 800 
600<BR>&nbsp; STATUS ON<BR>&nbsp; UNITS METERS<BR>&nbsp; NAME "MS"<BR><BR>&nbsp; 
OUTPUTFORMAT<BR>&nbsp;&nbsp;&nbsp; NAME "png"<BR>&nbsp;&nbsp;&nbsp; MIMETYPE 
"image/png"<BR>&nbsp;&nbsp;&nbsp; DRIVER "GD/PNG"<BR>&nbsp;&nbsp;&nbsp; 
EXTENSION "png"<BR>&nbsp;&nbsp;&nbsp; IMAGEMODE "PC256"<BR>&nbsp;&nbsp;&nbsp; 
TRANSPARENT FALSE<BR>&nbsp; END<BR><BR>&nbsp; OUTPUTFORMAT<BR>&nbsp;&nbsp;&nbsp; 
NAME "AGG"<BR>&nbsp;&nbsp;&nbsp; MIMETYPE "image/png; 
mode=24bit"<BR>&nbsp;&nbsp;&nbsp; DRIVER "AGG/PNG"<BR>&nbsp;&nbsp;&nbsp; 
EXTENSION "png"<BR>&nbsp;&nbsp;&nbsp; IMAGEMODE "RGB"<BR>&nbsp;&nbsp;&nbsp; 
TRANSPARENT FALSE<BR>&nbsp; END<BR><BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; 
"init=epsg:32119"<BR>&nbsp; END<BR>&nbsp; LEGEND<BR>&nbsp;&nbsp;&nbsp; 
IMAGECOLOR 255 255 255<BR>&nbsp;&nbsp;&nbsp; KEYSIZE 20 10<BR>&nbsp;&nbsp;&nbsp; 
KEYSPACING 5 5<BR>&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SIZE MEDIUM<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE 
BITMAP<BR>&nbsp;&n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bsp;&nbsp; MINFEATURESIZE 
-1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFFSET 0 
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS TRUE<BR>&nbsp;&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp; POSITION LL<BR>&nbsp;&nbsp;&nbsp; SIZE 200 
3<BR>&nbsp;&nbsp;&nbsp; STATUS OFF<BR>&nbsp;&nbsp;&nbsp; STYLE 
0<BR>&nbsp;&nbsp;&nbsp; UNITS MILES<BR>&nbsp; END<BR><BR>&nbsp; 
WEB<BR>&nbsp;&nbsp;&nbsp; IMAGEPATH 
"/ms4w/apache/htdocs/tmp/ms_tmp"<BR>&nbsp;&nbsp;&nbsp; IMAGEURL 
"tmp/ms_tmp"<BR>&nbsp;&nbsp;&nbsp; QUERYFORMAT text/html<BR>&nbsp;&nbsp;&nbsp; 
LEGENDFORMAT text/html<BR>&nbsp;&nbsp;&nbsp; BROWSEFORMAT text/html<BR>&nbsp; 
END<BR><BR><BR><BR>&nbsp; LAYER<BR>&nbsp;&nbsp;&nbsp; CONNECTION "user=postgres 
dbname=postgis password=help37546"<BR>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE 
POSTGIS<BR>&nbsp;&nbsp;&nbsp; DATA "the_geom FROM (<BR>&nbsp;&nbsp;&nbsp; SELECT 
<BR>&nbsp;&nbsp;&nbsp; Zipcodes.the_geom AS the_geom, <BR>&nbsp;&nbsp;&nbsp; 
Zipcodes.gid as gid, <BR>&nbsp;&nbsp;&nbsp; Zip.income as 
income<BR>&nbsp;&nbsp;&nbsp; FROM zipcodes JOIN zip <BR>&nbsp;&nbsp;&nbsp; ON 
zipcodes.zcta = zip.zcta) AS new_table USING UNIQUE gid USING 
SRID=-1"<BR>&nbsp;&nbsp;&nbsp; FILTER "income &gt; 0 and income &lt;= 
200000"<BR>&nbsp;&nbsp;&nbsp; NAME "themelayer"<BR>&nbsp;&nbsp;&nbsp; 
PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"init=epsg:32119"<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; STATUS 
ON<BR>&nbsp;&nbsp;&nbsp; TYPE POLYGON<BR>&nbsp;&nbsp;&nbsp; UNITS 
METERS<BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANGLE 
360<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 228 
181<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OPACITY 
100<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; 
END<BR>END<BR><BR><BR>/////////////////////////////////////openlayers 
file///////////////////////////////////////////////////////<BR><BR><BR>&lt;html 
xmlns="<A 
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"&gt;<BR>&nbsp; 
&lt;head&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;title&gt;MapServer 
Layer&lt;/title&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;link rel="stylesheet" 
href="../theme/default/style.css" type="text/css" /&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;link rel="stylesheet" href="style.css" type="text/css" 
/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;script src="<A 
href="http://openlayers.org/dev/lib/OpenLayers.js">http://openlayers.org/dev/lib/OpenLayers.js</A>"&gt;&lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp; 
&lt;script type="text/javascript"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map, 
layer;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function 
init(){<BR>&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map('map', 
{<BR>&nbsp;&nbsp;&nbsp; projection: "epsg:32119",<BR>&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp; numZoomLevels: 14,<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 
units : "meters",<BR>&nbsp;&nbsp;&nbsp; controls: [<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.ZoomToMaxExtent(),<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.PanZoomBar({zoomWorldIcon: 
true}),<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.LayerSwitcher({'ascending':false}),<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.MousePosition(),<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.MouseDefaults(),<BR>&nbsp;&nbsp;&nbsp; 
new<BR>OpenLayers.Control.KeyboardDefaults()<BR>&nbsp;&nbsp;&nbsp; 
]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }); <BR>&nbsp;&nbsp; 
layer = new OpenLayers.Layer.MapServer( "County 
Map",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<A 
href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</A>", 
{map: "C:/ms4w/Apache/htdocs/test_mapfile_edit.map", layers: "themelayer"} 
);<BR>&nbsp;&nbsp;&nbsp; &nbsp; <BR>&nbsp;&nbsp; 
map.addLayer(layer);<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; 
map.zoomToMaxExtent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 
&lt;/script&gt;<BR>&nbsp; &lt;/head&gt;<BR>&nbsp; &lt;body 
onLoad="init()"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div id="title"&gt;MapServer 
Layer&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div 
id="tags"&gt;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div id="shortdesc"&gt;Shows 
MapServer Layer&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div id="map" 
class="smallmap"&gt;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;div 
id="docs"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp; &lt;/div&gt;<BR>&nbsp; 
&lt;/body&gt;<BR>&lt;/html&gt;<BR></BODY></HTML>