\n' + '
\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '
Vertical Stability Codes
A Most reliableC May hold
B Probably holdD Unknown
Condition Codes
G Recovered in good condition
N Not recovered, not found
O Other (see datasheet for details)
P Poor, disturbed, mutilated
S Original setting
X Surface mark reported destroyed
Y Underground mark destroyed
Z Presumed destroyed
\n' + '

\n'; legendBox = new InfoBox({ content: ngsLegend, pixelOffset: new google.maps.Size(-115, -175) }); var urlform = '

\n' + '
\n' + '

Load KML/KMZ URL

\n' + '

\n' + ' \n' + ' \n' + '

\n'; urlBox = new InfoBox({ content: urlform, pixelOffset: new google.maps.Size(-180, -175) }); var flytoform = '

\n' + '
\n' + '

Fly To

\n' + '

\n' + ' \n' + ' \n' + '

\n'; flytoBox = new InfoBox({ content: flytoform, pixelOffset: new google.maps.Size(-115, -175) }); var about = '

\n' + 'Earth Survey Maps\n' + '(ESMaps)
is a component of
\n' + '

\n' + '\n' + '
\n' + '\n' + 'Land Surveying Research Tools\n' + '

\n' + '\n' + '© 2007-2019 Metzger + Willard, Inc.
\n' + '8600 Hidden River Parkway, Ste 550
\n' + 'Tampa, Florida 33637-1033
\n' + 'Telephone 813-977-6005\n' + '

\n' + 'Portions © 2019\n' + 'Tom\n' + 'Davis
\n' + 'Portions © 2019 Rollins Turner\n' + '

\n' + 'For illustration only. User to verify all
\n' + 'information. Last Revision: 10/08/19.\n' + '

\n' + 'Google Maps API Version ' + google.maps.version + '\n' + '

\n'; aboutBox = new InfoBox({ content: about, pixelOffset: new google.maps.Size(-110, -175) }); // AboutControl var aboutControlDiv = document.createElement('div'); var aboutControl = new AboutControl(aboutControlDiv); aboutControlDiv.index = 1; map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(aboutControlDiv); // RefreshControl var refreshControlDiv = document.createElement('div'); var refreshControl = new RefreshControl(refreshControlDiv); refreshControlDiv.index = 1; map.controls[google.maps.ControlPosition.TOP_RIGHT].push(refreshControlDiv); // OverlayControl var overlayControlDiv = document.createElement('div'); var overlayControl = new OverlayControl(overlayControlDiv); overlayControlDiv.index = 1; map.controls[google.maps.ControlPosition.TOP_RIGHT].push(overlayControlDiv); // TransparencySlider var transparencySliderDiv = document.createElement('div'); var transparencySlider = new TransparencySlider(transparencySliderDiv); transparencySliderDiv.index = 1; map.controls[google.maps.ControlPosition.LEFT_CENTER].push(transparencySliderDiv); slider = transparencySliderDiv.children[0]; noUiSlider.create(slider, { start: 0, orientation: 'vertical', range: { 'min': 0, 'max': 1 } }); slider.noUiSlider.on('update', function(){ var transparency = slider.noUiSlider.get(); Overlay.setOpacity(1 - transparency); }); } function flyTo(addr) { var addr = flyto_form.address.value; flytoBox.close(); var geocoder = new google.maps.Geocoder(); geocoder.geocode({'address': addr, 'latLng': null}, function(results, status){ if(status == google.maps.GeocoderStatus.OK && results.length){ var view = results[0].geometry.viewport; map.fitBounds(view); map.setZoom(map.getZoom() + 1); } else { alert("Geocoder failed due to: " + status); } }); } function loadUrl() { var href = url_form.url_text.value; urlLayer.setMap(null); urlLayer = new google.maps.KmlLayer({ url: href, suppressInfoWindows: true, preserveViewport: false }); urlBox.close(); google.maps.event.addListener(urlLayer, 'status_changed', function() { if (urlLayer.getStatus() != 'OK') { alert ('Search Status: ' + urlLayer.getStatus()); } }); google.maps.event.addListener(urlLayer,'click',function(e){ kmlWindow.setOptions ({ content: e.featureData.infoWindowHtml, position: e.latLng, pixelOffset: e.pixelOffset }); activeWindow.close(); activeWindow = kmlWindow; activeWindow.open(map); }); Overlay.setMap(null); kmlLayer.setMap(null); kmlLayer = urlLayer; kmlLayer.setMap(map); } function AboutControl(controlDiv) { // Set CSS for the control border. var controlUI = document.createElement('div'); controlUI.style.cursor = 'pointer'; controlUI.style.marginBottom = '0px'; controlUI.style.marginLeft = '7px'; controlUI.style.width = '60px'; controlUI.title = 'About'; controlDiv.appendChild(controlUI); // Set CSS for the control interior. var controlText = document.createElement('div'); controlText.innerHTML = ''; controlUI.appendChild(controlText); // Setup the click event listener. controlUI.addEventListener('click', function() { aboutBox.setPosition(map.getCenter()); activeWindow.close(); activeWindow = aboutBox; activeWindow.open(map); }); } function RefreshControl(controlDiv) { // Set CSS for the control border. var controlUI = document.createElement('div'); controlUI.style.backgroundColor = '#fff'; controlUI.style.border = '2px solid #fff'; controlUI.style.borderRadius = '3px'; controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)'; controlUI.style.cursor = 'pointer'; controlUI.style.marginTop = '10px'; controlUI.style.marginRight = '10px'; controlUI.style.textAlign = 'center'; controlUI.title = 'Refresh Overlay'; controlDiv.appendChild(controlUI); // Set CSS for the control interior. var controlText = document.createElement('div'); controlText.style.color = 'black'; controlText.style.fontFamily = 'Arial,sans-serif'; controlText.style.fontSize = '18px'; controlText.style.lineHeight = '40px'; controlText.style.paddingLeft = '5px'; controlText.style.paddingRight = '5px'; controlText.innerHTML = 'Refresh'; controlUI.appendChild(controlText); // Setup the click event listener. controlUI.addEventListener('click', function() {setOverlay(overlay);}); } function OverlayControl(controlDiv) { // Set CSS for the control border. var controlUI = document.createElement('div'); controlUI.style.backgroundColor = '#fff'; controlUI.style.border = '2px solid #fff'; controlUI.style.borderRadius = '3px'; controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)'; controlUI.style.cursor = 'pointer'; controlUI.style.marginTop = '10px'; controlUI.style.marginRight = '5px'; controlUI.style.textAlign = 'center'; controlUI.title = 'Select Overlay'; controlDiv.appendChild(controlUI); // Set CSS for the control interior. var controlText = document.createElement('div'); controlText.style.color = 'black'; controlText.style.fontFamily = 'Arial,sans-serif'; controlText.style.fontSize = '18px'; controlText.style.lineHeight = '40px'; controlText.style.paddingLeft = '5px'; controlText.style.paddingRight = '5px'; controlText.innerHTML = '

