• JMap.Geometry.getPolygonFeature

    Returns true if the geometry type match the Layer geometry type, else false.

    Parameters

    • layerId: JId

      the JMap layer id

    • geometryType: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "GeometryCollection"

      the geometry type

    Returns boolean

    Throws

    if layer not found or layer is a layer group

    Example

    // returns true if the layer id=3 has "Polygon" features, else false
    const distance = JMap.Geometry.isGeometryTypeValidForLayer(3, "Polygon")