[OpenLayers-Users] How to get information on clicking on a polygon

kusum kusum at infobase.in
Mon Mar 17 06:12:25 EDT 2008


this feature also uses points for a polygon and the problem is I have 
geometry of polygon and not the x y cordinates.
Please suggest any function if there in postgres  to convert the goemetry 
field to cordinates or any other method in openlayers if exists to highlight 
polygon using  goemetry.

--------------------------------------------------
From: "Eric Lemoine" <eric.c2c at gmail.com>
Sent: Monday, March 17, 2008 3:30 PM
To: "kusum" <kusum at infobase.in>
Cc: <users at openlayers.org>
Subject: Re: [OpenLayers-Users] How to get information on clicking on a 
polygon

> On Mon, Mar 17, 2008 at 8:07 AM, kusum <kusum at infobase.in> wrote:
>> Hi Eric
>>
>>  Thanks for replying back.
>>  I am able to fetch information from database. But the problem is that I 
>> am
>>  not able to highlight the polygon on map.
>>  To highlight it on map I need all the points in it. But the database I 
>> have
>>  in postgresql has field goem and I am not getting how to convert the 
>> goem
>>  field into coordinates so that I can get points to highlight the polygon 
>> on
>>  map.
>>
>>  Please suggest any function if there in postgres to convert the goemetry
>>  field to cordinates or any other method if exists to highlight polygon 
>> using
>>  goemetry.
>
> You have multiple solutions. One simple solution involves having the
> server send the wkt string and use OpenLayers.Format.WKT to parse that
> string.
>
> --
> Eric 





More information about the Users mailing list