<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3627" name=GENERATOR>

<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>Hi Marc,</FONT></SPAN></DIV><SPAN class=527413515-23102009>
<DIV dir=ltr align=left><BR><FONT face=Arial color=#0000ff size=2>Thanks for 
your response.&nbsp; Turns out the answer to my problem was pretty simple.&nbsp; 
I changed INFO/FORMAT to "text/html" in the getfeatureinfo request in my 
script.&nbsp; Also made the same change to my mapfile in the Metadata sections 
for the WEB and LAYER sections.&nbsp; Then figured out that I need<SPAN class=527413515-23102009>ed</SPAN> to create a separate .html file that controls 
the format of my popup display.&nbsp; This html file is referenced in the 
mapfile<SPAN class=527413515-23102009> as the TEMPLATE 
parameter</SPAN>:</FONT></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'HomeTaxlots2'<BR>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
OFF<BR>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
POLYGON<BR>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
ON<BR>&nbsp;DUMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
TRUE<BR>&nbsp;LABELITEM&nbsp;&nbsp;&nbsp; 
"TAXLOT"<BR>&nbsp;TEMPLATE&nbsp;&nbsp;&nbsp;&nbsp; 
/ms4w/apache/htdocs/taxlot_poly_attr3.html</FONT></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>and here's my "taxlot_poly_attr3.html" that formats the 
popup fields:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>&lt;table style='font-size:.8em'&gt;<BR>&lt;tr&gt;&lt;td 
width="12"&gt;Map:&lt;/td&gt;&lt;td 
width="100"&gt;[MAPNUMBER]&lt;/td&gt;&lt;/tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;tr&gt;&lt;td&gt;Lot:&lt;/td&gt;&lt;td&gt;[TAXLOT]&lt;/td&gt;&lt;/tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;tr&gt;&lt;td&gt;Owner:&lt;/td&gt;&lt;td&gt;[OWNNAME]&lt;/td&gt;&lt;/tr&gt;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>&lt;/table&gt;<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=527413515-23102009><FONT face=Arial color=#0000ff size=2>Cress</FONT></SPAN></DIV>
<DIV dir=ltr align=left></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Marc Jansen-2 (via Nabble) 
[mailto:<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3879484&i=0" target="_top" rel="nofollow">[hidden email]</a>] <BR><B>Sent:</B> Saturday, 
October 10, 2009 4:52 AM<BR><B>To:</B> BATES Cress A (Lane 
Cty)<BR><B>Subject:</B> Re: [OpenLayers-Users] Popup Attribute Display 
format<BR></FONT><BR></DIV>
<DIV></DIV>Hi Cress, <BR><BR>Play around with the INFO_FORMAT-parameter of the 
<BR>getFeatureInfo-Request. E.g. "application/vnd.ogc.gml" would perhaps be 
<BR>better suited. <BR><BR>INFO_FORMAT: 'application/vnd.ogc.gml', 
<BR><BR>Afterwards look at the response and try to parse/read the servers' 
<BR>answer using a proper OpenLayers.Format. With the parsed info you can 
<BR>build any HTML you want and insert it into the popup. <BR><BR>Regards, 
<BR>Marc <BR><BR><BR><BR>Cress B. schrieb: 
<DIV class=shrinkable-quote><div class='shrinkable-quote'><BR>&gt; Hi all, <BR>&gt; <BR>&gt; I'm now using a 
WMS mapfile to display tax lot polygons and want to have a <BR>&gt; popup 
display when the user clicks on the tax lot. &nbsp;I've successfully gotten 
<BR>&gt; the popup to work using the getfeatureinfo method. &nbsp;I can control 
which <BR>&gt; items appear in the popup with "wms_include_items" in the 
Metadata portion <BR>&gt; of the Layer in my mapfile. &nbsp;But I'm having 
trouble figuring out how to <BR>&gt; format the display of those items in the 
popup. &nbsp;Currently the popup has the <BR>&gt; attrubutes basically all run 
together as one long string. &nbsp;I would like to <BR>&gt; show each attribute 
name and value on a separate line within the popup. <BR>&gt; <BR>&gt; Any help 
would be GREATLY appreciated, including an example if possible. <BR>&gt; 
<BR>&gt; code snip: <BR>&gt; <BR>&gt; &nbsp; &nbsp; var createPopup = 
function(response) { <BR>&gt; var lonlat = map.getLonLatFromViewPortPx(this.xy); 
<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; var popup = new 
OpenLayers.Popup.FramedCloud( <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp;"info",lonlat, null, response.responseText,null,true); 
<BR>&gt; popup.setBackgroundColor("#c1cdc1"); <BR>&gt; popup.setOpacity(0.7); 
<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; map.addPopup(popup, true /* exclusive */); 
<BR>&gt; <BR>&gt; function onFeatureUnselect(event) { <BR>&gt; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var feature = event.feature; <BR>&gt; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(feature.popup) { <BR>&gt; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;map.removePopup(feature.popup); <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;feature.popup.destroy(); <BR>&gt; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete feature.popup; 
<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} <BR>&gt; } <BR>&gt; 
&nbsp; &nbsp; }; <BR>&gt; <BR>&gt; &nbsp; &nbsp; map.events.register('click', 
map, function (e) { <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var url = 
&nbsp;wms.getFullRequestString({ <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REQUEST: 
"GetFeatureInfo", <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXCEPTIONS: 
"application/vnd.ogc.se_xml", <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BBOX: 
wms.map.getExtent().toBBOX(), <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X: e.xy.x, <BR>&gt; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; Y: e.xy.y, <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INFO_FORMAT: 
'text/plain', <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUERY_LAYERS: 'taxlots', <BR>&gt; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; WIDTH: wms.map.size.w, <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEIGHT: 
wms.map.size.h}, <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&gt; "<A href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/homeinfo_wms_v02.map&amp;SERVICE=WMS&amp;VERSION=1.1.1" target=_top rel="nofollow">http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/homeinfo_wms_v02.map&amp;SERVICE=WMS&amp;VERSION=1.1.1</A>"); 
<BR>&gt; <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
OpenLayers.loadURL(url, '',e, createPopup); <BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; OpenLayers.Event.stop(e); <BR>&gt; <BR>&gt; Thanks, <BR>&gt; 
<BR>&gt; Cress <BR>&gt; &nbsp; 
</DIV></div>_______________________________________________ <BR>Users mailing list 
<BR><A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3799529&amp;i=0" target=_top rel="nofollow">[hidden email]</A> <BR><A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>

<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Popup-Attribute-Display-format-tp3795578p3879484.html">RE: [OpenLayers-Users] Popup Attribute Display format</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>