(Geoserver + OpenLayers) Search item by coordinates (lat/long) or id

I'm using Geoserver (2.3.0) + OpenLayers(2.12), but with no previous experience on GEO systems :(.

I need to locate in the map the item located in lat/long, or by the primary key. But I have found only the inverse situation, in other words, if the user clicks on item, it is possible to recover the lat/long.

Someone knows how to find this item?



You may send coordinates to GetFeatureInfo WMS query to geoserver (with AJAX) and parse its response.

As of ID, you may write simple page that access database and returns info.

If the items are already added to the map you may use OpenLayers.Filter.Spatial:

Otherwise you have to perform the search either with custom JavaScript on the client side or some server side implementation (see other answers). You will probably need to return the nearest points to your search, where nearest depends on your preferences...

Need Your Help

Integrating ROR community engine to my existing app

ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 rubygems

Am trying to integrate Community Engine to my application.But it is showing dependency error.I tried to correct all the dependencies,but it is not integrating.

About Interface Builder components release

ios interface-builder xib

If I have some objects like UILabel, UIImageView, etc. on my XIB

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.