You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
2 weeks ago
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6856],{93703:function(e,r,n){var t=n(40890),o=n(41376),i=n(95783),s=n(54354),a=n(31998),l=n(69039),c=n(77975),u=n(720),g=n(41372),p=n(42010),f=n(19352),w=n(12810),d=n(2383),m=new t.Z,v={ABANDONED:new l.ZP({fill:new c.Z({color:"rgba(225, 225, 225, 255)"}),stroke:new u.Z({color:"rgba(0, 0, 0, 255)",width:.4})}),GAS:new l.ZP({fill:new c.Z({color:"rgba(255, 0, 0, 255)"}),stroke:new u.Z({color:"rgba(110, 110, 110, 255)",width:.4})}),OIL:new l.ZP({fill:new c.Z({color:"rgba(56, 168, 0, 255)"}),stroke:new u.Z({color:"rgba(110, 110, 110, 255)",width:0})}),OILGAS:new l.ZP({fill:new c.Z({color:"rgba(168, 112, 0, 255)"}),stroke:new u.Z({color:"rgba(110, 110, 110, 255)",width:.4})})},Z=new i.Z({loader:function(e,r,n,t,o){var i="https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/FeatureServer/0/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry="+encodeURIComponent('{"xmin":'+e[0]+',"ymin":'+e[1]+',"xmax":'+e[2]+',"ymax":'+e[3]+',"spatialReference":{"wkid":102100}}')+"&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100";$.ajax({url:i,dataType:"jsonp",success:function(e){if(e.error)alert(e.error.message+"\n"+e.error.details.join("\n")),o();else{var r=m.readFeatures(e,{featureProjection:n});r.length>0&&Z.addFeatures(r),t(r)}},error:o})},strategy:(0,d.Gg)((0,f.dl)({tileSize:512}))}),y=new g.Z({source:Z,style:function(e){var r=e.get("activeprod");return v[r]}}),h=new p.Z({source:new a.Z({attributions:'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer">ArcGIS</a>',url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}"})}),S=new o.Z({layers:[h,y],target:document.getElementById("map"),view:new s.ZP({center:(0,w.mi)([-97.6114,38.8403]),zoom:7})}),b=function(e){var r=[];if(S.forEachFeatureAtPixel(e,(function(e){r.push(e)})),r.length>0){var n,t,o=[];for(n=0,t=r.length;n<t;++n)o.push(r[n].get("field_name"));document.getElementById("info").innerHTML=o.join(", ")||"(unknown)",S.getTarget().style.cursor="pointer"}else document.getElementById("info").innerHTML=" ",S.getTarget().style.cursor=""};S.on("pointermove",(function(e){if(!e.dragging){var r=S.getEventPixel(e.originalEvent);b(r)}})),S.on("click",(function(e){b(e.pixel)}))}},function(e){var r=function(r){return e(e.s=r)};r(9877),r(93703)}]);
|
||
|
//# sourceMappingURL=vector-esri.js.map
|