WME SC MapRaid Overlay

Adds a SC MapRaid area overlay.

// ==UserScript==
// @name         WME SC MapRaid Overlay
// @namespace    https://greasyfork.org/users/45389
// @version      2018.04.03.001
// @description  Adds a SC MapRaid area overlay.
// @author       WazeDev (MapOMatic)
// @include      /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/
// @require      https://greasyfork.org/scripts/24851-wazewrap/code/WazeWrap.js
// @license      GNU GPLv3
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Enter the state abbreviation:
    var _stateAbbr = "SC";

    // Enter the MapRaid area names and the desired fill colors, in order they appear in the original map legend:
    var _areas = {
        '7A Fort Jackson':{fillColor:'#FF0000'},
        '7B Shaw AFB':{fillColor:'#FF0000'},
        '7C McEntyre JNGB':{fillColor:'#FF0000'},
        '1 Aiken':{fillColor:'#01579b'},
        '2 Lexington':{fillColor:'#7cb342'},
        '3 Columbia-Harbison':{fillColor:'#f57c00'},
        '4 Columbia-Camden':{fillColor:'#ffea00'},
        '5 Rock Hill':{fillColor:'#01579b'},
        '6 Fort Mill-Lancaster':{fillColor:'#7cb342'}
    };

    var _settingsStoreName = '_wme_' + _stateAbbr + '_mapraid';
    var _settings;
    var _features;
    var _kml;
    var _layerName = _stateAbbr + ' MapRaid';
    var _layer = null;
    var defaultFillOpacity = 0.3;

    function loadSettingsFromStorage() {
        _settings = $.parseJSON(localStorage.getItem(_settingsStoreName));
        if(!_settings) {
            _settings = {
                layerVisible: true,
                hiddenAreas: []
            };
        } else {
            _settings.layerVisible = (_settings.layerVisible === true);
            _settings.hiddenAreas = _settings.hiddenAreas || [];
        }
    }

    function saveSettingsToStorage() {
        if (localStorage) {
            var settings = {
                layerVisible: _layer.visibility,
                hiddenAreas: _settings.hiddenAreas
            };
            localStorage.setItem(_settingsStoreName, JSON.stringify(settings));
        }
    }

    function GetFeaturesFromKMLString(strKML) {
        var format = new OpenLayers.Format.KML({
            'internalProjection': Waze.map.baseLayer.projection,
            'externalProjection': new OpenLayers.Projection("EPSG:4326")
        });
        return format.read(strKML);
    }

    function updateDistrictNameDisplay(){
        $('.mapraid-region').remove();
        if (_layer !== null) {
            var mapCenter = new OpenLayers.Geometry.Point(W.map.center.lon,W.map.center.lat);
            for (var i=0;i<_layer.features.length;i++){
                var feature = _layer.features[i];
                var color;
                var text = '';
                var num;
                var url;
                if(feature.geometry.containsPoint(mapCenter)) {
                    text = feature.attributes.name;
                    color = '#00ffff';
                    var $div = $('<div>', {id:'mapraid', class:"mapraid-region", style:'display:inline-block;margin-left:10px;', title:'Click to toggle color on/off for this group'})
                    .css({color:color, cursor:"pointer"})
                    .click(toggleAreaFill);
                    var $span = $('<span>').css({display:'inline-block'});
                    $span.text('MR Area: ' + text).appendTo($div);
                    $('.location-info-region').parent().append($div);
                    if (color) {
                        break;
                    }
                }
            }
        }
    }

    function toggleAreaFill() {
        var text = $('#mapraid span').text();
        if (text) {
            var match = text.match(/^MR Area: (.*)/);
            if (match.length > 1) {
                var areaName = match[1];
                var f = _layer.getFeaturesByAttribute('name', areaName)[0];
                var hide = f.attributes.fillOpacity !== 0;
                f.attributes.fillOpacity = hide ? 0 : defaultFillOpacity;
                var idx = _settings.hiddenAreas.indexOf(areaName);
                if (hide) {
                    if (idx === -1) _settings.hiddenAreas.push(areaName);
                } else {
                    if (idx > -1) {
                        _settings.hiddenAreas.splice(idx,1);
                    }
                }
                saveSettingsToStorage();
                _layer.redraw();
            }
        }
    }


    function init() {
        InstallKML();
        loadSettingsFromStorage();
        var layerid = 'wme_' + _stateAbbr + '_mapraid';
        var _features = GetFeaturesFromKMLString(_kml);
        var i = 0;
        for(var areaName in _areas) {
            _features[i].attributes.name = areaName;
            _features[i].attributes.fillColor = _areas[areaName].fillColor;
            _features[i].attributes.fillOpacity = _settings.hiddenAreas.indexOf(areaName) > -1 ? 0 : defaultFillOpacity;
            i++;
        }
        var layerStyle = new OpenLayers.StyleMap({
            strokeDashstyle: 'solid',
            strokeColor: '#000000',
            strokeOpacity: 1,
            strokeWidth: 3,
            fillOpacity: '${fillOpacity}',
            fillColor: '${fillColor}'
        });
        _layer = new OL.Layer.Vector(_stateAbbr + " MapRaid", {
            rendererOptions: { zIndexing: true },
            uniqueName: layerid,
            shortcutKey: "S+" + 0,
            layerGroup: _stateAbbr + '_mapraid',
            zIndex: -9999,
            displayInLayerSwitcher: true,
            visibility: _settings.layerVisible,
            styleMap: layerStyle
        });
        I18n.translations[I18n.locale].layers.name[layerid] = _stateAbbr + " MapRaid";
        _layer.addFeatures(_features);
        W.map.addLayer(_layer);
        W.map.events.register("moveend", null, updateDistrictNameDisplay);
        window.addEventListener('beforeunload', function saveOnClose() { saveSettingsToStorage(); }, false);
        updateDistrictNameDisplay();

        // Add the layer checkbox to the Layers menu.
        WazeWrap.Interface.AddLayerCheckbox("display", "SC MapRaid", _settings.layerVisible, layerToggled);
    }

    function layerToggled(visible) {
        _layer.setVisibility(visible);
        saveSettingsToStorage();
    }

    function bootstrap() {
        if (W && W.loginManager && W.loginManager.isLoggedIn()) {
            init();
            console.log(_stateAbbr + ' MR Overlay:', 'Initialized');
        } else {
            console.log(_stateAbbr + ' MR Overlay: ', 'Bootstrap failed.  Trying again...');
            window.setTimeout(() => bootstrap(), 500);
        }
    }

    bootstrap();

    function InstallKML(){
        OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date,extractAttributes:!0,kvpAttributes:!1,extractStyles:!1,extractTracks:!1,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(a){this.regExes=
            {trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g,kmlColor:/(\w{2})(\w{2})(\w{2})(\w{2})/,kmlIconPalette:/root:\/\/icons\/palette-(\d+)(\.\w+)/,straightBracket:/\$\[(.*?)\]/g};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){this.features=[];this.styles={};this.fetched={};return this.parseData(a,{depth:0,styleBaseUrl:this.styleBaseUrl})},parseData:function(a,b){"string"==typeof a&&
                (a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var c=["Link","NetworkLink","Style","StyleMap","Placemark"],d=0,e=c.length;d<e;++d){var f=c[d],g=this.getElementsByTagNameNS(a,"*",f);if(0!=g.length)switch(f.toLowerCase()){case "link":case "networklink":this.parseLinks(g,b);break;case "style":this.extractStyles&&this.parseStyles(g,b);break;case "stylemap":this.extractStyles&&this.parseStyleMaps(g,b);break;case "placemark":this.parseFeatures(g,b)}}return this.features},parseLinks:function(a,
b){if(b.depth>=this.maxDepth)return!1;var c=OpenLayers.Util.extend({},b);c.depth++;for(var d=0,e=a.length;d<e;d++){var f=this.parseProperty(a[d],"*","href");f&&!this.fetched[f]&&(this.fetched[f]=!0,(f=this.fetchLink(f))&&this.parseData(f,c))}},fetchLink:function(a){if(a=OpenLayers.Request.GET({url:a,async:!1}))return a.responseText},parseStyles:function(a,b){for(var c=0,d=a.length;c<d;c++){var e=this.parseStyle(a[c]);e&&(this.styles[(b.styleBaseUrl||"")+"#"+e.id]=e)}},parseKmlColor:function(a){var b=
                null;a&&(a=a.match(this.regExes.kmlColor))&&(b={color:"#"+a[4]+a[3]+a[2],opacity:parseInt(a[1],16)/255});return b},parseStyle:function(a){for(var b={},c=["LineStyle","PolyStyle","IconStyle","BalloonStyle","LabelStyle"],d,e,f=0,g=c.length;f<g;++f)if(d=c[f],e=this.getElementsByTagNameNS(a,"*",d)[0])switch(d.toLowerCase()){case "linestyle":d=this.parseProperty(e,"*","color");if(d=this.parseKmlColor(d))b.strokeColor=d.color,b.strokeOpacity=d.opacity;(d=this.parseProperty(e,"*","width"))&&(b.strokeWidth=
d);break;case "polystyle":d=this.parseProperty(e,"*","color");if(d=this.parseKmlColor(d))b.fillOpacity=d.opacity,b.fillColor=d.color;"0"==this.parseProperty(e,"*","fill")&&(b.fillColor="none");"0"==this.parseProperty(e,"*","outline")&&(b.strokeWidth="0");break;case "iconstyle":var h=parseFloat(this.parseProperty(e,"*","scale")||1);d=32*h;var i=32*h,j=this.getElementsByTagNameNS(e,"*","Icon")[0];if(j){var k=this.parseProperty(j,"*","href");if(k){var l=this.parseProperty(j,"*","w"),m=this.parseProperty(j,
"*","h");OpenLayers.String.startsWith(k,"http://maps.google.com/mapfiles/kml")&&(!l&&!m)&&(m=l=64,h/=2);l=l||m;m=m||l;l&&(d=parseInt(l)*h);m&&(i=parseInt(m)*h);if(m=k.match(this.regExes.kmlIconPalette))l=m[1],m=m[2],k=this.parseProperty(j,"*","x"),j=this.parseProperty(j,"*","y"),k="http://maps.google.com/mapfiles/kml/pal"+l+"/icon"+(8*(j?7-j/32:7)+(k?k/32:0))+m;b.graphicOpacity=1;b.externalGraphic=k}}if(e=this.getElementsByTagNameNS(e,"*","hotSpot")[0])k=parseFloat(e.getAttribute("x")),j=parseFloat(e.getAttribute("y")),
                    l=e.getAttribute("xunits"),"pixels"==l?b.graphicXOffset=-k*h:"insetPixels"==l?b.graphicXOffset=-d+k*h:"fraction"==l&&(b.graphicXOffset=-d*k),e=e.getAttribute("yunits"),"pixels"==e?b.graphicYOffset=-i+j*h+1:"insetPixels"==e?b.graphicYOffset=-(j*h)+1:"fraction"==e&&(b.graphicYOffset=-i*(1-j)+1);b.graphicWidth=d;b.graphicHeight=i;break;case "balloonstyle":(e=OpenLayers.Util.getXmlNodeValue(e))&&(b.balloonStyle=e.replace(this.regExes.straightBracket,"${$1}"));break;case "labelstyle":if(d=this.parseProperty(e,
"*","color"),d=this.parseKmlColor(d))b.fontColor=d.color,b.fontOpacity=d.opacity}!b.strokeColor&&b.fillColor&&(b.strokeColor=b.fillColor);if((a=a.getAttribute("id"))&&b)b.id=a;return b},parseStyleMaps:function(a,b){for(var c=0,d=a.length;c<d;c++)for(var e=a[c],f=this.getElementsByTagNameNS(e,"*","Pair"),e=e.getAttribute("id"),g=0,h=f.length;g<h;g++){var i=f[g],j=this.parseProperty(i,"*","key");(i=this.parseProperty(i,"*","styleUrl"))&&"normal"==j&&(this.styles[(b.styleBaseUrl||"")+"#"+e]=this.styles[(b.styleBaseUrl||
"")+i])}},parseFeatures:function(a,b){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d],g=this.parseFeature.apply(this,[f]);if(g){this.extractStyles&&(g.attributes&&g.attributes.styleUrl)&&(g.style=this.getStyle(g.attributes.styleUrl,b));if(this.extractStyles){var h=this.getElementsByTagNameNS(f,"*","Style")[0];if(h&&(h=this.parseStyle(h)))g.style=OpenLayers.Util.extend(g.style,h)}if(this.extractTracks){if((f=this.getElementsByTagNameNS(f,this.namespaces.gx,"Track"))&&0<f.length)g={features:[],feature:g},
                    this.readNode(f[0],g),0<g.features.length&&c.push.apply(c,g.features)}else c.push(g)}else throw"Bad Placemark: "+d;}this.features=this.features.concat(c)},readers:{kml:{when:function(a,b){b.whens.push(OpenLayers.Date.parse(this.getChildValue(a)))},_trackPointAttribute:function(a,b){var c=a.nodeName.split(":").pop();b.attributes[c].push(this.getChildValue(a))}},gx:{Track:function(a,b){var c={whens:[],points:[],angles:[]};if(this.trackAttributes){var d;c.attributes={};for(var e=0,f=this.trackAttributes.length;e<
f;++e)d=this.trackAttributes[e],c.attributes[d]=[],d in this.readers.kml||(this.readers.kml[d]=this.readers.kml._trackPointAttribute)}this.readChildNodes(a,c);if(c.whens.length!==c.points.length)throw Error("gx:Track with unequal number of when ("+c.whens.length+") and gx:coord ("+c.points.length+") elements.");var g=0<c.angles.length;if(g&&c.whens.length!==c.angles.length)throw Error("gx:Track with unequal number of when ("+c.whens.length+") and gx:angles ("+c.angles.length+") elements.");for(var h,
i,e=0,f=c.whens.length;e<f;++e){h=b.feature.clone();h.fid=b.feature.fid||b.feature.id;i=c.points[e];h.geometry=i;"z"in i&&(h.attributes.altitude=i.z);this.internalProjection&&this.externalProjection&&h.geometry.transform(this.externalProjection,this.internalProjection);if(this.trackAttributes){i=0;for(var j=this.trackAttributes.length;i<j;++i)h.attributes[d]=c.attributes[this.trackAttributes[i]][e]}h.attributes.when=c.whens[e];h.attributes.trackId=b.feature.id;g&&(i=c.angles[e],h.attributes.heading=
parseFloat(i[0]),h.attributes.tilt=parseFloat(i[1]),h.attributes.roll=parseFloat(i[2]));b.features.push(h)}},coord:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(/\s+/),d=new OpenLayers.Geometry.Point(c[0],c[1]);2<c.length&&(d.z=parseFloat(c[2]));b.points.push(d)},angles:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(/\s+/);b.angles.push(c)}}},parseFeature:function(a){for(var b=["MultiGeometry","Polygon","LineString","Point"],
c,d,e,f=0,g=b.length;f<g;++f)if(c=b[f],this.internalns=a.namespaceURI?a.namespaceURI:this.kmlns,d=this.getElementsByTagNameNS(a,this.internalns,c),0<d.length){if(b=this.parseGeometry[c.toLowerCase()])e=b.apply(this,[d[0]]),this.internalProjection&&this.externalProjection&&e.transform(this.externalProjection,this.internalProjection);else throw new TypeError("Unsupported geometry type: "+c);break}var h;this.extractAttributes&&(h=this.parseAttributes(a));c=new OpenLayers.Feature.Vector(e,h);a=a.getAttribute("id")||
                    a.getAttribute("name");null!=a&&(c.fid=a);return c},getStyle:function(a,b){var c=OpenLayers.Util.removeTail(a),d=OpenLayers.Util.extend({},b);d.depth++;d.styleBaseUrl=c;!this.styles[a]&&!OpenLayers.String.startsWith(a,"#")&&d.depth<=this.maxDepth&&!this.fetched[c]&&(c=this.fetchLink(c))&&this.parseData(c,d);return OpenLayers.Util.extend({},this.styles[a])},parseGeometry:{point:function(a){var b=this.getElementsByTagNameNS(a,this.internalns,"coordinates"),a=[];if(0<b.length)var c=b[0].firstChild.nodeValue,
                    c=c.replace(this.regExes.removeSpace,""),a=c.split(",");b=null;if(1<a.length)2==a.length&&(a[2]=null),b=new OpenLayers.Geometry.Point(a[0],a[1],a[2]);else throw"Bad coordinate string: "+c;return b},linestring:function(a,b){var c=this.getElementsByTagNameNS(a,this.internalns,"coordinates"),d=null;if(0<c.length){for(var c=this.getChildValue(c[0]),c=c.replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),d=c.split(this.regExes.splitSpace),e=d.length,f=Array(e),g,h,i=0;i<e;++i)if(g=
d[i].split(","),h=g.length,1<h)2==g.length&&(g[2]=null),f[i]=new OpenLayers.Geometry.Point(g[0],g[1],g[2]);else throw"Bad LineString point coordinates: "+d[i];if(e)d=b?new OpenLayers.Geometry.LinearRing(f):new OpenLayers.Geometry.LineString(f);else throw"Bad LineString coordinates: "+c;}return d},polygon:function(a){var a=this.getElementsByTagNameNS(a,this.internalns,"LinearRing"),b=a.length,c=Array(b);if(0<b)for(var d=0,e=a.length;d<e;++d)if(b=this.parseGeometry.linestring.apply(this,[a[d],!0]))c[d]=
                        b;else throw"Bad LinearRing geometry: "+d;return new OpenLayers.Geometry.Polygon(c)},multigeometry:function(a){for(var b,c=[],d=a.childNodes,e=0,f=d.length;e<f;++e)a=d[e],1==a.nodeType&&(b=this.parseGeometry[(a.prefix?a.nodeName.split(":")[1]:a.nodeName).toLowerCase()])&&c.push(b.apply(this,[a]));return new OpenLayers.Geometry.Collection(c)}},parseAttributes:function(a){var b={},c=a.getElementsByTagName("ExtendedData");c.length&&(b=this.parseExtendedData(c[0]));for(var d,e,f,a=a.childNodes,c=0,g=
a.length;c<g;++c)if(d=a[c],1==d.nodeType&&(e=d.childNodes,1<=e.length&&3>=e.length)){switch(e.length){case 1:f=e[0];break;case 2:f=e[0];e=e[1];f=3==f.nodeType||4==f.nodeType?f:e;break;default:f=e[1]}if(3==f.nodeType||4==f.nodeType)if(d=d.prefix?d.nodeName.split(":")[1]:d.nodeName,f=OpenLayers.Util.getXmlNodeValue(f))f=f.replace(this.regExes.trimSpace,""),b[d]=f}return b},parseExtendedData:function(a){var b={},c,d,e,f,g=a.getElementsByTagName("Data");c=0;for(d=g.length;c<d;c++){e=g[c];f=e.getAttribute("name");
var h={},i=e.getElementsByTagName("value");i.length&&(h.value=this.getChildValue(i[0]));this.kvpAttributes?b[f]=h.value:(e=e.getElementsByTagName("displayName"),e.length&&(h.displayName=this.getChildValue(e[0])),b[f]=h)}a=a.getElementsByTagName("SimpleData");c=0;for(d=a.length;c<d;c++)h={},e=a[c],f=e.getAttribute("name"),h.value=this.getChildValue(e),this.kvpAttributes?b[f]=h.value:(h.displayName=f,b[f]=h);return b},parseProperty:function(a,b,c){var d,a=this.getElementsByTagNameNS(a,b,c);try{d=OpenLayers.Util.getXmlNodeValue(a[0])}catch(e){d=
    null}return d},write:function(a){OpenLayers.Util.isArray(a)||(a=[a]);for(var b=this.createElementNS(this.kmlns,"kml"),c=this.createFolderXML(),d=0,e=a.length;d<e;++d)c.appendChild(this.createPlacemarkXML(a[d]));b.appendChild(c);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFolderXML:function(){var a=this.createElementNS(this.kmlns,"Folder");if(this.foldersName){var b=this.createElementNS(this.kmlns,"name"),c=this.createTextNode(this.foldersName);b.appendChild(c);a.appendChild(b)}this.foldersDesc&&
        (b=this.createElementNS(this.kmlns,"description"),c=this.createTextNode(this.foldersDesc),b.appendChild(c),a.appendChild(b));return a},createPlacemarkXML:function(a){var b=this.createElementNS(this.kmlns,"name");b.appendChild(this.createTextNode(a.style&&a.style.label?a.style.label:a.attributes.name||a.id));var c=this.createElementNS(this.kmlns,"description");c.appendChild(this.createTextNode(a.attributes.description||this.placemarksDesc));var d=this.createElementNS(this.kmlns,"Placemark");null!=
        a.fid&&d.setAttribute("id",a.fid);d.appendChild(b);d.appendChild(c);b=this.buildGeometryNode(a.geometry);d.appendChild(b);a.attributes&&(a=this.buildExtendedData(a.attributes))&&d.appendChild(a);return d},buildGeometryNode:function(a){var b=a.CLASS_NAME,b=this.buildGeometry[b.substring(b.lastIndexOf(".")+1).toLowerCase()],c=null;b&&(c=b.apply(this,[a]));return c},buildGeometry:{point:function(a){var b=this.createElementNS(this.kmlns,"Point");b.appendChild(this.buildCoordinatesNode(a));return b},multipoint:function(a){return this.buildGeometry.collection.apply(this,
[a])},linestring:function(a){var b=this.createElementNS(this.kmlns,"LineString");b.appendChild(this.buildCoordinatesNode(a));return b},multilinestring:function(a){return this.buildGeometry.collection.apply(this,[a])},linearring:function(a){var b=this.createElementNS(this.kmlns,"LinearRing");b.appendChild(this.buildCoordinatesNode(a));return b},polygon:function(a){for(var b=this.createElementNS(this.kmlns,"Polygon"),a=a.components,c,d,e=0,f=a.length;e<f;++e)c=0==e?"outerBoundaryIs":"innerBoundaryIs",
        c=this.createElementNS(this.kmlns,c),d=this.buildGeometry.linearring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},multipolygon:function(a){return this.buildGeometry.collection.apply(this,[a])},collection:function(a){for(var b=this.createElementNS(this.kmlns,"MultiGeometry"),c,d=0,e=a.components.length;d<e;++d)(c=this.buildGeometryNode.apply(this,[a.components[d]]))&&b.appendChild(c);return b}},buildCoordinatesNode:function(a){var b=this.createElementNS(this.kmlns,"coordinates"),
        c;if(c=a.components){for(var d=c.length,e=Array(d),f=0;f<d;++f)a=c[f],e[f]=this.buildCoordinates(a);c=e.join(" ")}else c=this.buildCoordinates(a);c=this.createTextNode(c);b.appendChild(c);return b},buildCoordinates:function(a){this.internalProjection&&this.externalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));return a.x+","+a.y},buildExtendedData:function(a){var b=this.createElementNS(this.kmlns,"ExtendedData"),c;for(c in a)if(a[c]&&"name"!=c&&"description"!=
c&&"styleUrl"!=c){var d=this.createElementNS(this.kmlns,"Data");d.setAttribute("name",c);var e=this.createElementNS(this.kmlns,"value");if("object"==typeof a[c]){if(a[c].value&&e.appendChild(this.createTextNode(a[c].value)),a[c].displayName){var f=this.createElementNS(this.kmlns,"displayName");f.appendChild(this.getXMLDoc().createCDATASection(a[c].displayName));d.appendChild(f)}}else e.appendChild(this.createTextNode(a[c]));d.appendChild(e);b.appendChild(d)}return this.isSimpleContent(b)?null:b},
                                                                      CLASS_NAME:"OpenLayers.Format.KML"});

        _kml = `<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>SC Midlands Mapraid</name>
    <description/>
    <Style id="poly-000000-1200-77-nodesc-normal">
      <LineStyle>
        <color>ff000000</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4d000000</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-000000-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ff000000</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4d000000</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-000000-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-000000-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-000000-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-0288D1-1200-77-nodesc-normal">
      <LineStyle>
        <color>ffd18802</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4dd18802</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-0288D1-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ffd18802</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4dd18802</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-0288D1-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-0288D1-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-0288D1-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-0F9D58-1200-77-nodesc-normal">
      <LineStyle>
        <color>ff589d0f</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4d589d0f</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-0F9D58-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ff589d0f</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4d589d0f</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-0F9D58-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-0F9D58-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-0F9D58-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-1A237E-3301-117-nodesc-normal">
      <LineStyle>
        <color>ff7e231a</color>
        <width>3.301</width>
      </LineStyle>
      <PolyStyle>
        <color>757e231a</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-1A237E-3301-117-nodesc-highlight">
      <LineStyle>
        <color>ff7e231a</color>
        <width>4.9515</width>
      </LineStyle>
      <PolyStyle>
        <color>757e231a</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-1A237E-3301-117-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-1A237E-3301-117-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-1A237E-3301-117-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-9C27B0-1200-77-nodesc-normal">
      <LineStyle>
        <color>ffb0279c</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4db0279c</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-9C27B0-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ffb0279c</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4db0279c</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-9C27B0-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-9C27B0-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-9C27B0-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-F9A825-1200-77-nodesc-normal">
      <LineStyle>
        <color>ff25a8f9</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4d25a8f9</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-F9A825-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ff25a8f9</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4d25a8f9</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-F9A825-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-F9A825-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-F9A825-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-FF5252-1200-77-nodesc-normal">
      <LineStyle>
        <color>ff5252ff</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4d5252ff</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-FF5252-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ff5252ff</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4d5252ff</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-FF5252-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-FF5252-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-FF5252-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Style id="poly-FFEA00-1200-77-nodesc-normal">
      <LineStyle>
        <color>ff00eaff</color>
        <width>1.2</width>
      </LineStyle>
      <PolyStyle>
        <color>4d00eaff</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <Style id="poly-FFEA00-1200-77-nodesc-highlight">
      <LineStyle>
        <color>ff00eaff</color>
        <width>1.8</width>
      </LineStyle>
      <PolyStyle>
        <color>4d00eaff</color>
        <fill>1</fill>
        <outline>1</outline>
      </PolyStyle>
      <BalloonStyle>
        <text><![CDATA[<h3>$[name]</h3>]]></text>
      </BalloonStyle>
    </Style>
    <StyleMap id="poly-FFEA00-1200-77-nodesc">
      <Pair>
        <key>normal</key>
        <styleUrl>#poly-FFEA00-1200-77-nodesc-normal</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#poly-FFEA00-1200-77-nodesc-highlight</styleUrl>
      </Pair>
    </StyleMap>
    <Folder>
      <name>Individual Areas</name>
      <Placemark>
        <name>Group 7A Fort Jackson</name>
        <styleUrl>#poly-F9A825-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.9292841,33.9784208,0
                -80.9218812,33.9830115,0
                -80.9155512,33.980218,0
                -80.9137058,33.9805205,0
                -80.8927631,33.9850043,0
                -80.8689022,33.9915516,0
                -80.7671928,34.0055697,0
                -80.7063389,34.0083446,0
                -80.7044506,34.0096965,0
                -80.7039356,34.0612636,0
                -80.7071114,34.0626857,0
                -80.7132053,34.063539,0
                -80.7239342,34.0675207,0
                -80.7299423,34.0717155,0
                -80.7350063,34.0773675,0
                -80.7418299,34.0814552,0
                -80.7494259,34.0838011,0
                -80.7529449,34.0833035,0
                -80.7550049,34.08373,0
                -80.7614422,34.0891324,0
                -80.7652187,34.0938948,0
                -80.766592,34.0972354,0
                -80.7699394,34.1000073,0
                -80.7763767,34.1025659,0
                -80.7837582,34.1017841,0
                -80.8022976,34.1029923,0
                -80.8059883,34.1042715,0
                -80.8186054,34.1044137,0
                -80.8816051,34.0796069,0
                -80.9231043,34.0520194,0
                -80.9237051,34.0507394,0
                -80.9365368,34.0414229,0
                -80.9381676,34.0345949,0
                -80.9596252,34.0003399,0
                -80.9593678,33.9960704,0
                -80.9571362,33.9960348,0
                -80.9553337,33.9943269,0
                -80.9455919,33.9939355,0
                -80.9429741,33.9927614,0
                -80.9337044,33.9797553,0
                -80.9312367,33.9808941,0
                -80.9292841,33.9784208,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 7B Shaw AFB</name>
        <styleUrl>#poly-F9A825-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.4428387,33.9650389,0
                -80.4412937,33.9697015,0
                -80.4482031,33.9828336,0
                -80.4551554,33.9899148,0
                -80.4575586,33.9888473,0
                -80.4606915,33.99237,0
                -80.4636526,33.9894166,0
                -80.4800034,33.9924767,0
                -80.4858398,33.9967108,0
                -80.4902601,33.9951097,0
                -80.4901743,33.9916228,0
                -80.485754,33.9874596,0
                -80.4900455,33.9858939,0
                -80.4883289,33.9822998,0
                -80.4900455,33.9725843,0
                -80.4932213,33.9727266,0
                -80.4936934,33.970093,0
                -80.4908609,33.9698794,0
                -80.4924917,33.9684558,0
                -80.4925346,33.9657152,0
                -80.4910326,33.9655372,0
                -80.490818,33.9542891,0
                -80.4758406,33.9598065,0
                -80.4670429,33.9617643,0
                -80.4623222,33.9639711,0
                -80.4428387,33.9650389,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 7C McEntyre JNGB</name>
        <styleUrl>#poly-F9A825-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.8191204,33.9137338,0
                -80.7785225,33.901909,0
                -80.7817841,33.9205003,0
                -80.7916975,33.9309695,0
                -80.7891655,33.93364,0
                -80.790925,33.9348862,0
                -80.7886505,33.9389452,0
                -80.7997656,33.9400133,0
                -80.8025551,33.9410814,0
                -80.805645,33.9441788,0
                -80.8098936,33.9410458,0
                -80.8104086,33.9333196,0
                -80.8171463,33.9316104,0
                -80.820837,33.921996,0
                -80.8191204,33.9137338,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 1 Aiken</name>
        <styleUrl>#poly-FFEA00-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -81.0145569,33.3534733,0
                -81.2796021,33.6557808,0
                -81.8385315,33.8840974,0
                -81.907196,34.1356784,0
                -82.1763611,34.0082735,0
                -82.276268,33.7703005,0
                -82.2422791,33.7397579,0
                -82.1949005,33.6266268,0
                -82.1303558,33.5883113,0
                -82.1076965,33.5974628,0
                -82.0410919,33.5574179,0
                -81.9909668,33.5021825,0
                -81.9871902,33.4855764,0
                -81.9312286,33.4675352,0
                -81.9113159,33.4394635,0
                -81.9326019,33.4291492,0
                -81.9449615,33.3658038,0
                -81.9404984,33.344296,0
                -81.8481445,33.2653887,0
                -81.8526077,33.2475888,0
                -81.8041992,33.2114037,0
                -81.7671204,33.2102547,0
                -81.7671204,33.1582477,0
                -81.7025757,33.1145494,0
                -81.5007019,33.0144214,0
                -81.3935852,32.5977339,0
                -81.184845,32.4587911,0
                -81.1505127,32.2348746,0
                -81.0598755,32.2813277,0
                -80.632782,32.895732,0
                -81.0145569,33.3534733,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 2 Lexington</name>
        <styleUrl>#poly-0288D1-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.6259155,34.0754124,0
                -80.7039356,34.0612636,0
                -80.7044506,34.0096965,0
                -80.7063389,34.0083446,0
                -80.7671928,34.0055697,0
                -80.8689022,33.9915516,0
                -80.8927631,33.9850043,0
                -80.9155512,33.980218,0
                -80.9218812,33.9830115,0
                -80.9292841,33.9784208,0
                -80.9312367,33.9808941,0
                -80.9337044,33.9797553,0
                -80.9379959,33.9776735,0
                -80.952673,33.9630812,0
                -80.9543896,33.9575284,0
                -80.9603119,33.9513345,0
                -80.9800529,33.9380907,0
                -81.0167885,33.9323938,0
                -81.0459709,33.9759653,0
                -81.0464859,33.9897725,0
                -81.0663986,34.0091984,0
                -81.0723209,34.0062101,0
                -81.0867405,34.0136095,0
                -81.0935211,34.0131115,0
                -81.0993576,34.0236405,0
                -81.1251068,34.0244941,0
                -81.1566925,34.0347371,0
                -81.1611557,34.0415651,0
                -81.1738586,34.0475392,0
                -81.1865616,34.0449789,0
                -81.2147141,34.0535128,0
                -81.2363434,34.0498149,0
                -81.282692,34.0694404,0
                -81.3918686,34.0665964,0
                -81.4213943,34.0808154,0
                -81.442337,34.0765499,0
                -81.4677429,34.0873553,0
                -81.475296,34.0779718,0
                -81.4831924,34.0808154,0
                -81.5058517,34.0745593,0
                -81.5116882,34.0816684,0
                -81.5274811,34.0842276,0
                -81.5415573,34.0802467,0
                -81.5473938,34.0924732,0
                -81.5734863,34.1004337,0
                -81.5885925,34.1169209,0
                -81.907196,34.1356784,0
                -81.8385315,33.8840974,0
                -81.2796021,33.6557808,0
                -80.632782,32.895732,0
                -80.4116821,33.4933073,0
                -80.4398144,33.9946116,0
                -80.6259155,34.0754124,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 3 Columbia-Harbison</name>
        <styleUrl>#poly-FF5252-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.9218597,34.067734,0
                -80.9260654,34.067734,0
                -80.9428024,34.0736351,0
                -80.9636593,34.0742038,0
                -80.9742165,34.0727819,0
                -81.0032272,34.0738484,0
                -81.0080338,34.073564,0
                -81.0214233,34.0662409,0
                -81.0379887,34.0663831,0
                -81.0439968,34.0648188,0
                -81.0537815,34.0565705,0
                -81.0734367,34.0479659,0
                -81.088028,34.0775452,0
                -81.1045074,34.0894878,0
                -81.149826,34.1578409,0
                -81.3317871,34.2572164,0
                -81.4196777,34.4488212,0
                -81.4251709,34.5699064,0
                -81.5570068,34.5846057,0
                -81.9030762,34.4001112,0
                -81.907196,34.1356784,0
                -81.5885925,34.1169209,0
                -81.5734863,34.1004337,0
                -81.5473938,34.0924732,0
                -81.5415573,34.0802467,0
                -81.5274811,34.0842276,0
                -81.5116882,34.0816684,0
                -81.5058517,34.0745593,0
                -81.4831924,34.0808154,0
                -81.475296,34.0779718,0
                -81.4677429,34.0873553,0
                -81.442337,34.0765499,0
                -81.4213943,34.0808154,0
                -81.3918686,34.0665964,0
                -81.282692,34.0694404,0
                -81.2363434,34.0498149,0
                -81.2147141,34.0535128,0
                -81.1865616,34.0449789,0
                -81.1738586,34.0475392,0
                -81.1611557,34.0415651,0
                -81.1566925,34.0347371,0
                -81.1251068,34.0244941,0
                -81.0993576,34.0236405,0
                -81.0935211,34.0131115,0
                -81.0867405,34.0136095,0
                -81.0723209,34.0062101,0
                -81.0663986,34.0091984,0
                -81.0464859,33.9897725,0
                -81.0459709,33.9759653,0
                -81.0167885,33.9323938,0
                -80.9800529,33.9380907,0
                -80.9603119,33.9513345,0
                -80.9543896,33.9575284,0
                -80.952673,33.9630812,0
                -80.9379959,33.9776735,0
                -80.9337044,33.9797553,0
                -80.9429741,33.9927614,0
                -80.9455919,33.9939355,0
                -80.9553337,33.9943269,0
                -80.9571362,33.9960348,0
                -80.9593678,33.9960704,0
                -80.9596252,34.0003399,0
                -80.9381676,34.0345949,0
                -80.9365368,34.0414229,0
                -80.9237051,34.0507394,0
                -80.9231043,34.0520194,0
                -80.9218597,34.067734,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 4 Columbia-Camden</name>
        <styleUrl>#poly-9C27B0-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -81.0015106,34.5382375,0
                -81.0063171,34.3210388,0
                -80.9967041,34.2986356,0
                -81.0001373,34.2433109,0
                -81.149826,34.1578409,0
                -81.1045074,34.0894878,0
                -81.088028,34.0775452,0
                -81.0734367,34.0479659,0
                -81.0537815,34.0565705,0
                -81.0439968,34.0648188,0
                -81.0379887,34.0663831,0
                -81.0214233,34.0662409,0
                -81.0080338,34.073564,0
                -81.0032272,34.0738484,0
                -80.9742165,34.0727819,0
                -80.9636593,34.0742038,0
                -80.9428024,34.0736351,0
                -80.9260654,34.067734,0
                -80.9218597,34.067734,0
                -80.9231043,34.0520194,0
                -80.8816051,34.0796069,0
                -80.8186054,34.1044137,0
                -80.8059883,34.1042715,0
                -80.8022976,34.1029923,0
                -80.7837582,34.1017841,0
                -80.7763767,34.1025659,0
                -80.7699394,34.1000073,0
                -80.766592,34.0972354,0
                -80.7652187,34.0938948,0
                -80.7614422,34.0891324,0
                -80.7550049,34.08373,0
                -80.7529449,34.0833035,0
                -80.7494259,34.0838011,0
                -80.7418299,34.0814552,0
                -80.7350063,34.0773675,0
                -80.7299423,34.0717155,0
                -80.7239342,34.0675207,0
                -80.7132053,34.063539,0
                -80.7071114,34.0626857,0
                -80.7039356,34.0612636,0
                -80.6259155,34.0754124,0
                -80.4398144,33.9946116,0
                -79.887085,33.9296876,0
                -79.8184204,34.2980684,0
                -80.0271606,34.4250361,0
                -81.0015106,34.5382375,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 5 Rock Hill</name>
        <styleUrl>#poly-0F9D58-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -81.0384178,34.7906866,0
                -81.0303497,34.8318411,0
                -81.0052872,34.8597356,0
                -80.9994507,34.8836779,0
                -80.9706116,34.9363264,0
                -80.988636,34.9792366,0
                -80.9834862,34.9875347,0
                -80.9939575,34.9911912,0
                -80.9996223,35.0062374,0
                -80.9967041,35.0115803,0
                -81.0143852,35.0250764,0
                -81.0301781,35.0193127,0
                -81.0415077,35.0298558,0
                -81.0414889,35.0446995,0
                -81.0612488,35.0668162,0
                -81.0494041,35.099687,0
                -81.032238,35.1048833,0
                -81.0379028,35.1256652,0
                -81.0514641,35.1335272,0
                -81.0455304,35.1498955,0
                -81.4429593,35.1679411,0
                -81.7748436,34.7398512,0
                -81.5570068,34.5846057,0
                -81.4251709,34.5699064,0
                -81.4196777,34.4488212,0
                -81.3317871,34.2572164,0
                -81.149826,34.1578409,0
                -81.0001373,34.2433109,0
                -80.9967041,34.2986356,0
                -81.0063171,34.3210388,0
                -81.0015106,34.5382375,0
                -81.0296631,34.642812,0
                -81.0384178,34.7906866,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
      <Placemark>
        <name>Group 6 Fort Mill-Lancaster</name>
        <styleUrl>#poly-000000-1200-77-nodesc</styleUrl>
        <Polygon>
          <outerBoundaryIs>
            <LinearRing>
              <tessellate>1</tessellate>
              <coordinates>
                -80.988636,34.9792366,0
                -80.9706116,34.9363264,0
                -80.9994507,34.8836779,0
                -81.0052872,34.8597356,0
                -81.0303497,34.8318411,0
                -81.0384178,34.7906866,0
                -81.0296631,34.642812,0
                -81.0015106,34.5382375,0
                -80.0271606,34.4250361,0
                -79.8184204,34.2980684,0
                -79.552002,34.3661107,0
                -79.3177378,34.5099162,0
                -79.6753001,34.8047441,0
                -80.797543,34.8197863,0
                -80.7820415,34.9357843,0
                -80.9349503,35.1074089,0
                -81.0414889,35.0446995,0
                -81.0415077,35.0298558,0
                -81.0301781,35.0193127,0
                -81.0143852,35.0250764,0
                -80.9967041,35.0115803,0
                -80.9996223,35.0062374,0
                -80.9939575,34.9911912,0
                -80.9834862,34.9875347,0
                -80.988636,34.9792366,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
    </Folder>
  </Document>
</kml>`;
    }
})();