-
Notifications
You must be signed in to change notification settings - Fork 1
/
jquery.geoinput.min.js
1 lines (1 loc) · 18.9 KB
/
jquery.geoinput.min.js
1
var dmgig_icons=function(){return{plane:"data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDQwMC4xNTYgNDAwLjE1NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDAwLjE1NiA0MDAuMTU1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTM5Ni4zMSw0OS41NDVjNi4wODgtMTguMjcxLDQuOTQ5LTMyLjM1NC0zLjQzMi00Mi4yNTVjLTkuODk3LTguMzc2LTIzLjk4My05LjUxNC00Mi4yNTgtMy40MzQgICBjLTE4LjI3Myw2LjA5MS0zNC42NDMsMTYuMzY4LTQ5LjExMSwzMC44MzNsLTQ1LjY3OSw0NS42ODNMNjUuOTczLDM0Ljk3OGMtMy4wNDYtMC45NTMtNS45MDEtMC4xOTItOC41NjQsMi4yODJMM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jY1N2MxMS4wNTktNC41MTcsMjUuMjg2LTEuMjExLDMzLjI4MSw3LjU3MiAgICBjMi42NTcsMi44OSw3LjA0NywzLjIzOSwxMC4xNDIsMC44NDhjOC4wMzktNi4zMDQsMTUuMzQ5LTEzLjUzNCwyMS43NC0yMS40OTRjMi40OC0zLjA3OSwyLjEzLTcuNTU5LTAuODAzLTEwLjIxMyAgICBjLTkuMzUzLTguNDctMTIuMzg4LTIxLjk0Ni03LjUyOS0zMy41MjRjNC41NjgtMTAuODk5LDE1LjYxMi0xOC4yMTcsMjcuNDkxLTE4LjIxN2wxLjY2MiwwLjA0MyAgICBjMy44NTMsMC4zMTMsNy4zOTgtMi42NTUsNy44NjUtNi41ODhDMjY5LjA0NCwxMzkuOTE3LDI2OS4wNTgsMTI5LjYzOSwyNjcuOTIsMTE5LjQ2MXogTTEzNC41OTUsMTc5LjQ5MSAgICBjLTI0LjcxOCwwLTQ0LjgyNC0yMC4xMDYtNDQuODI0LTQ0LjgyNGMwLTI0LjcxNywyMC4xMDYtNDQuODI0LDQ0LjgyNC00NC44MjRjMjQuNzE3LDAsNDQuODIzLDIwLjEwNyw0NC44MjMsNDQuODI0ICAgIEMxNzkuNDE4LDE1OS4zODUsMTU5LjMxMiwxNzkuNDkxLDEzNC41OTUsMTc5LjQ5MXoiIGZpbGw9IiMwMDAwMDAiLz4KCTwvZz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K"}}();!function(e,M,t){"use strict";e.fn.geoInput=function(o){var L,i,g,n,s=this,j=e(this),c=j.attr("id");s.map=null,s.mapOptions={},s.marker=new M.maps.Marker,L={latLngStringToGoogle:function(e){var t=e.split(",");return new M.maps.LatLng(t[0],t[1])},latLngGoogleToString:function(e){return e.lat().toFixed(n.precision)+","+e.lng().toFixed(n.precision)},validateUniqueElementId:function(M){return 1===e("#"+c).length}},n=e.extend({apikey:"<APIKEY>",width:"300px",height:"150px",bgColorMap:"#A3C3FF",bgColor:"#DDD",txtColor:"#000",precision:6,zoomLevel:2,mapCenter:"0,0"},o),i=function(){var e="dmgig_"+c+"_zoomLevel",M="dmgig_"+c+"_mapCenter";return{storeZoomLevel:function(M){sessionStorage.setItem(e,M),console.log(sessionStorage)},storeMapCenter:function(e){sessionStorage.setItem(M,L.latLngGoogleToString(e)),console.log(sessionStorage)},getStoredZoom:function(){var M=sessionStorage.getItem(e);return null!==M&&(M=parseInt(M)),console.log(M),M},getStoredMapCenter:function(){var e=sessionStorage.getItem(M);return null!=e&&(e=L.latLngStringToGoogle(e)),console.log(e),e},clearPreferences:function(){sessionStorage.removeItem(e),sessionStorage.removeItem(M),console.log(sessionStorage)}}}(),n.mapCenter=L.latLngStringToGoogle(n.mapCenter),i.getStoredZoom()&&(n.zoomLevel=i.getStoredZoom()),i.getStoredMapCenter()&&(n.mapCenter=i.getStoredMapCenter()),j.empty();var g=function(){function M(M,t,o){return M.css({width:"16px",height:"16px",padding:"3px 2px","float":o,color:n.color,"background-color":n.bgcolor,"text-align":"center",cursor:"pointer"}),t=e("<img />").attr("src",t).css({width:"16px",height:"16px"}),M.html(t),M}function o(e,M){return e.css({height:"16px",padding:"1px",margin:"1px",color:n.color,"background-color":n.bgcolor,"font-size":"12px","font-family":"console",cursor:"pointer"}),e.html(M),e.hover(function(){e.css({color:n.bgcolor,"background-color":n.color})},function(){e.css({color:n.color,"background-color":n.bgColor})}),e}function L(e,M){return e.css({width:"16px",height:"16px",padding:"1px",margin:"1px","float":M}),e}var g={};return g.geoInput=e("<div/>",{id:"dmgig_geoInput_"+c}),g.map=e(" <div/>",{id:"dmgig_map_"+c}).appendTo(g.geoInput),g.mapControls=e(" <div/>").appendTo(g.geoInput),g.geoControls=e(" <div/>").appendTo(g.geoInput),g.clear=e(' <div style="clear:both"></div>').appendTo(g.geoControls),g.rGeoResults=e(" <div/>").appendTo(g.geoInput),g.rgcTable=e(" <table>").appendTo(g.rGeoResults),g.rgcHead=e(" <thead>").appendTo(g.rgcTable),g.rgcTr=e(" <tr>").appendTo(g.rgcHead),g.rgcTh1=e(" <th> Result Sets Found:</th>").appendTo(g.rgcTr),g.rgcTh2=e(" <th></th>").appendTo(g.rgcTr),j.append(g.geoInput),g.latLngDisplay=e("<div/>"),g.revGeoCodeResultsBody=e("<tbody>"),g.revGeoCodeFoundCount=e("<span/>"),g.prefsPanel=e("<div/>"),g.geoCode=e("<div/>",{title:"geocode from text"}),g.revGeoCode=e("<div/>",{title:"reverse geocode marker location"}),g.markerToCenter=e("<div/>",{title:"bring marker(s) to center"}),g.centerOnMarker=e("<div/>",{title:"center map on marker(s)"}),g.revGeoCodeResultsHide=e("<span/>",{title:"hide results"}),g.togglePrefs=e("<div/>",{title:"toggle preferences"}),g.storeZoomLevel=e("<div/>",{title:"store zoom level"}),g.storeMapCenter=e("<div/>",{title:"store map center"}),g.storeMarkerCount=e("<div/>",{title:"store marker count"}),g.clearPreferences=e("<div/>",{title:"clear data storage"}),g.geoCodeInput=e("<input/>"),g.latInput=e("<input/>",{type:"hidden",name:"lat"}),g.lngInput=e("<input/>",{type:"hidden",name:"lng"}),g.hiddenInputs=e("<div/>"),g.spacerRight=e("<div/>"),g.spacerLeft=e("<div/>"),g.mapControls.append(g.latLngDisplay),"<APIKEY>"!==n.apikey&&""!==n.apikey?g.geoControls.prepend(g.geoCode,g.geoCodeInput,g.spacerLeft,g.revGeoCode,g.togglePrefs,g.spacerRight,g.markerToCenter,g.centerOnMarker):g.geoControls.prepend(g.geoCode,g.geoCodeInput,g.spacerLeft,g.togglePrefs,g.spacerRight,g.markerToCenter,g.centerOnMarker),g.rgcTh1.prepend(g.revGeoCodeResultsHide),g.rgcTh1.append(g.revGeoCodeFoundCount),g.rgcTable.append(g.revGeoCodeResultsBody),g.rGeoResults.after(g.latInput,g.lngInput,g.hiddenInputs),g.prefsPanel.append(g.storeZoomLevel,g.storeMapCenter,g.clearPreferences),g.geoControls.after(g.prefsPanel),g.geoInput.css({"font-family":"Arial",width:n.width,position:"relative",border:"1px solid #AAA"}),g.map.css({width:n.width,height:n.height,border:"1px solid #CCC","background-color":n.bgColor,"text-align":"center"}),g.map.html("<br /><br />loading..."),g.rGeoResults.css({clear:"both",display:"none",left:"-1px",width:"calc("+n.width+" - 8px)","background-color":"#FFF",border:"2px solid #CCC",position:"absolute","z-index":"5555","text-align":"left",padding:"3px"}),g.rgcTable.css({"font-size":"12px","font-family":"Arial"}),g.prefsPanel.append(e("<img />").attr("src",t.gear)).css({clear:"both",display:"none",left:"-1px",width:"calc("+n.width+" - 2px)","background-color":"#DDD",border:"2px solid #CCC",position:"absolute","z-index":"9999"}),g.latLngDisplay.css({"font-family":"monospace","font-size":"12px","text-align":"center","background-color":"#333",color:"#FFF","margin-bottom":"2px"}),g.latLngDisplay.html("0,0"),M(g.geoCode,t.plane,"left"),M(g.revGeoCode,t.find,"left"),M(g.markerToCenter,t.center,"right"),M(g.centerOnMarker,t.marker,"right"),M(g.togglePrefs,t.gear,"right"),g.revGeoCodeResultsHide.html("×").css("cursor","pointer"),o(g.storeZoomLevel,"store zoom level"),o(g.storeMapCenter,"store map center position"),o(g.storeMarkerCount,"store markers count"),o(g.clearPreferences,"clear storage data"),g.geoCodeInput.css({"float":"left"}),L(g.spacerRight,"right"),L(g.spacerLeft,"left"),g.geoCode.on("click",function(){s.geocodeTextLocation()}),g.revGeoCode.on("click",function(){s.reverseGeocodeMarkerPosition()}),g.centerOnMarker.on("click",function(){s.centerToMarker()}),g.markerToCenter.on("click",function(){s.markerToCenter()}),g.storeZoomLevel.on("click",function(){i.storeZoomLevel(s.map.getZoom())}),g.storeMapCenter.on("click",function(){i.storeMapCenter(s.map.getCenter())}),g.clearPreferences.on("click",function(){i.clearPreferences()}),g.revGeoCodeResultsHide.on("click",function(){g.rGeoResults.hide()}),g.togglePrefs.click(function(){var e=j.data("clicks");e?g.prefsPanel.slideToggle():g.prefsPanel.slideToggle(),j.data("clicks",!e)}),g}();return s.initialize=function(){s.mapOptions={zoom:n.zoomLevel,center:n.mapCenter},s.map=new M.maps.Map(document.getElementById("dmgig_map_"+c),s.mapOptions),s.marker.setPosition(n.mapCenter),s.marker.setMap(s.map),s.marker.setDraggable(!0),s.setLatLngInputs()},s.watchMarkerMove=M.maps.event.addListener(s.marker,"dragend",function(){s.setLatLngInputs(),g.hiddenInputs.empty()}),s.setLatLngInputs=function(){var e,M;e=s.marker.getPosition(),M=e.lat().toFixed(n.precision)+","+e.lng().toFixed(n.precision),g.latLngDisplay.html(M),g.latInput.val(e.lat().toFixed(n.precision)),g.lngInput.val(e.lng().toFixed(n.precision))},s.centerToMarker=function(){s.map.setCenter(s.marker.getPosition()),s.setLatLngInputs()},s.markerToCenter=function(){s.marker.setPosition(s.map.getCenter()),s.setLatLngInputs()},s.geocodeTextLocation=function(){var t,o,L;L=g.geoCodeInput.val(),t=encodeURIComponent(g.geoCodeInput.val()),e.get("https://maps.googleapis.com/maps/api/geocode/json?address="+t,function(e){o=new M.maps.LatLng(e.results[0].geometry.location.lat,e.results[0].geometry.location.lng),s.map.setCenter(o),s.markerToCenter()}).fail(function(){alert("Failed to geocode "+L)})},s.reverseGeocodeMarkerPosition=function(){var M,t,o,L,i,j=[];o=s.marker.getPosition(),L=o.lat().toString()+","+o.lng().toString(),i=encodeURIComponent(L),M="https://maps.googleapis.com/maps/api/geocode/json",j.push("latlng="+i),j.push("location_type=ROOFTOP"),j.push("result_type=street_address"),j.push("key="+n.apikey),t=M+"?"+j.join("&"),e.get(t,function(M){var t,o;if(g.hiddenInputs.empty(),g.revGeoCodeResultsBody.empty(),g.revGeoCodeFoundCount.html(M.results.length),g.rGeoResults.show(),0!==M.results.length){t=M.results[0].address_components;for(o in t)e(s.revGeocodeResultsMakeRow(t[o].long_name,t[o].types)).appendTo(g.revGeoCodeResultsBody),e(s.revGeocodeResultsAddHiddenInputs(t[o].short_name,t[o].types))}}).fail(function(){alert("Failed to reverse geocode "+L)})},s.revGeocodeResultsMakeRow=function(M,t){return e("<tr><td><b>"+M+"</b> <i>"+t.join(", ")+"</i></td><td>□</td></tr>")},s.revGeocodeResultsAddHiddenInputs=function(M,t){e("<input/>",{type:"hidden",name:t[0],value:M}).appendTo(g.hiddenInputs)},s.parent_form=j.closest("form"),s.parent_form.on("submit",function(){return g.geoCodeInput.prop("disabled",!0),setTimeout(function(){g.geoCodeInput.prop("disabled",!1)},300),!1}),L.validateUniqueElementId(j)?(console.log(n.apikey),void s.initialize()):(console.log("geoInput Err: input elements require unique ids."),!1)}}(jQuery,google,dmgig_icons);