'; controlUI.appendChild(controlText); } function TransparencySlider(controlDiv) { // Set CSS for the control border. var controlUI = document.createElement('div'); controlUI.style.marginTop = '-40px'; controlUI.style.marginLeft = '15px'; controlUI.style.height = '80px'; controlUI.style.cursor = 'pointer'; controlUI.title = 'Transparency'; controlDiv.appendChild(controlUI); } function Bounds(){ var bounds = map.getBounds(); var NE = bounds.getNorthEast(); var SW = bounds.getSouthWest(); return { north : NE.lat(), south : SW.lat(), east : NE.lng(), west : SW.lng() }; } function setOverlay(overlay) { var imageBounds = Bounds(); var north = imageBounds.north; var south = imageBounds.south; var east = imageBounds.east; var west = imageBounds.west; if (overlay != 'LGND' && overlay != 'URL' && overlay != 'FLY') { kmlLayer.setMap(null); Overlay.setMap(null); } activeWindow.close(); var url = ''; var width = document.documentElement.clientWidth; var height = width*(north - south)/(east - west); switch(overlay) { case 'LGND': legendBox.setPosition(map.getCenter()); activeWindow = legendBox; activeWindow.open(map); break; case 'FLY': flytoBox.setPosition(map.getCenter()); activeWindow = flytoBox; activeWindow.open(map); break; case 'URL': urlBox.setPosition(map.getCenter()); activeWindow = urlBox; activeWindow.open(map); break; case 'COTBM': kmlLayer = cotbmLayer; kmlLayer.setMap(map); break; case 'HCBM': kmlLayer = hcbmLayer; kmlLayer.setMap(map); break; case 'NHD': url = 'http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/NHDSnapshot_NP21_Labeled/MapServer/export?f=image&format=png24&bboxSR=4326&imageSR=4326&transparent=true&size=' + width + ',' + height + '&bbox=' + west + ',' + south + ',' + east + ',' + north; Overlay = new google.maps.GroundOverlay( url, imageBounds, {clickable: false}); Overlay.setOpacity(1 - slider.noUiSlider.get()); Overlay.setMap(map); break; case 'NGSCS': url = 'https://metzgerwillard.us/ngscs/NGSCS.aspx?DESTINATION=AE&TYPE=X-0&STABILITY=0&MINLAT=' + south + '&MINLON=' + east + '&MAXLAT=' + north + '&MAXLON=' + west + '&CONTENT=NGSCS_Results.kml'; kmlLayer = new google.maps.KmlLayer({ url: url, suppressInfoWindows: true, preserveViewport: true }); kmlLayer.setMap(map); google.maps.event.addListener(kmlLayer,'click',function(e){ kmlWindow.setOptions ({ content: e.featureData.infoWindowHtml, maxWidth: 220, position: e.latLng, pixelOffset: e.pixelOffset }); activeWindow.close(); activeWindow = kmlWindow; activeWindow.open(map); }); google.maps.event.addListener(kmlLayer, 'status_changed', function() { if (kmlLayer.getStatus() != 'OK') { alert ('Search Status: ' + kmlLayer.getStatus()); } }); google.maps.event.addListener(kmlLayer, 'defaultviewport_changed', function() { var view = kmlLayer.getDefaultViewport(); if (view.equals({north : 90, south : -90, east : 180, west : -180})) { alert ('No Stations Found'); } else { map.fitBounds(view); } }); break; case 'QUADS': url = 'https://metzgerwillard.us/quads/get_maps.aspx?SOUTH=' + south + '&EAST=' + east + '&NORTH=' + north + '&WEST=' + west; kmlLayer = new google.maps.KmlLayer({ url: url, suppressInfoWindows: true, preserveViewport: true }); kmlLayer.setMap(map); google.maps.event.addListener(kmlLayer,'click',function(e){ kmlWindow.setOptions ({ content: e.featureData.infoWindowHtml, position: e.latLng, pixelOffset: e.pixelOffset }); activeWindow.close(); activeWindow = kmlWindow; activeWindow.open(map); }); google.maps.event.addListener(kmlLayer, 'status_changed', function() { if (kmlLayer.getStatus() != 'OK') { alert ('Search Status: ' + kmlLayer.getStatus()); } }); google.maps.event.addListener(kmlLayer, 'defaultviewport_changed', function() { var view = kmlLayer.getDefaultViewport(); if (view.equals({north : 90, south : -90, east : 180, west : -180})) { alert ('Out of Range'); } }); break; case 'QTR': url = 'https://gis.blm.gov/arcgis/rest/services/Cadastral/BLM_Natl_PLSS_CadNSDI/MapServer/export?'; url += 'dynamicLayers=%5B%7B%22id%22:1,%22source%22:%7B%22type%22:%22mapLayer%22,%22mapLayerId%22:1%7D,%22drawingInfo%22:%7B%22renderer%22:%7B%22type%22:%22simple%22,%22symbol%22:%7B%22type%22:%22esriSFS%22,%22color%22:%5B0,255,0,0%5D,%22outline%22:%7B%22type%22:%22esriSLS%22,%22color%22:%5B0,255,0,255%5D,%22width%22:2%7D%7D%7D%7D%7D,%7B%22id%22:2,%22source%22:%7B%22type%22:%22mapLayer%22,%22mapLayerId%22:2%7D,%22drawingInfo%22:%7B%22renderer%22:%7B%22type%22:%22simple%22,%22symbol%22:%7B%22type%22:%22esriSFS%22,%22color%22:%5B255,140,0,0%5D,%22outline%22:%7B%22type%22:%22esriSLS%22,%22color%22:%5B255,140,0,255%5D,%22width%22:1.5%7D%7D%7D%7D%7D,%7B%22id%22:3,%22source%22:%7B%22type%22:%22mapLayer%22,%22mapLayerId%22:3%7D,%22drawingInfo%22:%7B%22renderer%22:%7B%22type%22:%22simple%22,%22symbol%22:%7B%22type%22:%22esriSFS%22,%22color%22:%5B0,0,255,0%5D,%22outline%22:%7B%22type%22:%22esriSLS%22,%22color%22:%5B0,0,255,255%5D,%22width%22:1%7D%7D%7D,%22showLabels%22:true,%22labelingInfo%22:%5B%7B%22labelPlacement%22:%22esriServerPolygonPlacementAlwaysHorizontal%22,%22labelExpression%22:%22%5BSECDIVLAB%5D%22,%22minScale%22:50000,%22symbol%22:%7B%22type%22:%22esriTS%22,%22color%22:%5B255,255,255,255%5D,%22haloColor%22:%5B0,0,0,255%5D,%22haloSize%22:1,%22font%22:%7B%22family%22:%22Arial%22,%22size%22:8%7D%7D%7D,%7B%22labelPlacement%22:%22esriServerPolygonPlacementAlwaysHorizontal%22,%22labelExpression%22:%22%5BSURVLAB%5D%22,%22minScale%22:50000,%22symbol%22:%7B%22type%22:%22esriTS%22,%22color%22:%5B255,255,255,255%5D,%22haloColor%22:%5B0,0,0,255%5D,%22haloSize%22:1,%22font%22:%7B%22family%22:%22Arial%22,%22size%22:8%7D%7D%7D%5D%7D%7D%5D'; url += '&f=image&dpi=149&transparent=true&format=png32&bboxSR=4326&imageSR=4326&size=' + width + ',' + height + '&bbox=' + west + ',' + south + ',' + east + ',' + north; Overlay = new google.maps.GroundOverlay( url, imageBounds, {clickable: false}); Overlay.setOpacity(1 - slider.noUiSlider.get()); Overlay.setMap(map); break; case 'TOPO': url = 'http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/export?f=image&format=png24&bboxSR=4326&imageSR=4326&transparent=false&size=' + width + ',' + height + '&bbox=' + west + ',' + south + ',' + east + ',' + north; Overlay = new google.maps.GroundOverlay( url, imageBounds, {clickable: false}); Overlay.setOpacity(1 - slider.noUiSlider.get()); Overlay.setMap(map); break; default: //case 'TWP': url = 'https://gis.blm.gov/arcgis/rest/services/Cadastral/BLM_Natl_PLSS_CadNSDI/MapServer/export?'; url += 'dynamicLayers=%5B%7B%22id%22:1,%22source%22:%7B%22type%22:%22mapLayer%22,%22mapLayerId%22:1%7D,%22drawingInfo%22:%7B%22renderer%22:%7B%22type%22:%22simple%22,%22symbol%22:%7B%22type%22:%22esriSFS%22,%22color%22:%5B0,255,0,0%5D,%22outline%22:%7B%22type%22:%22esriSLS%22,%22color%22:%5B0,255,0,255%5D,%22width%22:2%7D%7D%7D,%22labelingInfo%22:%5B%7B%22labelPlacement%22:%22esriServerPolygonPlacementAlwaysHorizontal%22,%22labelExpression%22:%22%5BTWNSHPLAB%5D%22,%22minScale%22:450000,%22symbol%22:%7B%22type%22:%22esriTS%22,%22color%22:%5B255,255,255,255%5D,%22haloColor%22:%5B0,0,0,255%5D,%22haloSize%22:1,%22font%22:%7B%22family%22:%22Arial%22,%22size%22:10%7D%7D%7D%5D%7D%7D,%7B%22id%22:2,%22source%22:%7B%22type%22:%22mapLayer%22,%22mapLayerId%22:2%7D,%22drawingInfo%22:%7B%22renderer%22:%7B%22type%22:%22simple%22,%22symbol%22:%7B%22type%22:%22esriSFS%22,%22color%22:%5B255,140,0,0%5D,%22outline%22:%7B%22type%22:%22esriSLS%22,%22color%22:%5B255,140,0,255%5D,%22width%22:1.5%7D%7D%7D,%22labelingInfo%22:%5B%7B%22labelPlacement%22:%22esriServerPolygonPlacementAlwaysHorizontal%22,%22labelExpression%22:%22%5BFRSTDIVLAB%5D%22,%22minScale%22:200000,%22symbol%22:%7B%22type%22:%22esriTS%22,%22color%22:%5B255,255,255,255%5D,%22haloColor%22:%5B0,0,0,255%5D,%22haloSize%22:1,%22font%22:%7B%22family%22:%22Arial%22,%22size%22:9%7D%7D%7D%5D%7D%7D%5D'; url += '&f=image&dpi=149&transparent=true&format=png32&bboxSR=4326&imageSR=4326&size=' + width + ',' + height + '&bbox=' + west + ',' + south + ',' + east + ',' + north; Overlay = new google.maps.GroundOverlay( url, imageBounds, {clickable: false}); Overlay.setOpacity(1 - slider.noUiSlider.get()); Overlay.setMap(map); } }