/
home
/
desid573
/
phewl.desidrivers.com.au
/
v3-utility-library-master
/
arcgislink
/
examples
/
/home/desid573/phewl.desidrivers.com.au/v3-utility-library-master/arcgislink/examples
mkdir
upload
Name
Size
Mode
Actions
arcgisonline.html
1166
0644
edit
dl
rm
arcgisonline.js
1513
0644
edit
dl
rm
arcgisonline_all_compiled.html
1098
0644
edit
dl
rm
arcgisonline_compiled.js
20069
0644
edit
dl
rm
arcgisonline_lib_compiled.html
1175
0644
edit
dl
rm
buffer.html
1174
0644
edit
dl
rm
buffer.js
3175
0644
edit
dl
rm
buffer_all_compiled.html
1096
0644
edit
dl
rm
buffer_compiled.js
13481
0644
edit
dl
rm
buffer_lib_compiled.html
1183
0644
edit
dl
rm
combined.html
1201
0644
edit
dl
rm
combined.js
891
0644
edit
dl
rm
combined_all_compiled.html
1123
0644
edit
dl
rm
combined_compiled.js
21786
0644
edit
dl
rm
combined_lib_compiled.html
1210
0644
edit
dl
rm
coverarea.html
1196
0644
edit
dl
rm
coverarea.js
2384
0644
edit
dl
rm
coverarea_all_compiled.html
1118
0644
edit
dl
rm
coverarea_compiled.js
12427
0644
edit
dl
rm
coverarea_lib_compiled.html
1205
0644
edit
dl
rm
directionbuffer.html
3622
0644
edit
dl
rm
dynamap.html
1200
0644
edit
dl
rm
dynamap.js
717
0644
edit
dl
rm
dynamap_all_compiled.html
1122
0644
edit
dl
rm
dynamap_compiled.js
18558
0644
edit
dl
rm
dynamap_lib_compiled.html
1209
0644
edit
dl
rm
dynatype.html
1191
0644
edit
dl
rm
dynatype.js
699
0644
edit
dl
rm
dynatype_all_compiled.html
1113
0644
edit
dl
rm
dynatype_compiled.js
18510
0644
edit
dl
rm
dynatype_lib_compiled.html
1200
0644
edit
dl
rm
find.html
1770
0644
edit
dl
rm
find.js
3453
0644
edit
dl
rm
find_all_compiled.html
1692
0644
edit
dl
rm
find_compiled.js
14451
0644
edit
dl
rm
find_lib_compiled.html
1779
0644
edit
dl
rm
geocode.html
1176
0644
edit
dl
rm
geocode.js
2592
0644
edit
dl
rm
geocode_all_compiled.html
1098
0644
edit
dl
rm
geocode_compiled.js
13532
0644
edit
dl
rm
geocode_lib_compiled.html
1185
0644
edit
dl
rm
hosts.html
1198
0644
edit
dl
rm
hosts.js
782
0644
edit
dl
rm
hosts_all_compiled.html
1120
0644
edit
dl
rm
hosts_compiled.js
18486
0644
edit
dl
rm
hosts_lib_compiled.html
1207
0644
edit
dl
rm
hourglass.html
1416
0644
edit
dl
rm
hourglass.js
1257
0644
edit
dl
rm
hourglass_all_compiled.html
1338
0644
edit
dl
rm
hourglass_compiled.js
18383
0644
edit
dl
rm
hourglass_lib_compiled.html
1425
0644
edit
dl
rm
layerdef.html
1186
0644
edit
dl
rm
layerdef.js
1677
0644
edit
dl
rm
layerdef_all_compiled.html
1108
0644
edit
dl
rm
layerdef_compiled.js
18480
0644
edit
dl
rm
layerdef_lib_compiled.html
1195
0644
edit
dl
rm
layerquery.html
1183
0644
edit
dl
rm
layerquery.js
2974
0644
edit
dl
rm
layerquery_all_compiled.html
1105
0644
edit
dl
rm
layerquery_compiled.js
13069
0644
edit
dl
rm
layerquery_lib_compiled.html
1192
0644
edit
dl
rm
layervis.html
1503
0644
edit
dl
rm
layervis.js
1355
0644
edit
dl
rm
layervis_all_compiled.html
1425
0644
edit
dl
rm
layervis_compiled.js
18376
0644
edit
dl
rm
layervis_lib_compiled.html
1512
0644
edit
dl
rm
libapp.html
1928
0644
edit
dl
rm
libapp.js
2881
0644
edit
dl
rm
libapp_all_compiled.html
1321
0644
edit
dl
rm
libapp_compiled.js
14877
0644
edit
dl
rm
libapp_lib_compiled.html
1408
0644
edit
dl
rm
maptypeoverlay.html
1192
0644
edit
dl
rm
maptypeoverlay.js
559
0644
edit
dl
rm
maptypeoverlay_all_compiled.html
1114
0644
edit
dl
rm
maptypeoverlay_compiled.js
18397
0644
edit
dl
rm
maptypeoverlay_lib_compiled.html
1201
0644
edit
dl
rm
mercator.html
1191
0644
edit
dl
rm
mercator.js
677
0644
edit
dl
rm
mercator_all_compiled.html
1113
0644
edit
dl
rm
mercator_compiled.js
18431
0644
edit
dl
rm
mercator_lib_compiled.html
1200
0644
edit
dl
rm
nexus.html
1352
0644
edit
dl
rm
nexus2.html
1494
0644
edit
dl
rm
nexus_h.jpg
17819
0644
edit
dl
rm
nexus_v.jpg
18265
0644
edit
dl
rm
opacity.html
4806
0644
edit
dl
rm
project.html
1179
0644
edit
dl
rm
project.js
2575
0644
edit
dl
rm
project_all_compiled.html
1101
0644
edit
dl
rm
project_compiled.js
12814
0644
edit
dl
rm
project_lib_compiled.html
1188
0644
edit
dl
rm
reverse.html
1176
0644
edit
dl
rm
reverse.js
1707
0644
edit
dl
rm
reverse_all_compiled.html
1098
0644
edit
dl
rm
reverse_compiled.js
13070
0644
edit
dl
rm
reverse_lib_compiled.html
1185
0644
edit
dl
rm
routebarriers.html
2961
0644
edit
dl
rm
routebarriers.js
3575
0644
edit
dl
rm
routebarriers_all_compiled.html
2883
0644
edit
dl
rm
routebarriers_compiled.js
13246
0644
edit
dl
rm
routebarriers_lib_compiled.html
2970
0644
edit
dl
rm
routebarrier_compiled.js
19110
0644
edit
dl
rm
simpleags.html
4174
0644
edit
dl
rm
simpleags.js
6935
0644
edit
dl
rm
simpleags_all_compiled.html
4092
0644
edit
dl
rm
simpleags_compiled.js
26665
0644
edit
dl
rm
simpleags_lib_compiled.html
4183
0644
edit
dl
rm
stateplane.html
1340
0644
edit
dl
rm
stateplane.js
1652
0644
edit
dl
rm
stateplane_all_compiled.html
1262
0644
edit
dl
rm
stateplane_compiled.js
19318
0644
edit
dl
rm
stateplane_lib_compiled.html
1349
0644
edit
dl
rm
Edit:
/home/desid573/phewl.desidrivers.com.au/v3-utility-library-master/arcgislink/examples/simpleags.js
(6935B)
var map, ov, iw, svc, marker; function init() { var myOptions = { zoom: 4, center: new google.maps.LatLng(40, -100), mapTypeId: google.maps.MapTypeId.ROADMAP, draggableCursor: 'default' } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); loadMapService(); google.maps.event.addListener(map, 'click', function(e) { doIdentify(e.latLng); }); google.maps.event.addListener(map, 'zoom_changed', updateTOC); google.maps.event.addListener(gmaps.ags.Util, 'jsonpstart', function() { document.getElementById('working').style.visibility = 'visible'; }); google.maps.event.addListener(gmaps.ags.Util, 'jsonpend', function() { document.getElementById('working').style.visibility = 'hidden'; }); } function loadMapService() { var el = document.getElementById('svc'); var s = el.options[el.selectedIndex].text; var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + s; if (ov != null) { if (ov instanceof gmaps.ags.MapOverlay) { ov.setMap(null); } else if (ov instanceof gmaps.ags.MapType) { map.overlayMapTypes.removeAt(0); } ov = null; } svc = new gmaps.ags.MapService(url); google.maps.event.addListener(svc, 'load', function() { var bnds = svc.getInitialBounds(); if (bnds) { if (bnds.getSouthWest().lng() > bnds.getNorthEast().lng()) { map.setCenter(new google.maps.LatLng(40, -100)); map.setZoom(4); } else if (!bnds.contains(map.getCenter())){ map.fitBounds(bnds); } } var op = document.getElementById('op').value; if (svc.singleFusedMapCache) { ov = new gmaps.ags.MapType(svc, { opacity: op }); map.overlayMapTypes.insertAt(0, ov); } else { ov = new gmaps.ags.MapOverlay(svc, { opacity: op }); ov.setMap(map); } var svcInfo = 'This is a <b>dynamic</b> map svc. You can turn on/off individual layers using the check box.' if (svc.singleFusedMapCache) { svcInfo = 'This is a <b>cached</b> map svc. You can <b>NOT</b> turn on/off individual layers.' } document.getElementById('svcInfo').innerHTML = svcInfo; document.getElementById('svcDesc').innerHTML = svc.description + '<br/>Copyright:' + svc.copyrightText; var clickOpts = ' <select id="clickOpts" style="font-size:9pt;width:200px" onchange="onClickOptionChanged()">'; clickOpts += '<option value="top"><Top-most layer></option>'; clickOpts += '<option value="visible"><Visible layers></option>'; clickOpts += '<option value="all"><All layers></option>'; var layers = svc.layers; for (var i = 0; i < layers.length; i++) { var layer = layers[i]; // now fetch the scale info for each layer. google.maps.event.addListenerOnce(layer, 'load', updateTOC); layer.load(); if (!layer.subLayerIds) { clickOpts += '<option value="all:' + i + '">' + layer.name + '</option>'; } } document.getElementById('clickOptsDiv').innerHTML = clickOpts + '</select>'; }); } /** * Create layer list. */ function updateTOC() { if (ov && svc.hasLoaded()) { var toc = ''; var scale = 591657527.591555 / (Math.pow(2, map.getZoom()));//591657527.591555 is the scale at level 0 var layers = svc.layers; for (var i = 0; i < layers.length; i++) { var layer = layers[i]; var inScale = layer.isInScale(scale); toc += '<div style="color:' + (inScale ? 'black' : 'gray') + '">'; if (layer.subLayerIds) { toc += layer.name + '(group)<br/>'; } else { if (layer.parentLayer) { toc += ' '; } toc += '<input type="checkbox" id="layer' + layer.id + '"'; if (layer.visible) { toc += ' checked="checked"'; } if (!inScale || svc.singleFusedMapCache) { toc += ' disabled="disabled"'; } toc += ' onclick="setLayerVisibility()">' + layer.name + '<br/>'; } toc += '</div>'; } document.getElementById('toc').innerHTML = toc; } } /** * Check the visibility of layers and refresh map */ function setLayerVisibility() { var layers = svc.layers; for (var i = 0; i < layers.length; i++) { var el = document.getElementById('layer' + layers[i].id); if (el) { layers[i].visible = (el.checked === true); } } ov.refresh(); } function onClickOptionChanged() { if (marker != null) { doIdentify(marker.getPosition()); } } function doIdentify(location) { if (!location) return; if (iw) { iw.close(); } var layerOpt = document.getElementById('clickOpts').value; if (ov && svc.hasLoaded()) { var params = { geometry: location, layerOption: layerOpt || 'top', tolerance: 5, bounds: map.getBounds(), width: map.getDiv().offsetWidth, height: map.getDiv().offsetHeight, returnGeometry: false }; svc.identify(params, function(res, err) { if (err) { alert(err.message + '\n' + err.details.join('\n')); } else if (res.results) { processIdentifyResults(res, location); } }); } } function processIdentifyResults(res, ll) { var html = ''; if (res.results) { html += 'Total # of Results:' + res.results.length; for (var i = 0, c = res.results.length; i < c; i++) { var r = res.results[i]; if (i > 0) { html += '<hr/>'; } html += '<div>Result #' + (i + 1) + ': <i>' + r.value + '</i><br/><table>'; html += '<tr><td>From layer: <b>' + r.layerName + '</b></td></tr>'; html += '<tr><td > <table style="font-size:9pt">'; var a = r.feature.attributes; for (var x in a) { if (a.hasOwnProperty(x)) { html += '<tr>'; html += '<td style="background-color:#DDDDDD;">' + x + '</td>'; var val = a[x]; val = (val === null || typeof val === 'undefined') ? '' : '' + val; html += '<td>' + val + '</td></tr>'; } } html += '</table></td></tr></table></div>'; } //document.getElementById('info').innerHTML = html; if (!iw) { iw = new google.maps.InfoWindow(); } iw.setContent(html); iw.setPosition(ll); iw.open(map); if (marker == null) { marker = new google.maps.Marker({ position: ll, map: map }); } else { marker.setPosition(ll); } } } function setOVOpacity(op){ if (ov) { ov.setOpacity(op); } } window.onload = init; window['setLayerVisibility'] = setLayerVisibility; window['loadMapService']= loadMapService; window['setOVOpacity'] = setOVOpacity;
Save
cmd:
run