function isFeatureClicked(rings, point) {
  for (var i = 0; i < rings.length; i++) {
    if (inside(point, rings[i])) {
      // Point is in an exterior ring
      // Check whether point is in any interior rings
      var inInteriorRing = false;
      while (i + 1 < rings.length && !isExteriorRing(rings[i + 1])) {
        i++;
        if (!inInteriorRing && inside(point, rings[i])) {
          inInteriorRing = true;
          // Don't break. Still need to iterate over the rest of the interior rings but don't do point-in-polygon tests on those
        }
      }
      // Point is in exterior ring, but not in any interior ring. Therefore point is in the feature region
      if (!inInteriorRing) {
        return true;
      }
    }
  }
  return false;
}
//     if point not in any interior rings, feature is clicked
if point not in any interior rings, feature is clicked
if point not in any interior rings feature is clicked
function isFeatureClicked(rings, point) {
  for (var i = 0; i < rings.length; i++) {
    if (inside(point, rings[i])) {
      var inInteriorRing = false;
      while (i + 1 < rings.length && !isExteriorRing(rings[i + 1])) {
        i++;
        if (!inInteriorRing && inside(point, rings[i])) {
          inInteriorRing = true;
        }
      }
      if (!inInteriorRing) {
        return true;
      }
    }
  }
  return false;
}
function isFeatureClicked ( rings , point ) { for ( var i = 0 ; i < rings . length ; i ++ ) { if ( inside ( point , rings [ i ] ) ) { var inInteriorRing = false ; while ( i + 1 < rings . length && ! isExteriorRing ( rings [ i + 1 ] ) ) { i ++ ; if ( ! inInteriorRing && inside ( point , rings [ i ] ) ) { inInteriorRing = true ; } } if ( ! inInteriorRing ) { return true ; } } } return false ; }
if point not in any interior rings, feature is clicked
if point not in any interior rings feature is clicked
// Point is in an exterior ring // Check whether point is in any interior rings // Don't break. Still need to iterate over the rest of the interior rings but don't do point-in-polygon tests on those // Point is in exterior ring, but not in any interior ring. Therefore point is in the feature region