I am using Openlayers + Geoext1 + ExtJs3.4.

I have an ExtJs combobox next to the map with several points of the map that are provided from a PostGIS database through Php/XmlHttprequest.

At the same time I have a map with all points containing their respective attributes.

I need to select a point from the list and then this point must be searched on the map an centered on it.

How should I proceed with this case?

I am thinking about relating combobox valuefield with map feature id or perhaps retrieving coordinates directly from the database and centering the map on this coordinates.

1 Answer 1


I suggest getting the geometry from the database and using that to center the point in the map.

To center it you need to do:

var pointCenter = new OpenLayers.LonLat(//here the way you get the geometry);

If you have a combo box, you could use a function in a handler to call some urls pointing to your php script, or simply add that combo to a geoext formpanel or featurestore to get the geometry data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.