Hi Coup,<div><br></div><div>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.<br><div><br><div class="gmail_quote">On Thu, Jun 16, 2011 at 1:02 PM, Coup Coup <span dir="ltr">&lt;<a href="mailto:tencoupons55@yahoo.com">tencoupons55@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi,<br>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).<br>
I want to show them when the user requests them in a form GUI.<br><br>To do this I need to :<br>A) Obtain the centroid of the zip inputted from the features&#39; geometry of the corresponding layer.<br>B) Loop through the layers and perform a distance query on the centroid as compared to each layer&#39;s geometry to determine if it resides within x miles.<br>
C) Show the layer when the distance query returns true.<br><br>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).<br>
<br>Can anyone provide any
 insight or examples specifically in referencing geometries from layers and performing distance queries on them?<br></td></tr></tbody></table><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br></div></div>