[OpenLayers-Dev] Layer Type (POINT, MULTIPOINT, ..., LINE, POLY)?

Christopher Schmidt crschmidt at metacarta.com
Wed Dec 16 11:18:54 EST 2009


On Wed, Dec 16, 2009 at 08:02:22AM -0800, geojoe wrote:
> 
> How can I determine the layer feature type (POINT, MULTIPOINT, ...) if I have
> the layer.
> 
> thelayer = 
> document.getElementById('idSelect').options[document.getElementById('idSelect').selectedIndex].value

Layers in OpenLayers don't have a limit in the type of geometry they support.
You can test the features to check their geometry by checking the
feature.geometry.CLASS_NAME.

-- Chris

> Joe
> -- 
> View this message in context: http://n2.nabble.com/Layer-Type-POINT-MULTIPOINT-LINE-POLY-tp4176282p4176282.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list