0

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?

[]'s

glmlima
  • 1
  • 4
  • 7

2 Answers2

0

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.

monoid
  • 1,661
  • 11
  • 16
0

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...

Christophe Roussy
  • 16,299
  • 4
  • 85
  • 85