Hi all,

I was using google maps and last week I decided to use OpenLayers, so I'm
quite a new user.

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.

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:



            function init(){
            var mylayer =   new OpenLayers.Layer.GML("GML",
"../KML/MyPolygon.xml");
               map.addLayer(mylayer);

            selectControl = new OpenLayers.Control.SelectFeature(mylayer,
                {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});
            selectControl.activate();
          }


But doens't work, does anybody knows why?

And just one last thing, is this the best way to add hundreds of features to
the map?

Thanks in advance

Carlos
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to