Yes you are right ,I am making it right! Thank you!<br><br>At 2010-08-19 17:52:29,"Sveen Atle Frenvik (Geomatikk IKT) [via OSGeo.org]" <<a href="/user/SendEmail.jtp?type=node&node=5443445&i=0" target="_top" rel="nofollow">[hidden email]</a>> wrote:<br> <BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TITLE>Re: [OpenLayers-Users] How to re-format the tables in popups?</TITLE>
<P><FONT SIZE="2">As you are using getFeatureInfo you are displaying a table generated by<BR>
your wms-server (which seems to be Geoserver, right?).<BR>
<BR>
In that case I guess the simplest fix is to edit the getfeatureInfo<BR>
templete in geoserver, as described here:<BR>
<A HREF="http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates" target="_top" rel="nofollow" link="external">http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates</A><BR>
<BR>
<BR>
(technically i guess you could try and alter the returned html in<BR>
javascript, but i wouldn't go there...)<BR>
<BR>
-atle<BR>
<BR>
On 08/19/2010 06:07 AM, geekjack wrote:<BR>
> <A href="http://osgeo-org.1803224.n2.nabble.com/file/n5438892/popup.png?by-user=t&by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/file/n5438892/popup.png</A><BR>
><BR>
> Hi All!<BR>
> See the Image ?<BR>
> I use the codes below to get features , and the features showed like<BR>
> that which is a long and unfriendly table in the map.<BR>
> now I got two problems:<BR>
> (1)I just want some attributes of the clicked feature. for example .<BR>
> when I click the map on the "WY",I just want the popup show its "state_name"<BR>
> and "state_fips" of "WY",<BR>
> (2) and the next step I want to do is puting the data in a more<BR>
> friendly table,such as this:<BR>
> <A href="http://osgeo-org.1803224.n2.nabble.com/file/n5438892/2.png?by-user=t&by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/file/n5438892/2.png</A> ,<BR>
> what should be change and how? thank you!!<BR>
><BR>
> part of my codes:<BR>
> var state = new OpenLayers.Layer.WMS(<BR>
> "state 2","<A HREF="http://localhost:8081/geoserver/wms" target="_top" rel="nofollow" link="external">http://localhost:8081/geoserver/wms</A>",<BR>
> {<BR>
> layers: 'topp:states',<BR>
> styles: '',<BR>
> srs: 'EPSG:4326',<BR>
> format: format<BR>
> } );<BR>
> info = new OpenLayers.Control.WMSGetFeatureInfo({<BR>
> url: '<A HREF="http://localhost:8081/geoserver/wms'" target="_top" rel="nofollow" link="external">http://localhost:8081/geoserver/wms'</A>,<BR>
> title: 'Identify features by clicking',<BR>
> queryVisible: true,<BR>
> eventListeners: {<BR>
> getfeatureinfo: function(event){<BR>
> if(event.text.length != 687) {<BR>
> map.addPopup(new OpenLayers.Popup.FramedCloud(<BR>
> "chicken",<BR>
> map.getLonLatFromPixel(event.xy),<BR>
> null,<BR>
> event.text,<BR>
> null,<BR>
> true<BR>
> ));<BR>
> }<BR>
> }<BR>
> }<BR>
> });<BR>
> map.addControl(info);<BR>
> info.activate();<BR>
> <BR>
<BR>
<BR>
--<BR>
Atle Frenvik Sveen<BR>
Utvikler<BR>
Geomatikk IKT AS<BR>
tlf: 45 27 86 89<BR>
<a href="/user/SendEmail.jtp?type=node&node=5439553&i=0&by-user=t" target="_top" rel="nofollow" link="external">[hidden email]</a><BR>
<BR>
</FONT>
</P>
<br>_______________________________________________
<br>Users mailing list
<br><a href="/user/SendEmail.jtp?type=node&node=5439553&i=1&by-user=t" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br><a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>
<br><br>
<hr noshade size="1" color="#cccccc">
<div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
View message @ <a href="http://osgeo-org.1803224.n2.nabble.com/How-to-re-format-the-tables-in-popups-tp5438892p5439553.html?by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/How-to-re-format-the-tables-in-popups-tp5438892p5439553.html</a>
<br>To unsubscribe from How to re-format the tables in popups?, <a href="http://osgeo-org.1803224.n2.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=5438892&code=Z2Vla2phY2tAMTYzLmNvbXw1NDM4ODkyfDE5NzAwMjI4NzI=&by-user=t" target="_top" rel="nofollow" link="external">click here</a>.
</div>
<br>
</BLOCKQUOTE><br><br><span title="neteasefooter"/><hr/>
<a href="http://qiye.163.com/?163" target="_blank" rel="nofollow" link="external">您想拥有和网易免费邮箱一样强大的软件吗?</a>
</span>
<br><hr align="left" width="300">
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/How-to-re-format-the-tables-in-popups-tp5438892p5443445.html">Re:Re: How to re-format the tables in popups?</a><br>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>