/
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/layerquery.js
(2974B)
var map = null; // keep track of highlight for devices without mouse var highlighted = null; var iw = null; var hStyle = { fillColor: '#883333', fillOpacity: 0.35, strokeColor: '#FF0000', strokeWeight: 3, zIndex: 100, strokeOpacity: 1 }; var style = { fillColor: '#333388', fillOpacity: 0.35, strokeColor: '#FFFFFF', strokeWeight: 1, strokeOpacity: 1, zIndex: 0 }; function init() { var myOptions = { zoom: 6, center: new google.maps.LatLng(43, -106), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var url = 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer'; var layer = new gmaps.ags.Layer(url + '/3'); var params = { returnGeometry: true, where: "STATE_NAME = 'Utah'", outFields: ["NAME", "POP2000", "POP2007", "POP00_SQMI", "POP07_SQMI"], overlayOptions: style }; layer.query(params, processResultSet); } function processResultSet(rs) { var fs = rs.features; for (var i = 0, c = fs.length; i < c; i++) { setupFeature(fs[i]); } } function setupFeature(feat) { var a = feat.attributes; var html = "<div id='iwdiv' style='font-size:12px'><b>" + a['NAME'] + "</b><hr/>" + "<b>2000 Population: </b>" + a['POP2000'] + "<br/>" + "<b>2000 Population per Sq. Mi.: </b>" + a['POP00_SQMI'] + "<br/>" + "<b>2007 Population: </b>" + a['POP2007'] + "<br/>" + "<b>2007 Population per Sq. Mi.: </b>" + a['POP07_SQMI'] + '</div>'; var g = feat.geometry[0];//V3 supports multiple rings, so should have only 1 element var latlng = getPolyCenter(g); g.setMap(map); google.maps.event.addListener(g, 'mouseover', function() { highlight(g, html, latlng); }); google.maps.event.addListener(g, 'mouseout', function() { g.setOptions(style); if (iw) { iw.close(); } }); google.maps.event.addListener(g, 'click', function() { highlight(g, html, latlng); }); } function getPolyCenter(poly) { var paths, path, latlng; var lat = 0; var lng = 0; var c = 0; paths = poly.getPaths(); for (var j = 0, jc = paths.getLength(); j < jc; j++) { path = paths.getAt(j); for (var k = 0, kc = path.getLength(); k < kc; k++) { latlng = path.getAt(k); lat += latlng.lat(); lng += latlng.lng(); c++; } } if (c > 0) { return new google.maps.LatLng(lat / c, lng / c); } return null; } function highlight(g, html, latlng) { if (highlighted) { highlighted.setOptions(style); } g.setOptions(hStyle); highlighted = g; if (!iw) { iw = new google.maps.InfoWindow({ content: html, position: latlng, maxWidth: 240 }); } else { iw.setContent(html); iw.setPosition(latlng); } iw.open(map); } window.onload = init;
Save
cmd:
run