Hi all, <br><br>I was using google maps and last week I decided to use OpenLayers, so I'm quite a new user.<br><br>So now I'm changing all my code to OpenLayers, but I have this problem that I was adding features from a database and then I was showing the balloons with the description. <br>
<br>Now I want to show it in a table that it is outside the map. But can anybody advise me what is the best way to add features from the database (they can be hundreds of polygons), I have try to use GML and the text file, but once they are in the map I can not detect when a feature was clicked, I was using this code:<br>
<br><br><br> function init(){<br> var mylayer = new OpenLayers.Layer.GML("GML", "../KML/MyPolygon.xml");<br> map.addLayer(mylayer);<br><br> selectControl = new OpenLayers.Control.SelectFeature(mylayer,<br>
{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});<br> selectControl.activate();<br> }<br><br><br>But doens't work, does anybody knows why?<br><br>And just one last thing, is this the best way to add hundreds of features to the map?<br>
<br>Thanks in advance<br><br>Carlos<br>