POST
|
Diameter is an attribute for your graphics, correct? If so, when you have access to your graphic, do this: var dia = graphic.attributes.Diameter;
... View more
05-20-2010
01:13 PM
|
0
|
0
|
371
|
POST
|
Use esri.graphicsExtent() http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm#esri.graphicsExtent
... View more
05-19-2010
03:00 PM
|
0
|
0
|
227
|
POST
|
This bundle of samples contains printing examples: http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&scriptID=16092 I also just noticed this in the code gallery: http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&scriptID=16953
... View more
05-19-2010
09:30 AM
|
0
|
0
|
258
|
POST
|
Can you post the code for your callback function that is called by your identify task?
... View more
05-19-2010
08:30 AM
|
0
|
0
|
355
|
POST
|
First thing: are you trying to use the ArcGIS API for JavaScript or the ArcGIS JavaScript Extension for the Google Maps API? Your html references the former, but your code looks like it's written for the latter. Also, you should pick one of the following, not both to run LoadMap: dojo.addOnLoad(LoadMap)
<body class="tundra" onload="LoadMap();" onunload="GUnload();"> Finally, and this is probably the cause of the error you're posting, change this: content:"<div style='width:275px; height:175px;'><b>Total 2007 Census Block Population is " + att.S2001 + ".</b><br />The age breakdown is as follows. <br />"
+ "<img height=100 width=250 src='http://chart.apis.google.com/chart?cht=bvs&chs=250x100&chd=t:"
+ S2001 "," + S2002 + "," + S2003 + "," + S2004 + "&/></div>"}; To this: content:"<div style='width:275px; height:175px;'><b>Total 2007 Census Block Population is " + att.S2001 + ".</b><br />The age breakdown is as follows. <br />" +
"<img height=100 width=250 src='http://chart.apis.google.com/chart?cht=bvs&chs=250x100&chd=t:" +
S2001 "," + S2002 + "," + S2003 + "," + S2004 + "&/></div>"};
Notice the + at the end of the line rather than at the beginning of a new line.
... View more
05-19-2010
08:28 AM
|
0
|
0
|
427
|
POST
|
Check out the "Net" tab in firebug. http://getfirebug.com/network
... View more
05-13-2010
01:31 PM
|
0
|
0
|
202
|
POST
|
Glad to help. That's one of the perils of JavaScript; no type checking. It's a bit more work from time to time but I still prefer it to strongly typed languages. Anyway, I don't think the API should be doing type checking...it's gotta leave a little work for us :).
... View more
05-12-2010
10:37 PM
|
0
|
0
|
633
|
POST
|
It works: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Topographic Map</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
</style>
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
var map;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-13635568,"ymin":4541606,"xmax":-13625430,"ymax":4547310,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
//Add the topographic layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
//resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
//the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm
var resizeTimer;
dojo.connect(map, 'onLoad', function(theMap) {
dojo.connect(dijit.byId('map'), 'resize', function() { //resize the map if the div is resized
clearTimeout(resizeTimer);
resizeTimer = setTimeout( function() {
map.resize();
map.reposition();
}, 500);
});
dojo.connect(map, 'onClick', function(evt) {
map.centerAndZoom(evt.mapPoint, map.getLevel()+1);
});
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false"
style="width: 100%; height: 100%; margin: 0;">
<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;">
</div>
</div>
</body>
</html>
... View more
05-12-2010
10:33 PM
|
0
|
0
|
658
|
POST
|
OK, thanks for the additional info. If that's what you're looking for, then you specify service.copyright, not copyrightText. This works for me: dojo.connect(map, "onLoad", function() {dojo.byId('copyright').innerHTML = service.copyright; } );
... View more
05-12-2010
02:09 PM
|
0
|
0
|
339
|
POST
|
Can you post a more complete code snippet? I can confirm that setExtent() works in 1.5. Not sure why support would tell you to go to 2.0 for this (there are plenty of other good reasons, I just don't think this is one of them :)). It's a basic function that, AFAIK, has not been broken in any version of the API.
... View more
05-12-2010
08:25 AM
|
0
|
0
|
633
|
POST
|
You mean copyrightText? This is with 2.0 but it should work with 1.6 too: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Topographic Map</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
</style>
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
function init() {
esri.request({
'url': 'http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer',
'content': { 'f': 'json' },
'callbackParamName': 'callback',
'load': function(data) {
dojo.byId('copyright').innerHTML = data.copyrightText;
},
'error': function(error) { console.log(error); }
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div id="copyright">
getting copyright info...
</div>
</body>
</html>
... View more
05-12-2010
08:19 AM
|
0
|
0
|
339
|
POST
|
How about unioning your buffer geometries using a geometry service each time a new buffer is added? I hacked up the buffer a point sample to generate the attached screen shot.
... View more
05-10-2010
10:57 AM
|
0
|
0
|
304
|
POST
|
If you've got a dynamic map service that points to a data source that is constantly updated, you could do something as simple as a using setInterval() to refresh your map service every couple of seconds. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/dynamicmapservicelayer.htm#refresh
... View more
05-07-2010
08:48 AM
|
0
|
0
|
317
|
POST
|
I wrote the lens dijit. It works in both IE and FF. Can you share your code?
... View more
05-07-2010
08:31 AM
|
0
|
0
|
370
|
Title | Kudos | Posted |
---|---|---|
28 | 09-22-2010 11:15 AM | |
2 | 08-10-2010 06:49 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|