<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>HI,<br><br>did you already see this:<br><span><a target="_blank" href="http://www.openlayers.org/dev/examples/">http://www.openlayers.org/dev/examples/</a></span><br><span>(and <a target="_blank" href="http://dev.openlayers.org/releases/OpenLayers-2.8/examples/">http://dev.openlayers.org/releases/OpenLayers-2.8/examples/</a>) ?</span><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>HTH.<br><br>best regards<br>Sarah<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> sunny74 <sb.ray@hotmail.com><br><b><span style="font-weight: bold;">An:</span></b> users@openlayers.org<br><b><span style="font-weight:
bold;">Gesendet:</span></b> Samstag, den 20. März 2010, 21:17:14 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [OpenLayers-Users] getting Feature Info data directly from .shpfiles<br></font><br><br>Hi Arnd,<br><br>Thanks for our reply.<br><br>You have understood my question rightly.<br>I want to display the attributes of a layer(one layer is one .shp file) in a<br>pop up using openlayers.This <br>we get to see if the .shp file is converted to a DB table.<br><br>1) You have given some mapfile code.But I am not sure exactly where to<br>insert within the layer definition.<br>So if a typical layer of mine is as given below can u pls tell me where I<br>have to insert the mapfile statements.<br><br>LAYER<br> NAME 'STATE'<br> TYPE POLYGON<br> DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'<br> METADATA<br> 'wms_title' 'STATE'<br> END<br> STATUS
DEFAULT<br> TRANSPARENCY 100<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br> 'no_defs'<br> ''<br> END<br> CLASS<br> NAME 'STATE' <br> STYLE<br> SYMBOL 0 <br> SIZE 2 <br> OUTLINECOLOR 0 0 0<br> COLOR 255 255 127<br> END<br> END<br> END<br><br> Where do I write info_format = text/plain for getting the attributes as<br>plain text.<br><br>2) How do I collect the attribute data in a javascript function or<br>openlayers event,function.Presently I am only making <br> a WMS call to each of the layers in a mapfile as shown below.<br><br>function init() {<br><br> //alert("in
init");<br> map = new OpenLayers.Map('<%=map.ClientID%>');<br><br> //<br> layer = new OpenLayers.Layer.WMS("OpenLayers WMS",<br> "<a href="http://localhost:9000/cgi-bin/mapserv.exe" target="_blank">http://localhost:9000/cgi-bin/mapserv.exe</a>?", { map:<br>'Shape/newwr1.map', layers: 'STATE', 'format': 'png' });<br><br> layer1 = new OpenLayers.Layer.WMS("BASIC",<br> "<a href="http://localhost:9000/cgi-bin/mapserv.exe" target="_blank">http://localhost:9000/cgi-bin/mapserv.exe</a>?", { map:<br>'Shape/newwr1.map', transparent: 'true', layers: 'basic', 'format': 'png'<br>});<br><br><br> map.addLayers([layer,layer1]);<br> map.setCenter(new OpenLayers.LonLat(73.25,
20.35), 6);<br><br><br><br><br> }<br>The above function is just showing the map layers in a div.<br>If I have a similar js function what kind of a call do I make to get the<br>attribute data.<br><br>Is there any complete example given somewhere?<br>Pls reply soon.<br><br><br>-- <br>View this message in context: <a href="http://n2.nabble.com/getting-Feature-Info-data-directly-from-shp-files-tp4767879p4769867.html" target="_blank">http://n2.nabble.com/getting-Feature-Info-data-directly-from-shp-files-tp4767879p4769867.html</a><br>Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@openlayers.org" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br></div></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>