I'm modifying some Javascript 3.x code written by previous staff member. I had to "fix" a cross-domain and proxy issue to get around the token timing out every year. To do that, I adding a ProxyRule that points to our common proxy on another machine.
Initiall, this all seems to be working as expected. I user fills out the query boxes and selects "Find Places", which returns a table of attributes. The user can than click on different items in the table and the map will zoom. The click-zoom can be done multiple times and it works.
However, I noticed that although the "click to zoom" works for the first set of results, if the user performs another query, the table gets populated correctly but "click to zoom" will draw but not zoom. I know it is drawing since I can zoom out and see the polygon change as I select different items in the table.
The "placename" query which returns a table of items to click, I believe, is c# code (that I would rather not touch,) and the query seems to be working just fine. My new esri.layers.FeatureLayer uses the MODE_SNAPSHOT. I have tried the other options thinking ONDEMAND might work better, but that seems to make it worse (i.e. the zoom after the 1st query is hit and miss).
I was developing in Firefox developer tools, but that provided no addition help I could interpret. So I took a look at the developer tools in Chrome, I'm starting to thing that my proxy is working with my secure service the first time, but not with the second placename query OR I am missing a line to retrieve a new set of data from the service. The error is
dojo.io.script error
k {message: "Request canceled", response: Object, log: undefined, stack: "Error: Request canceled
at new k (https://js.a…is.com/3.7/js/esri/layers/SnapshotMode.js:20:263)"}
Uncaught TypeError: Cannot read property '_jsonpCallback' of undefined
proxy.ashx?https://<my Service URL>/MapServer/0/query?f=js…:1 Uncaught TypeError: Cannot read property '_jsonpCallback' of undefined
at proxy.ashx?https://<my Service URL>/MapServer/0/query?f=js…:1
Services are from ArcGIS Server 10.2.1 (will eventually to 10.5.1). This is an internal only site so can not provide a sample.
Edit: I will add that am seeing an error in Firefox when it fails
TypeError: dojo.io.script.jsonp_dojoIoScript_UCU_Codes00 is undefined
Any help would be appreciated. Thanks
<SPAN class="operator token"><</SPAN><SPAN class="operator token">!</SPAN>DOCTYPE html<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>html<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>head<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>meta http<SPAN class="operator token">-</SPAN>equiv<SPAN class="operator token">=</SPAN><SPAN class="string token">"Content-Type"</SPAN> content<SPAN class="operator token">=</SPAN><SPAN class="string token">"text/html; charset=utf-8"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>meta http<SPAN class="operator token">-</SPAN>equiv<SPAN class="operator token">=</SPAN><SPAN class="string token">"X-UA-Compatible"</SPAN> content<SPAN class="operator token">=</SPAN><SPAN class="string token">"IE=7, IE=9, IE=10"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">!</SPAN><SPAN class="operator token">--</SPAN>The viewport meta tag is used to improve the presentation and behavior
<SPAN class="keyword token">of</SPAN> the samples on iOS devices<SPAN class="operator token">--</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>meta name<SPAN class="operator token">=</SPAN><SPAN class="string token">"viewport"</SPAN> content<SPAN class="operator token">=</SPAN><SPAN class="string token">"initial-scale=1, maximum-scale=1,user-scalable=no"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>title<SPAN class="operator token">></SPAN>Internal UCU Mapper<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>title<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>link rel<SPAN class="operator token">=</SPAN><SPAN class="string token">"stylesheet"</SPAN> href<SPAN class="operator token">=</SPAN>"<SPAN class="comment token">//js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css"></SPAN>
<SPAN class="operator token"><</SPAN>link rel<SPAN class="operator token">=</SPAN><SPAN class="string token">"stylesheet"</SPAN> href<SPAN class="operator token">=</SPAN>"<SPAN class="comment token">//js.arcgis.com/3.7/js/esri/css/esri.css"></SPAN>
<SPAN class="operator token"><</SPAN>style<SPAN class="operator token">></SPAN>
html<SPAN class="punctuation token">,</SPAN>body <SPAN class="punctuation token">{</SPAN> height<SPAN class="punctuation token">:</SPAN><SPAN class="number token">100</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">;</SPAN> width<SPAN class="punctuation token">:</SPAN><SPAN class="number token">100</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">;</SPAN> margin<SPAN class="punctuation token">:</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN> padding<SPAN class="punctuation token">:</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
body <SPAN class="punctuation token">{</SPAN>
background<SPAN class="punctuation token">:</SPAN>#dfe5d7<SPAN class="punctuation token">;</SPAN>
font<SPAN class="operator token">-</SPAN>family<SPAN class="punctuation token">:</SPAN><SPAN class="string token">"Georgia,Verdana"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
span<SPAN class="punctuation token">{</SPAN> font<SPAN class="operator token">-</SPAN>weight<SPAN class="punctuation token">:</SPAN>bold<SPAN class="punctuation token">;</SPAN> color<SPAN class="punctuation token">:</SPAN>#<SPAN class="number token">808080</SPAN><SPAN class="punctuation token">;</SPAN> text<SPAN class="operator token">-</SPAN>align<SPAN class="punctuation token">:</SPAN>left<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">.</SPAN>inset<SPAN class="punctuation token">{</SPAN>
color<SPAN class="punctuation token">:</SPAN> #d7decf<SPAN class="punctuation token">;</SPAN>
text<SPAN class="operator token">-</SPAN>shadow<SPAN class="punctuation token">:</SPAN> 0px 2px 2px #<SPAN class="number token">808080</SPAN><SPAN class="punctuation token">;</SPAN>
font<SPAN class="operator token">-</SPAN>weight<SPAN class="punctuation token">:</SPAN>bold<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
#header <SPAN class="punctuation token">{</SPAN>
background<SPAN class="punctuation token">:</SPAN> #fcfff4<SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">/* old browsers */</SPAN>
background<SPAN class="punctuation token">:</SPAN> <SPAN class="operator token">-</SPAN>moz<SPAN class="operator token">-</SPAN>linear<SPAN class="operator token">-</SPAN><SPAN class="token function">gradient</SPAN><SPAN class="punctuation token">(</SPAN>left<SPAN class="punctuation token">,</SPAN> #fcfff4 <SPAN class="number token">0</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">,</SPAN> #dfe5d7 <SPAN class="number token">40</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">,</SPAN> #b3bead <SPAN class="number token">100</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">/* firefox */</SPAN>
<SPAN class="comment token">/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=1 ); */</SPAN> <SPAN class="comment token">/* ie */</SPAN>
border<SPAN class="punctuation token">:</SPAN>solid 1px #<SPAN class="number token">398235</SPAN><SPAN class="punctuation token">;</SPAN>
height<SPAN class="punctuation token">:</SPAN>80px<SPAN class="punctuation token">;</SPAN>
padding<SPAN class="punctuation token">:</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
margin<SPAN class="punctuation token">:</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
#map <SPAN class="punctuation token">{</SPAN>
position<SPAN class="punctuation token">:</SPAN>absolute<SPAN class="punctuation token">;</SPAN>
padding<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
margin<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
height<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">100</SPAN><SPAN class="operator token">%</SPAN><SPAN class="punctuation token">;</SPAN>
left<SPAN class="punctuation token">:</SPAN>310px<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">.</SPAN>claro <SPAN class="punctuation token">.</SPAN>dijitContentPane <SPAN class="punctuation token">{</SPAN>
padding<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">.</SPAN>maptitle<SPAN class="punctuation token">{</SPAN>
padding<SPAN class="operator token">-</SPAN>left<SPAN class="punctuation token">:</SPAN>15px<SPAN class="punctuation token">;</SPAN>
font<SPAN class="operator token">-</SPAN>size<SPAN class="punctuation token">:</SPAN>32px<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">.</SPAN>subtitle <SPAN class="punctuation token">{</SPAN>
font<SPAN class="operator token">-</SPAN>size<SPAN class="punctuation token">:</SPAN>14px<SPAN class="punctuation token">;</SPAN>
padding<SPAN class="operator token">-</SPAN>left<SPAN class="punctuation token">:</SPAN>40px<SPAN class="punctuation token">;</SPAN>
color<SPAN class="punctuation token">:</SPAN>#462D44<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
#leftpane <SPAN class="punctuation token">{</SPAN>
position<SPAN class="punctuation token">:</SPAN>absolute<SPAN class="punctuation token">;</SPAN>
border<SPAN class="punctuation token">:</SPAN>none<SPAN class="punctuation token">;</SPAN>
background<SPAN class="punctuation token">:</SPAN>none<SPAN class="punctuation token">;</SPAN>
color<SPAN class="punctuation token">:</SPAN>#462D44<SPAN class="punctuation token">;</SPAN>
font<SPAN class="operator token">-</SPAN>size<SPAN class="punctuation token">:</SPAN>8pt<SPAN class="punctuation token">;</SPAN>
height<SPAN class="punctuation token">:</SPAN>100px<SPAN class="punctuation token">;</SPAN>
padding<SPAN class="punctuation token">:</SPAN> 15px<SPAN class="punctuation token">;</SPAN>
text<SPAN class="operator token">-</SPAN>align<SPAN class="punctuation token">:</SPAN>left<SPAN class="punctuation token">;</SPAN>
width<SPAN class="punctuation token">:</SPAN>300px<SPAN class="punctuation token">;</SPAN>
margin<SPAN class="punctuation token">:</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>style<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>script src<SPAN class="operator token">=</SPAN>"<SPAN class="comment token">//js.arcgis.com/3.7/"></script></SPAN>
<SPAN class="operator token"><</SPAN>script<SPAN class="operator token">></SPAN>
<SPAN class="keyword token">var</SPAN> map<SPAN class="punctuation token">,</SPAN> featureLayer<SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">require</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>
<SPAN class="string token">"dijit/layout/BorderContainer"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dijit/layout/ContentPane"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/map"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/layers/FeatureLayer"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dijit/form/FilteringSelect"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dijit/form/ComboBox"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojox/grid/DataGrid"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojo/data/ItemFileReadStore"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/tasks/QueryTask"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/tasks/query"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/dijit/Scalebar"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"esri/urlUtils"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dijit/registry"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojo/dom"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojo/on"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojo/parser"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"dojo/domReady!"</SPAN>
<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>
BorderContainer<SPAN class="punctuation token">,</SPAN>
ContentPane<SPAN class="punctuation token">,</SPAN>
Map<SPAN class="punctuation token">,</SPAN>
FeatureLayer<SPAN class="punctuation token">,</SPAN>
FilteringSelect<SPAN class="punctuation token">,</SPAN>
ComboBox<SPAN class="punctuation token">,</SPAN>
DataGrid<SPAN class="punctuation token">,</SPAN>
ItemFileReadStore<SPAN class="punctuation token">,</SPAN>
QueryTask<SPAN class="punctuation token">,</SPAN>
query<SPAN class="punctuation token">,</SPAN>
Scalebar<SPAN class="punctuation token">,</SPAN>
urlUtils<SPAN class="punctuation token">,</SPAN>
registry<SPAN class="punctuation token">,</SPAN>
dom<SPAN class="punctuation token">,</SPAN>
on<SPAN class="punctuation token">,</SPAN>
parser
<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
parser<SPAN class="punctuation token">.</SPAN><SPAN class="token function">parse</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// function init() { // using init() seems to cause issues with IE</SPAN>
<SPAN class="comment token">// on(dom.byId("grid"), "onRowClick", onRowClickHandler); //this had to be done in the function itself</SPAN>
<SPAN class="token function"> on</SPAN><SPAN class="punctuation token">(</SPAN>dom<SPAN class="punctuation token">.</SPAN><SPAN class="token function">byId</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"btnexecute"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"click"</SPAN><SPAN class="punctuation token">,</SPAN> executeTask<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> initExtent <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>geometry<SPAN class="punctuation token">.</SPAN>Extent</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">"xmin"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="operator token">-</SPAN><SPAN class="number token">1025000</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"ymin"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">520000</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"xmax"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">1400000</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"ymax"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">2400000</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"spatialReference"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">"wkid"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">3338</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>Map</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"map"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="punctuation token">{</SPAN>extent<SPAN class="punctuation token">:</SPAN>initExtent<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
dojo<SPAN class="punctuation token">.</SPAN><SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>window<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'resize'</SPAN><SPAN class="punctuation token">,</SPAN> map<SPAN class="punctuation token">,</SPAN> map<SPAN class="punctuation token">.</SPAN>resize<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Add Scalebar</SPAN>
<SPAN class="keyword token">var</SPAN> scalebar <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>dijit<SPAN class="punctuation token">.</SPAN>Scalebar</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
map<SPAN class="punctuation token">:</SPAN> map<SPAN class="punctuation token">,</SPAN>
scalebarUnit<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"english"</SPAN><SPAN class="punctuation token">,</SPAN>
attachTo<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"bottom-left"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Proxy and CORS set for secure services; </SPAN>
<SPAN class="comment token">// ... zoom working on 1st query set only....hmmm</SPAN>
<SPAN class="comment token">// ......my proxy stuff</SPAN>
urlUtils<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addProxyRule</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN> urlPrefix<SPAN class="punctuation token">:</SPAN> <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" target="_blank">https://</A><SPAN><Service URL/webadaptor>"</SPAN></SPAN><SPAN class="punctuation token">,</SPAN> proxyUrl<SPAN class="punctuation token">:</SPAN> <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" target="_blank">https://</A><SPAN><Service URL and path to proxy>.ashx"</SPAN></SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
esriConfig<SPAN class="punctuation token">.</SPAN>defaults<SPAN class="punctuation token">.</SPAN>io<SPAN class="punctuation token">.</SPAN>proxyUrl <SPAN class="operator token">=</SPAN> <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" target="_blank">https://</A><SPAN><Service URL and path to proxy>.ashx"</SPAN></SPAN><SPAN class="punctuation token">;</SPAN>
esriConfig<SPAN class="punctuation token">.</SPAN>defaults<SPAN class="punctuation token">.</SPAN>io<SPAN class="punctuation token">.</SPAN>alwaysUseProxy <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">;</SPAN>
esriConfig<SPAN class="punctuation token">.</SPAN>defaults<SPAN class="punctuation token">.</SPAN>io<SPAN class="punctuation token">.</SPAN>corsDetection <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> protocol <SPAN class="operator token">=</SPAN> window<SPAN class="punctuation token">.</SPAN>location<SPAN class="punctuation token">.</SPAN>protocol<SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Add adfg USAtopoArcOnline in alaska Albers as basemap</SPAN>
<SPAN class="keyword token">var</SPAN> basemap <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>ArcGISTiledMapServiceLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"<myBaseMapURL>/MapServer"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayer</SPAN><SPAN class="punctuation token">(</SPAN>basemap<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Add subunits</SPAN>
<SPAN class="keyword token">var</SPAN> subs <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>ArcGISDynamicMapServiceLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"<mySubunitsURL>/MapServer"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayer</SPAN><SPAN class="punctuation token">(</SPAN>subs<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Add ucu boundaries, will not show until zoomed in a bit</SPAN>
<SPAN class="keyword token">var</SPAN> ucu <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>ArcGISDynamicMapServiceLayer</SPAN><SPAN class="punctuation token">(</SPAN>protocol <SPAN class="operator token">+</SPAN> <SPAN class="string token">"<mySecureServiceURL>/MapServer"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayer</SPAN><SPAN class="punctuation token">(</SPAN>ucu<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//Add ucu label layer that is used for queries and zooming</SPAN>
<SPAN class="comment token">//MODE_SNAPSHOT</SPAN>
<SPAN class="keyword token">var</SPAN> ucu_label <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN>protocol <SPAN class="operator token">+</SPAN> <SPAN class="string token">"<mySecureLServiceLabelsURL>/MapServer/0"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>
mode<SPAN class="punctuation token">:</SPAN> esri<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>FeatureLayer<SPAN class="punctuation token">.</SPAN>MODE_SNAPSHOT<SPAN class="punctuation token">,</SPAN>
outFields<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
ucu_label<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setMinScale</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> theucu <SPAN class="operator token">=</SPAN> <SPAN class="string token">'xyz'</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> layerdef <SPAN class="operator token">=</SPAN> <SPAN class="string token">"ucu="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="operator token">+</SPAN>theucu<SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="punctuation token">;</SPAN>
ucu_label<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setDefinitionExpression</SPAN><SPAN class="punctuation token">(</SPAN>layerdef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//since the label polygons are hollow we need to display selected polygon</SPAN>
<SPAN class="keyword token">var</SPAN> symbol2 <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>symbol<SPAN class="punctuation token">.</SPAN>SimpleFillSymbol</SPAN><SPAN class="punctuation token">(</SPAN>
esri<SPAN class="punctuation token">.</SPAN>symbol<SPAN class="punctuation token">.</SPAN>SimpleFillSymbol<SPAN class="punctuation token">.</SPAN>STYLE_SOLID<SPAN class="punctuation token">,</SPAN>
<SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>symbol<SPAN class="punctuation token">.</SPAN>SimpleLineSymbol</SPAN><SPAN class="punctuation token">(</SPAN>
esri<SPAN class="punctuation token">.</SPAN>symbol<SPAN class="punctuation token">.</SPAN>SimpleLineSymbol<SPAN class="punctuation token">.</SPAN>STYLE_SOLID<SPAN class="punctuation token">,</SPAN>
<SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">dojo<SPAN class="punctuation token">.</SPAN>Color</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">.</SPAN><SPAN class="number token">7</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">3</SPAN>
<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">dojo<SPAN class="punctuation token">.</SPAN>Color</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">125</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">125</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">125</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0.35</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
ucu_label<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setRenderer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>renderer<SPAN class="punctuation token">.</SPAN>SimpleRenderer</SPAN><SPAN class="punctuation token">(</SPAN>symbol2<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//one way of zooming to layer</SPAN>
<SPAN class="comment token">//dojo.connect(ucu_label, "onUpdateEnd", ucu_zoom);</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayer</SPAN><SPAN class="punctuation token">(</SPAN>ucu_label<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//one way of zooming to layer</SPAN>
dojo<SPAN class="punctuation token">.</SPAN><SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>ucu_label<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"onUpdateEnd"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> zoomExtent <SPAN class="operator token">=</SPAN> esri<SPAN class="punctuation token">.</SPAN><SPAN class="token function">graphicsExtent</SPAN><SPAN class="punctuation token">(</SPAN>ucu_label<SPAN class="punctuation token">.</SPAN>graphics<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setExtent</SPAN><SPAN class="punctuation token">(</SPAN>zoomExtent<SPAN class="punctuation token">.</SPAN><SPAN class="token function">expand</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">1.25</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">refresh</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setExtent</SPAN><SPAN class="punctuation token">(</SPAN>initExtent<SPAN class="punctuation token">,</SPAN><SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">// now the zoom won't happen until map is updated</SPAN>
<SPAN class="keyword token">function</SPAN> <SPAN class="token function">onRowClickHandler</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// alert("I am an alert box!");</SPAN>
<SPAN class="keyword token">var</SPAN> clickeducu <SPAN class="operator token">=</SPAN> grid<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getItem</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">.</SPAN>rowIndex<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>ucu<SPAN class="punctuation token">;</SPAN>
layerdef <SPAN class="operator token">=</SPAN> <SPAN class="string token">"ucu="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="operator token">+</SPAN>clickeducu<SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="punctuation token">;</SPAN>
ucu_label<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setDefinitionExpression</SPAN><SPAN class="punctuation token">(</SPAN>layerdef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">function</SPAN> <SPAN class="token function">executeTask</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>mySelect<SPAN class="punctuation token">.</SPAN>value<SPAN class="punctuation token">.</SPAN>length <SPAN class="operator token">!=</SPAN><SPAN class="number token">3</SPAN> <SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>mySelect<SPAN class="punctuation token">.</SPAN>value<SPAN class="punctuation token">.</SPAN>length <SPAN class="operator token">==</SPAN> <SPAN class="number token">3</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> querywhere <SPAN class="operator token">=</SPAN> <SPAN class="string token">"gmu="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="operator token">+</SPAN>mySelect<SPAN class="punctuation token">.</SPAN>value<SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>mySelect<SPAN class="punctuation token">.</SPAN>value<SPAN class="punctuation token">.</SPAN>length <SPAN class="operator token">==</SPAN><SPAN class="number token">3</SPAN> <SPAN class="operator token">&&</SPAN> placetxt<SPAN class="punctuation token">.</SPAN>value<SPAN class="punctuation token">.</SPAN>length<SPAN class="operator token">></SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
querywhere <SPAN class="operator token">=</SPAN> <SPAN class="string token">"gmu="</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="operator token">+</SPAN>mySelect<SPAN class="punctuation token">.</SPAN>value<SPAN class="operator token">+</SPAN><SPAN class="string token">"'"</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">" and place like"</SPAN><SPAN class="operator token">+</SPAN><SPAN class="string token">"'%"</SPAN><SPAN class="operator token">+</SPAN>placetxt<SPAN class="punctuation token">.</SPAN>value<SPAN class="operator token">+</SPAN><SPAN class="string token">"%'"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">// var querywhere = "gmu="+"'"+mySelect.value+"'"+" and regyear=2000";</SPAN>
<SPAN class="keyword token">var</SPAN> queryTask <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>tasks<SPAN class="punctuation token">.</SPAN>QueryTask</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"/SpatialService/PlacenameService.ashx"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> query <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">esri<SPAN class="punctuation token">.</SPAN>tasks<SPAN class="punctuation token">.</SPAN>Query</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
query<SPAN class="punctuation token">.</SPAN>returnGeometry<SPAN class="operator token">=</SPAN><SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">;</SPAN>
query<SPAN class="punctuation token">.</SPAN>outFields <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"placename_id"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"ucu"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"place"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"gmu"</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">;</SPAN>
query<SPAN class="punctuation token">.</SPAN>where <SPAN class="operator token">=</SPAN> querywhere<SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// query.where = "gmu='01C' and place like '%creek%'";</SPAN>
dojo<SPAN class="punctuation token">.</SPAN><SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>queryTask<SPAN class="punctuation token">,</SPAN><SPAN class="string token">"onComplete"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>featureSet<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//build an array of attributes</SPAN>
<SPAN class="keyword token">var</SPAN> items <SPAN class="operator token">=</SPAN> dojo<SPAN class="punctuation token">.</SPAN><SPAN class="token function">map</SPAN><SPAN class="punctuation token">(</SPAN>featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">,</SPAN><SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>feature<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN> feature<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> data <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN>identifier<SPAN class="punctuation token">:</SPAN><SPAN class="string token">"placename_id"</SPAN><SPAN class="punctuation token">,</SPAN> items<SPAN class="punctuation token">:</SPAN>items<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
store <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">dojo<SPAN class="punctuation token">.</SPAN>data<SPAN class="punctuation token">.</SPAN>ItemFileReadStore</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>data<SPAN class="punctuation token">:</SPAN>data<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
grid<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setStore</SPAN><SPAN class="punctuation token">(</SPAN>store<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
grid<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setSortIndex</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"true"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//sort on the place name</SPAN>
grid<SPAN class="punctuation token">.</SPAN><SPAN class="token function">on</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"click"</SPAN><SPAN class="punctuation token">,</SPAN> onRowClickHandler<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// on(dom.byId("grid"), "onRowClick", onRowClickHandler);</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
queryTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">execute</SPAN><SPAN class="punctuation token">(</SPAN>query<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>script<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>head<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>body <SPAN class="keyword token">class</SPAN><SPAN class="operator token">=</SPAN><SPAN class="string token">"claro"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>div id<SPAN class="operator token">=</SPAN><SPAN class="string token">"mainWindow"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit.layout.BorderContainer"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>props<SPAN class="operator token">=</SPAN><SPAN class="string token">"design:'headline', gutters:false"</SPAN>
style<SPAN class="operator token">=</SPAN><SPAN class="string token">"width: 100%; height: 100%; margin: 0;"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>div id<SPAN class="operator token">=</SPAN><SPAN class="string token">"header"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit.layout.ContentPane"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>props<SPAN class="operator token">=</SPAN><SPAN class="string token">"region:'top'"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>span <SPAN class="keyword token">class</SPAN><SPAN class="operator token">=</SPAN><SPAN class="string token">"inset maptitle"</SPAN><SPAN class="operator token">></SPAN>Alaska Fish and Game UCU Lookup<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>span<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>span <SPAN class="keyword token">class</SPAN><SPAN class="operator token">=</SPAN><SPAN class="string token">"subtitle"</SPAN><SPAN class="operator token">></SPAN>View the placenames associated <SPAN class="keyword token">with</SPAN> UCU's and view the UCU on a map<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>span<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>div id<SPAN class="operator token">=</SPAN><SPAN class="string token">"leftpane"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit.layout.ContentPane"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>props<SPAN class="operator token">=</SPAN><SPAN class="string token">"region:'left'"</SPAN> <SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>div style<SPAN class="operator token">=</SPAN><SPAN class="string token">"height:24px;padding-bottom 4px;text-align:left;"</SPAN><SPAN class="operator token">></SPAN>
First select a GMU <SPAN class="punctuation token">(</SPAN>required<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>CFOUTPUT<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>select id<SPAN class="operator token">=</SPAN><SPAN class="string token">"mySelect"</SPAN> data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit.form.ComboBox"</SPAN> style<SPAN class="operator token">=</SPAN><SPAN class="string token">"width:200px;font-size:16p;"</SPAN>
value<SPAN class="operator token">=</SPAN><SPAN class="string token">"Select a GMU"</SPAN> <SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>CFLOOP query<SPAN class="operator token">=</SPAN><SPAN class="string token">"GMUS"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>OPTION VALUE<SPAN class="operator token">=</SPAN><SPAN class="string token">"#gmus.GMU#"</SPAN><SPAN class="operator token">></SPAN>#gmus<SPAN class="punctuation token">.</SPAN>GMU#<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>option<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>CFLOOP<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>cfoutput<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>select<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
Then type a place name string or leave blank
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>input type<SPAN class="operator token">=</SPAN><SPAN class="string token">"text"</SPAN> id<SPAN class="operator token">=</SPAN><SPAN class="string token">"placetxt"</SPAN> value<SPAN class="operator token">=</SPAN><SPAN class="string token">""</SPAN> <SPAN class="operator token">></SPAN><SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>input<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
Next hit the <SPAN class="string token">"Find places"</SPAN> button
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">!</SPAN><SPAN class="operator token">--</SPAN><SPAN class="operator token">-</SPAN> <SPAN class="operator token"><</SPAN>input id<SPAN class="operator token">=</SPAN><SPAN class="string token">"btnexecute"</SPAN> type<SPAN class="operator token">=</SPAN><SPAN class="string token">"button"</SPAN> value<SPAN class="operator token">=</SPAN><SPAN class="string token">"Find places"</SPAN> onclick<SPAN class="operator token">=</SPAN><SPAN class="string token">"executeTask()"</SPAN><SPAN class="operator token">></SPAN><SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>input<SPAN class="operator token">></SPAN> <SPAN class="operator token">--</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>button id<SPAN class="operator token">=</SPAN><SPAN class="string token">"btnexecute"</SPAN> data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit/form/Button"</SPAN> type<SPAN class="operator token">=</SPAN><SPAN class="string token">"button"</SPAN><SPAN class="operator token">></SPAN>Find places<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>button<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
Double click on a results row to view UCU on the map
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
Note<SPAN class="punctuation token">:</SPAN> not all UCU<SPAN class="string token">'s'</SPAN> are mappable<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">for</SPAN> example <SPAN class="number token">0000</SPAN> minors
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>br<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>table dojoType<SPAN class="operator token">=</SPAN><SPAN class="string token">"dojox.grid.DataGrid"</SPAN> jsid<SPAN class="operator token">=</SPAN><SPAN class="string token">"grid"</SPAN> id<SPAN class="operator token">=</SPAN><SPAN class="string token">"grid"</SPAN> rowSelector<SPAN class="operator token">=</SPAN><SPAN class="string token">"20px"</SPAN> height<SPAN class="operator token">=</SPAN><SPAN class="string token">"100%"</SPAN> width<SPAN class="operator token">=</SPAN><SPAN class="string token">"200px"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>thead<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>tr<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>th field<SPAN class="operator token">=</SPAN><SPAN class="string token">"place"</SPAN> width<SPAN class="operator token">=</SPAN><SPAN class="string token">"140px"</SPAN><SPAN class="operator token">></SPAN>Place<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>th<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>th field<SPAN class="operator token">=</SPAN><SPAN class="string token">"ucu"</SPAN> width<SPAN class="operator token">=</SPAN><SPAN class="string token">"80px"</SPAN><SPAN class="operator token">></SPAN>UCU<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>th<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>tr<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>thead<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>table<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN>div id<SPAN class="operator token">=</SPAN><SPAN class="string token">"map"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>type<SPAN class="operator token">=</SPAN><SPAN class="string token">"dijit.layout.ContentPane"</SPAN>
data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>props<SPAN class="operator token">=</SPAN><SPAN class="string token">"region:'center'"</SPAN> style<SPAN class="operator token">=</SPAN><SPAN class="string token">"overflow:hidden;"</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>body<SPAN class="operator token">></SPAN>
<SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>html<SPAN class="operator token">></SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>BTW, not that this should matter, but this still does use some ColdFusion code.