function jsmCenterOnLastPushpin(showLastPointOnly)
{
    if (!jsmap) { return; }

    /* remove old layers */
    jsmap.JSClearLayers();

    /* draw POI */
    if (jsvPoiPins && (jsvPoiPins.length > 0)) {
        jsmap.JSDrawPOI(jsvPoiPins);
    }

    /* data set */
    if (jsvDataSets && (jsvDataSets.length > 0)) {
        var jds = jsvDataSets[0];

        /* draw the route line first */
        if (jds.routePoints && (jds.routePoints.length >= 2) && (jds.routeColor != ROUTE_COLOR_NONE)) {
            jsmap.JSDrawRoute(jds.routePoints, jds.routeColor);
        }

        /* draw the pushpins */
        var jpp = jds.pushPins;
        if (jpp && (jpp.length > 0)) {
            if (showLastPointOnly) {
                var lastPoint = [ jpp[jpp.length - 1] ];
                jsmap.JSDrawPushpins(lastPoint, jsmRecenterZoomMode(RECENTER_ZOOM), REPLAY_STOPPED);
            } else {
                jsmap.JSDrawPushpins(jpp, jsmRecenterZoomMode(RECENTER_ZOOM), REPLAY_STOPPED);
            }
        }

    }

    /* close the detail report */
    jsvDetailVisible = false;
    jsmShowDetailReport();

}
/**
*** Centers on the last available point
**/
Centers on the last available point
Centers on the last available point
function jsmCenterOnLastPushpin(showLastPointOnly)
{
    if (!jsmap) { return; }
    jsmap.JSClearLayers();
    if (jsvPoiPins && (jsvPoiPins.length > 0)) {
        jsmap.JSDrawPOI(jsvPoiPins);
    }
    if (jsvDataSets && (jsvDataSets.length > 0)) {
        var jds = jsvDataSets[0];
        if (jds.routePoints && (jds.routePoints.length >= 2) && (jds.routeColor != ROUTE_COLOR_NONE)) {
            jsmap.JSDrawRoute(jds.routePoints, jds.routeColor);
        }
        var jpp = jds.pushPins;
        if (jpp && (jpp.length > 0)) {
            if (showLastPointOnly) {
                var lastPoint = [ jpp[jpp.length - 1] ];
                jsmap.JSDrawPushpins(lastPoint, jsmRecenterZoomMode(RECENTER_ZOOM), REPLAY_STOPPED);
            } else {
                jsmap.JSDrawPushpins(jpp, jsmRecenterZoomMode(RECENTER_ZOOM), REPLAY_STOPPED);
            }
        }
    }
    jsvDetailVisible = false;
    jsmShowDetailReport();
}
function jsmCenterOnLastPushpin ( showLastPointOnly ) { if ( ! jsmap ) { return ; } jsmap . JSClearLayers ( ) ; if ( jsvPoiPins && ( jsvPoiPins . length > 0 ) ) { jsmap . JSDrawPOI ( jsvPoiPins ) ; } if ( jsvDataSets && ( jsvDataSets . length > 0 ) ) { var jds = jsvDataSets [ 0 ] ; if ( jds . routePoints && ( jds . routePoints . length >= 2 ) && ( jds . routeColor != ROUTE_COLOR_NONE ) ) { jsmap . JSDrawRoute ( jds . routePoints , jds . routeColor ) ; } var jpp = jds . pushPins ; if ( jpp && ( jpp . length > 0 ) ) { if ( showLastPointOnly ) { var lastPoint = [ jpp [ jpp . length - 1 ] ] ; jsmap . JSDrawPushpins ( lastPoint , jsmRecenterZoomMode ( RECENTER_ZOOM ) , REPLAY_STOPPED ) ; } else { jsmap . JSDrawPushpins ( jpp , jsmRecenterZoomMode ( RECENTER_ZOOM ) , REPLAY_STOPPED ) ; } } } jsvDetailVisible = false ; jsmShowDetailReport ( ) ; }
Centers on the last available point
Centers on the last available point
/* remove old layers */ /* draw POI */ /* data set */ /* draw the route line first */ /* draw the pushpins */ /* close the detail report */