Trigger event on openlayers

I have a web map with vector points. When you click one, a FramedCloud popup will appear with data based on these feature.vector attributes. It is possible to search all points in an input text field with the addition of jquery autocomplete. However, if the user uses this autocomplete, only one vector.point remains in the entire map. I would like to have this item automatically clicked.

 selector: new OpenLayers.Control.SelectFeature(warstwa_ikon, { onSelect: PopupLokal, onUnselect: destroyPopup }

      

warstwa_ikon is my feature layer, PopupLokal (function) is the function that generates FramedCloud.

I've tried this:

map.events.triggerEvent('click', warstwa_ikon.features[0]);

      

But this gives an error: TypeError: (intermediate) ._ featureId is undefined . I have tried using warstwa_ikon.features [0] .id and several other methods to provide this function with the id of my lone vector point, but with no success.

+3


source to share





All Articles