Hi Guillermo,<br><br>Look if you can use:<br><i>feature.attributes["city_name"]</i><br><br>example<br><span style="color: rgb(51, 51, 255);">featureinfo = function(feature)</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">{</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">alert(</span><i style="color: rgb(51, 51, 255);">feature.attributes["city_name"])</i>;<br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">}</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">controls = {</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">...</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">featureinfocontrol: new OpenLayers.Control.SelectFeature(myvectorlayer, {onSelect: featureinfo});</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">}</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">...</span><br><br>All the best,<br>Adorian<br><br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 12:37 PM, Guillermo Lopez Mackinnon <span dir="ltr"><<a href="mailto:gmlopez.mackinnon@gmail.com">gmlopez.mackinnon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks for your reply!<br>Actually, I meant the feature attributes like for instance "city_name", "population" and so on. I´d like to display some of them when the user clicks on a feature and since I may have several layers, doing it in the way I explained in my initial post it'll be pretty tedious so I'd say it should be some other way (a correct way) of doing this kind of stuff. Am I right?<br>
<br><br>Thanks again for your help!<br><font color="#888888"><br>Guillermo</font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 11:40 AM, Adorian Ardelean <span dir="ltr"><<a href="mailto:mynature@gmail.com" target="_blank">mynature@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Nino,<br><br>Do you mean all nodes of a polygon? If yes, you could explore Vector Formats Example in <a href="http://openlayers.org/dev/examples/" target="_blank">http://openlayers.org/dev/examples/</a> where is shows also how you could output coordinates of a feature in various formats.<br>
<br>All the best,<br>Adorian<br><br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 11:24 AM, Nino Saturnino Martinez Vazquez Wael <span dir="ltr"><<a href="mailto:nino.martinez@jayway.dk" target="_blank">nino.martinez@jayway.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">How can I extract all points for a geometry?<br>
<br>
<a href="http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Geometry/Collection-js.html#OpenLayers.Geometry.Collection" target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Geometry/Collection-js.html#OpenLayers.Geometry.Collection</a><br>
, do I need to call a field directly?<br>
<br>
<br>
--<br>
-Wicket for love<br>
<br>
Nino Martinez Wael<br>
Java Specialist @ Jayway DK<br>
<a href="http://www.jayway.dk" target="_blank">http://www.jayway.dk</a><br>
+45 2936 7684<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Dr. Adorian Ardelean<br>coordinator of myNature Project<br><br><a href="http://mybiosis.info/nature/portal.php?pagename=firstpage" target="_blank">http://mybiosis.info/nature/portal.php?pagename=firstpage</a> [a Romanian biodiversity-database]<br>
<a href="http://mybiosis.info/nature/portal.php?pagename=adorian" target="_blank">http://mybiosis.info/nature/portal.php?pagename=adorian</a> [CV]<br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dr. Adorian Ardelean<br>coordinator of myNature Project<br><br><a href="http://mybiosis.info/nature/portal.php?pagename=firstpage">http://mybiosis.info/nature/portal.php?pagename=firstpage</a> [a Romanian biodiversity-database]<br>
<a href="http://mybiosis.info/nature/portal.php?pagename=adorian">http://mybiosis.info/nature/portal.php?pagename=adorian</a> [CV]<br>