<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thank you Arnd, that works.<br><br>For anyone's interest, a round-about way of distinguishing a point from a polygon is to check the number of points within it so this works (was backup plan):<br>yourSelectedLayer.features[0].geometry.getVertices().length<br><br>--- On <b>Wed, 7/6/11, Arnd Wippermann <i><arnd.wippermann@web.de></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Arnd Wippermann <arnd.wippermann@web.de><br>Subject: AW: [OpenLayers-Users] Identifying geometry type<br>To: "'Coup Coup'" <tencoupons55@yahoo.com><br>Cc: users@openlayers.org<br>Date: Wednesday, July 6, 2011, 1:43 PM<br><br><div id="yiv1614355659">
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span class="yiv1614355659296544220-06072011">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span class="yiv1614355659296544220-06072011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span class="yiv1614355659296544220-06072011">that would be a possibility</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2">yourSelectedLayer.features[0].geometry.CLASS_NAME</font></div>
<div> </div>
<div><span class="yiv1614355659296544220-06072011"></span><font face="Arial"><font color="#0000ff"><font size="2">A<span class="yiv1614355659296544220-06072011">rnd</span></font></font></font><br></div>
<div dir="ltr" class="yiv1614355659OutlookMessageHeader" lang="de" align="left">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>Von:</b> openlayers-users-bounces@lists.osgeo.org
[mailto:openlayers-users-bounces@lists.osgeo.org] <b>Im Auftrag von </b>Coup
Coup<br><b>Gesendet:</b> Mittwoch, 6. Juli 2011 22:25<br><b>An:</b>
openlayers-users@lists.osgeo.org<br><b>Betreff:</b> [OpenLayers-Users]
Identifying geometry type<br></font><br></div>
<div></div>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">I have several layers on a map. In this case, I have a
single geometry on each layer. THe geometries are either Polygon,
MultiPolygon or Points.<br><br>I need to be able to identify the geometry
type so I can act accordingly when the layer is selected.<br><br>Does
anyone know how to identify the geometry
type?<br></td></tr></tbody></table></div></blockquote></td></tr></table>