function jsmLoadPoints(mapURL, recenterMode, replay)
{
    try {
        var req = jsmGetXMLHttpRequest();
        if (req) {
            req.open("GET", mapURL, true);
            //req.setRequestHeader("CACHE-CONTROL", "NO-CACHE");
            //req.setRequestHeader("PRAGMA", "NO-CACHE");
            req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
            req.onreadystatechange = function() {
                if (req.readyState == 4) {
                    var data = req.responseText; // JSON/XML
                    if (data.trim().toUpperCase() == DATA_RESPONSE_LOGOUT) {
                        alert(TEXT_TIMEOUT);
                        jsmSetLoadingPointsState(0);
                    } else {
                        jsmParseAJAXPoints(data, recenterMode, replay);
                        jsmSetLoadingPointsState(0);
                    }
                } else
                if (req.readyState == 1) {
                    // alert('Loading points from URL: [' + req.readyState + ']\n' + mapURL);
                } else {
                    // alert('Problem loading URL? [' + req.readyState + ']\n' + mapURL);
                }
            };
            jsmSetLoadingPointsState(1);
            req.send(null);
        } else {
            alert("Error [jsmLoadPoints]:\n" + mapURL);
        }
    } catch (e) {
        alert("Error [jsmLoadPoints]:\n" + e);
    }
}
/**
*** Load and display point from the specified URL and display them on the current map
**/
Load and display point from the specified URL and display them on the current map
Load and display point from the specified URL and display them on the current map
function jsmLoadPoints(mapURL, recenterMode, replay)
{
    try {
        var req = jsmGetXMLHttpRequest();
        if (req) {
            req.open("GET", mapURL, true);
            req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
            req.onreadystatechange = function() {
                if (req.readyState == 4) {
                    var data = req.responseText; 
                    if (data.trim().toUpperCase() == DATA_RESPONSE_LOGOUT) {
                        alert(TEXT_TIMEOUT);
                        jsmSetLoadingPointsState(0);
                    } else {
                        jsmParseAJAXPoints(data, recenterMode, replay);
                        jsmSetLoadingPointsState(0);
                    }
                } else
                if (req.readyState == 1) {
                } else {
                }
            };
            jsmSetLoadingPointsState(1);
            req.send(null);
        } else {
            alert("Error [jsmLoadPoints]:\n" + mapURL);
        }
    } catch (e) {
        alert("Error [jsmLoadPoints]:\n" + e);
    }
}
function jsmLoadPoints ( mapURL , recenterMode , replay ) { try { var req = jsmGetXMLHttpRequest ( ) ; if ( req ) { req . open ( "GET" , mapURL , true ) ; req . setRequestHeader ( "If-Modified-Since" , "Sat, 1 Jan 2000 00:00:00 GMT" ) ; req . onreadystatechange = function ( ) { if ( req . readyState == 4 ) { var data = req . responseText ; if ( data . trim ( ) . toUpperCase ( ) == DATA_RESPONSE_LOGOUT ) { alert ( TEXT_TIMEOUT ) ; jsmSetLoadingPointsState ( 0 ) ; } else { jsmParseAJAXPoints ( data , recenterMode , replay ) ; jsmSetLoadingPointsState ( 0 ) ; } } else if ( req . readyState == 1 ) { } else { } } ; jsmSetLoadingPointsState ( 1 ) ; req . send ( null ) ; } else { alert ( "Error [jsmLoadPoints]:\n" + mapURL ) ; } } catch ( e ) { alert ( "Error [jsmLoadPoints]:\n" + e ) ; } }
Load and display point from the specified URL and display them on the current map
Load and display point from the specified URL and display them on the current map
//req.setRequestHeader("CACHE-CONTROL", "NO-CACHE"); //req.setRequestHeader("PRAGMA", "NO-CACHE"); // JSON/XML // alert('Loading points from URL: [' + req.readyState + ']\n' + mapURL); // alert('Problem loading URL? [' + req.readyState + ']\n' + mapURL);