web/js/googlemap.js
// write kml for Directions in text area
write kml for Directions in text area
write kml for Directions in text area
function logCode1a(){
    if (notext === true) return;
    gob('coords1').value = "";
    var code = "";
    var kmltext1 = '<Placemark><name>'+placemarks[dirline].name+'</name>\n' +
                    '<description>'+placemarks[dirline].desc+'</description>\n' +
                    '<styleUrl>#'+placemarks[dirline].style+'</styleUrl>\n' +
                    '<LineString>\n<tessellate>'+placemarks[dirline].tess+'</tessellate>\n' +
                    '<altitudeMode>'+placemarks[dirline].alt+'</altitudeMode>\n<coordinates>\n';
    if(pointsArrayKml.length != 0) {
        for(var i = 0; i < pointsArrayKml.length; i++) {
            code += pointsArrayKml[i] + ',0.0 \n';
        }
        placemarks[dirline].jscode = pointsArray;
        placemarks[dirline].kmlcode = pointsArrayKml;
    }
    kmltext2 = '</coordinates>\n</LineString>\n</Placemark>\n';
    placemarks[dirline].plmtext = kmltext1+code+kmltext2;
    placemarks[dirline].poly = "pl";
    gob('coords1').value = kmlheading()+kmltext1+code+kmltext2;
    if(markersArrayKml.length != 0) {
        for(i = 0; i < markersArrayKml.length; i++) {
            var kmlMarker = "";
            var m = dirline + 1;
            kmlMarker += '<Placemark><name>'+placemarks[m+i].name+'</name>\n' +
                            '<description>'+addresssArray[i]+'</description>\n' +
                            '<styleUrl>#'+placemarks[m+i].style+'</styleUrl>\n' +
                            '<Point>\n<coordinates>';
            kmlMarker += markersArrayKml[i] + ',0.0';
            kmlMarker += '</coordinates>\n</Point>\n</Placemark>\n';
            placemarks[m+i].jscode = markersArray[i];
            placemarks[m+i].kmlcode = markersArrayKml[i];
            placemarks[m+i].plmtext = kmlMarker;
            gob('coords1').value += kmlMarker;
        }
    }
    gob('coords1').value += kmlend();
}
function logCode1a ( ) { if ( notext === true ) return ; gob ( 'coords1' ) . value = "" ; var code = "" ; var kmltext1 = '<Placemark><name>' + placemarks [ dirline ] . name + '</name>\n' + '<description>' + placemarks [ dirline ] . desc + '</description>\n' + '<styleUrl>#' + placemarks [ dirline ] . style + '</styleUrl>\n' + '<LineString>\n<tessellate>' + placemarks [ dirline ] . tess + '</tessellate>\n' + '<altitudeMode>' + placemarks [ dirline ] . alt + '</altitudeMode>\n<coordinates>\n' ; if ( pointsArrayKml . length != 0 ) { for ( var i = 0 ; i < pointsArrayKml . length ; i ++ ) { code += pointsArrayKml [ i ] + ',0.0 \n' ; } placemarks [ dirline ] . jscode = pointsArray ; placemarks [ dirline ] . kmlcode = pointsArrayKml ; } kmltext2 = '</coordinates>\n</LineString>\n</Placemark>\n' ; placemarks [ dirline ] . plmtext = kmltext1 + code + kmltext2 ; placemarks [ dirline ] . poly = "pl" ; gob ( 'coords1' ) . value = kmlheading ( ) + kmltext1 + code + kmltext2 ; if ( markersArrayKml . length != 0 ) { for ( i = 0 ; i < markersArrayKml . length ; i ++ ) { var kmlMarker = "" ; var m = dirline + 1 ; kmlMarker += '<Placemark><name>' + placemarks [ m + i ] . name + '</name>\n' + '<description>' + addresssArray [ i ] + '</description>\n' + '<styleUrl>#' + placemarks [ m + i ] . style + '</styleUrl>\n' + '<Point>\n<coordinates>' ; kmlMarker += markersArrayKml [ i ] + ',0.0' ; kmlMarker += '</coordinates>\n</Point>\n</Placemark>\n' ; placemarks [ m + i ] . jscode = markersArray [ i ] ; placemarks [ m + i ] . kmlcode = markersArrayKml [ i ] ; placemarks [ m + i ] . plmtext = kmlMarker ; gob ( 'coords1' ) . value += kmlMarker ; } } gob ( 'coords1' ) . value += kmlend ( ) ; }
write kml for Directions in text area
write kml for Directions in text area
//var kmlMarker = ""; //var kmlMarkers = ""; //placemarks[dirline].plmtext = kmlcode = kmltext1+code+kmltext2+kmlMarkers;