<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 &lt;sb.ray@hotmail.com&gt;<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>&nbsp; &nbsp; NAME 'STATE'<br>&nbsp; &nbsp; TYPE POLYGON<br>&nbsp; &nbsp; DATA 'C:\ms4w\Apache\cgi-bin\Shape\STATE.shp'<br>&nbsp; &nbsp; METADATA<br>&nbsp; &nbsp; &nbsp; 'wms_title' 'STATE'<br>&nbsp; &nbsp; END<br>&nbsp; &nbsp; STATUS
 DEFAULT<br>&nbsp; &nbsp; TRANSPARENCY 100<br>&nbsp; &nbsp; PROJECTION<br>&nbsp; &nbsp; 'proj=longlat'<br>&nbsp; &nbsp; 'ellps=WGS84'<br>&nbsp; &nbsp; 'datum=WGS84'<br>&nbsp; &nbsp; 'no_defs'<br>&nbsp; &nbsp; ''<br>&nbsp; &nbsp; END<br>&nbsp; &nbsp; CLASS<br>&nbsp; &nbsp; &nbsp;  NAME 'STATE' <br>&nbsp; &nbsp; &nbsp;  STYLE<br>&nbsp; &nbsp; &nbsp; &nbsp;  SYMBOL 0 <br>&nbsp; &nbsp; &nbsp; &nbsp;  SIZE 2 <br>&nbsp; &nbsp; &nbsp; &nbsp;  OUTLINECOLOR 0 0 0<br>&nbsp; &nbsp; &nbsp; &nbsp;  COLOR 255 255 127<br>&nbsp; &nbsp; &nbsp;  END<br>&nbsp; &nbsp; END<br>&nbsp; END<br><br>&nbsp; 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>&nbsp;  a WMS&nbsp; call to each of the layers in a mapfile as shown below.<br><br>function init() {<br><br>&nbsp; &nbsp; &nbsp; &nbsp;  //alert("in
 init");<br>&nbsp; &nbsp; &nbsp; &nbsp;  map = new OpenLayers.Map('&lt;%=map.ClientID%&gt;');<br><br>&nbsp; &nbsp; &nbsp; &nbsp;  //<br>&nbsp; &nbsp; &nbsp; &nbsp;  layer = new OpenLayers.Layer.WMS("OpenLayers WMS",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<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>&nbsp; &nbsp; &nbsp; &nbsp;  layer1 = new OpenLayers.Layer.WMS("BASIC",<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  map.addLayers([layer,layer1]);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.setCenter(new OpenLayers.LonLat(73.25,
 20.35), 6);<br><br><br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<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>