function jsmParseGeozones(zonePoints)
{
    if (!jsmap) { return; }
    // external var: jsvZoneRadiusMeters, jsvZoneEditable

    /* no zones? */
    if (zonePoints == null) {
        return 0;
    }

    /* parse zones */
    var pointCount = 0;
    //var points = [];
    var zoneIndex = zoneMapGetIndex();
    if ((zoneIndex >= 0) && (zoneIndex < zonePoints.length)) {
        // a specific point
        var z = zoneIndex;
        if (geoIsValid(zonePoints[z].lat,zonePoints[z].lon)) {
            //points.push(zonePoints[z]);
            pointCount++;
        }
    } else {
        // all points
        for (var z = 0; z < zonePoints.length; z++) {
            if (geoIsValid(zonePoints[z].lat,zonePoints[z].lon)) {
                //points.push(zonePoints[z]);
                pointCount++;
            }
        }
    }

    /* draw Geozone */
    // jsvZoneType:
    //   0 - ZONE_POINT_RADIUS
    //   1 - ZONE_BOUNDED_RECT
    //   2 - ZONE_SWEPT_POINT_RADIUS
    //   3 - ZONE_POLYGON
    //alert("Selected Zone Index: " + zoneIndex);
    jsmap.JSDrawGeozone(jsvZoneType, jsvZoneRadiusMeters, zonePoints, jsvZoneColor, zoneIndex);
    return pointCount;

}
/**
*** Parse the specified csv Geozones and display them on the current map
*** @param zonePoints  Array of JSMapPoint's
**/
Parse the specified csv Geozones and display them on the current map
Parse the specified csv Geozones and display them on the current map
function jsmParseGeozones(zonePoints)
{
    if (!jsmap) { return; }
    if (zonePoints == null) {
        return 0;
    }
    var pointCount = 0;
    var zoneIndex = zoneMapGetIndex();
    if ((zoneIndex >= 0) && (zoneIndex < zonePoints.length)) {
        var z = zoneIndex;
        if (geoIsValid(zonePoints[z].lat,zonePoints[z].lon)) {
            pointCount++;
        }
    } else {
        for (var z = 0; z < zonePoints.length; z++) {
            if (geoIsValid(zonePoints[z].lat,zonePoints[z].lon)) {
                pointCount++;
            }
        }
    }
    jsmap.JSDrawGeozone(jsvZoneType, jsvZoneRadiusMeters, zonePoints, jsvZoneColor, zoneIndex);
    return pointCount;
}
function jsmParseGeozones ( zonePoints ) { if ( ! jsmap ) { return ; } if ( zonePoints == null ) { return 0 ; } var pointCount = 0 ; var zoneIndex = zoneMapGetIndex ( ) ; if ( ( zoneIndex >= 0 ) && ( zoneIndex < zonePoints . length ) ) { var z = zoneIndex ; if ( geoIsValid ( zonePoints [ z ] . lat , zonePoints [ z ] . lon ) ) { pointCount ++ ; } } else { for ( var z = 0 ; z < zonePoints . length ; z ++ ) { if ( geoIsValid ( zonePoints [ z ] . lat , zonePoints [ z ] . lon ) ) { pointCount ++ ; } } } jsmap . JSDrawGeozone ( jsvZoneType , jsvZoneRadiusMeters , zonePoints , jsvZoneColor , zoneIndex ) ; return pointCount ; }
Parse the specified csv Geozones and display them on the current map
Parse the specified csv Geozones and display them on the current map
// external var: jsvZoneRadiusMeters, jsvZoneEditable /* no zones? */ /* parse zones */ //var points = []; // a specific point //points.push(zonePoints[z]); // all points //points.push(zonePoints[z]); /* draw Geozone */ // jsvZoneType: //   0 - ZONE_POINT_RADIUS //   1 - ZONE_BOUNDED_RECT //   2 - ZONE_SWEPT_POINT_RADIUS //   3 - ZONE_POLYGON //alert("Selected Zone Index: " + zoneIndex);