web/js/googlemap.js
// write kml for polygon with hole
write kml for polygon with hole
write kml for polygon with hole
function logCode3(){
    if (notext === true) return;
    var code = "";
    var kmltext = '<Placemark><name>'+placemarks[plmcur].name+'</name>\n' +
                    '<description>'+placemarks[plmcur].desc+'</description>\n' +
                    '<styleUrl>#'+placemarks[plmcur].style+'</styleUrl>\n' +
                    '<Polygon>\n<tessellate>'+placemarks[plmcur].tess+'</tessellate>\n' +
                    '<altitudeMode>'+placemarks[plmcur].alt+'</altitudeMode>\n' +
                    '<outerBoundaryIs><LinearRing><coordinates>\n';
    for(var i = 0; i < outerArrayKml.length; i++) {
        kmltext += outerArrayKml[i]+',0.0 \n';
        code += outerArrayKml[i]+',0.0 \n';
    }
    kmltext += outerArrayKml[0]+',0.0 \n';
    code += outerArrayKml[0]+',0.0 \n';
    placemarks[plmcur].jscode = pointsArray;
    placemarks[plmcur].kmlcode = outerArrayKml;
    placemarks[plmcur].kmlholecode = innerArraysKml;
    placemarks[plmcur].poly = "pgh";
    kmltext += '</coordinates></LinearRing></outerBoundaryIs>\n';
    for(var m = 0; m < innerArraysKml.length; m++) {
        kmltext += '<innerBoundaryIs><LinearRing><coordinates>\n';
        for(var i = 0; i < innerArraysKml[m].length; i++) {
            kmltext += innerArraysKml[m][i]+',0.0 \n';
        }
        kmltext += innerArraysKml[m][0]+',0.0 \n';
        kmltext += '</coordinates></LinearRing></innerBoundaryIs>\n';
    }
    kmltext += '</Polygon>\n</Placemark>\n';
    placemarks[plmcur].plmtext = kmlcode = kmltext;
    gob('coords1').value = kmlheading()+kmltext+kmlend();
}
function logCode3 ( ) { if ( notext === true ) return ; var code = "" ; var kmltext = '<Placemark><name>' + placemarks [ plmcur ] . name + '</name>\n' + '<description>' + placemarks [ plmcur ] . desc + '</description>\n' + '<styleUrl>#' + placemarks [ plmcur ] . style + '</styleUrl>\n' + '<Polygon>\n<tessellate>' + placemarks [ plmcur ] . tess + '</tessellate>\n' + '<altitudeMode>' + placemarks [ plmcur ] . alt + '</altitudeMode>\n' + '<outerBoundaryIs><LinearRing><coordinates>\n' ; for ( var i = 0 ; i < outerArrayKml . length ; i ++ ) { kmltext += outerArrayKml [ i ] + ',0.0 \n' ; code += outerArrayKml [ i ] + ',0.0 \n' ; } kmltext += outerArrayKml [ 0 ] + ',0.0 \n' ; code += outerArrayKml [ 0 ] + ',0.0 \n' ; placemarks [ plmcur ] . jscode = pointsArray ; placemarks [ plmcur ] . kmlcode = outerArrayKml ; placemarks [ plmcur ] . kmlholecode = innerArraysKml ; placemarks [ plmcur ] . poly = "pgh" ; kmltext += '</coordinates></LinearRing></outerBoundaryIs>\n' ; for ( var m = 0 ; m < innerArraysKml . length ; m ++ ) { kmltext += '<innerBoundaryIs><LinearRing><coordinates>\n' ; for ( var i = 0 ; i < innerArraysKml [ m ] . length ; i ++ ) { kmltext += innerArraysKml [ m ] [ i ] + ',0.0 \n' ; } kmltext += innerArraysKml [ m ] [ 0 ] + ',0.0 \n' ; kmltext += '</coordinates></LinearRing></innerBoundaryIs>\n' ; } kmltext += '</Polygon>\n</Placemark>\n' ; placemarks [ plmcur ] . plmtext = kmlcode = kmltext ; gob ( 'coords1' ) . value = kmlheading ( ) + kmltext + kmlend ( ) ; }
write kml for polygon with hole
write kml for polygon with hole