2

How do I tell whether an OL3 feature is a point, line, or polygon? I need to highlight features on mouseover, and the style required is different for points, so I need to be able to tell which geometry type a feature is, so that I can apply the correct style.

7

Found it: feature.getGeometry().getType()

0

This is the link to the official documentation of OL3 API for getType(). Its not available in the list of functions defined for Geometry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.