Hi Coup,

You could try digging through the YQL library or another web-based service
like tinygeocoder to get the coordinates client-side. Not sure if this
helps.

On Thu, Jun 16, 2011 at 1:02 PM, Coup Coup <[email protected]> wrote:

> Hi,
> I am using OpenLayers client side with a postGIS backend and have a map of
> county and zip layers that are hidden (each layer has one feature).
> I want to show them when the user requests them in a form GUI.
>
> To do this I need to :
> A) Obtain the centroid of the zip inputted from the features' geometry of
> the corresponding layer.
> B) Loop through the layers and perform a distance query on the centroid as
> compared to each layer's geometry to determine if it resides within x miles.
> C) Show the layer when the distance query returns true.
>
> I know how to toggle layer visibility (C). And I know how to access
> individual layers. I could use Ajax to perform the distance queries in
> POSTGIS, but would like to know how to do it client side so I can gauge
> performance (and gain more knowledge working with OpenLayers).
>
> Can anyone provide any insight or examples specifically in referencing
> geometries from layers and performing distance queries on them?
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to