|
POST
|
It would certainly be ideal if ESRI provided a method of retrieving this information. If Ken's TOC widget suggestion doesn't work for you, there's always the option of scraping the REST service description page using AJAX and YQL. I used the code in the link above as a base in order to extract file names from an HTML version of a FTP file directory listing. I suppose you could pass the URL to the REST Service directory of the layer you're interested in (what you previously described such as this) and the process the results to extract the info you need. Not pretty- but doable. Steve
... View more
04-09-2013
07:15 AM
|
0
|
0
|
1246
|
|
POST
|
They definitely still do that at the big International User Conference but I've never attended a Dev Summit so I don't know if that's available for the Dev Summit.
... View more
04-08-2013
09:38 PM
|
0
|
0
|
1644
|
|
POST
|
Excellent! Thanks Derek. Looking forward to reading a few of them.
... View more
04-08-2013
03:18 PM
|
0
|
0
|
1644
|
|
POST
|
A little hard to respond without knowing more about what you're doing with your OnClick event so I'll blindly offer a couple (untested) suggestions: Would it be too awkard to switch your onClick code over to a onDblClick event? That way you avoid the conflicting situation entirely. Perhaps you could add a conditional statement within your onClick event handler and check if map.OnPan has values. If it does, the map is panning so you know that you shouldn't perform your onClick code. Good luck! Steve
... View more
04-08-2013
03:10 PM
|
0
|
0
|
650
|
|
POST
|
I've gone through the entire list and all of the JS API presentations aren't available: http://proceedings.esri.com/library/userconf/devsummit13/index.html Thanks! Steve
... View more
04-08-2013
10:26 AM
|
0
|
6
|
2027
|
|
POST
|
I'm just getting my feet wet with the PrintTask functionality in v3.3 of the API. Ideally, I just wanted to take what I see on the screen, export it to a JPEG, and then insert that into a "report" that I build on the fly with JS & HTML. I'm using PrintTask and the "Export Web Map Task" from our 10.1 install of ArcGIS Server. The first attachment (screenshot01) is what I see on my screen. The second attachment (screenshot02) shows the exported JPEG as it appears in my generated report. As you can see, they only loosely resemble each other. I have two census feature layers that have dynamic labels which do not even show up in the exported JPEG (this might be a bug? I recall reading a thread recently somewhat related to this..). Next, the linework in the exported image are huge and bloated compared with what I see on screen. How do I produce an exported image that is as close to WYSIWYG as possible? Here's my relevant code for my printTask creation: pTemplate = new esri.tasks.PrintTemplate();
pTemplate.exportOptions = {
width: 600,
height: 400,
dpi: 300
};
pTemplate.format = "jpg";
pTemplate.layout = "MAP_ONLY";
pTemplate.preserveScale = false;
pTemplate.showAttribution = false;
var params = new esri.tasks.PrintParameters();
params.map = map;
params.template = pTemplate;
thePrintTask = new esri.tasks.PrintTask(url);
thePrintTask.execute(params, function(result) {
jpgMapDiv = theDocument.createElement("div");
jpgMapDiv.setAttribute("id","jpegMap");
setStyle(jpgMapDiv, {
width : '95%',
height: '400px',
marginRight : 'auto',
marginLeft : 'auto',
borderTop: '2px solid black',
padding: "10px"
});
jpgMapDiv.innerHTML = "<img src=\"" + result.url + "\" style=\"border:2px solid black;left:25%\"\>";
theDocument.body.appendChild(jpgMapDiv);
}); THANKS! Steve
... View more
04-05-2013
02:38 PM
|
0
|
6
|
2728
|
|
POST
|
I don't know how to fix your problem but I think the reason for the error is because ESRI changed the "default" info window to a popup instead of infoWindow. If you compare the methods of both in the API reference, you'll see that move() is present in infoWindow but not for popup. This change is referenced in the "What's new" document: http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/whats_new.html
... View more
03-29-2013
08:56 AM
|
0
|
0
|
1047
|
|
POST
|
This thread might be some help. It seems to suggest that the syntax for retrieving a pixel value might be: idResults[0]['Pixel Value'] Haven't tried it so I'm just throwing it out there. Steve
... View more
03-19-2013
01:21 PM
|
0
|
0
|
1081
|
|
POST
|
This should be pretty easy. Use a function to actually populate the content of your infoWindow. First, create your infoTemplate: var theTemplate = new esri.InfoTemplate();
theTemplate.setContent(setPopupContent); Next, set up your dojo.connect for clicks on the features in your layer: //Listener event for feature selection and the popup info widow
dojo.connect(theFeatureLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theFeatureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.setFeatures([evt.graphic]);
map.infoWindow.show(evt.mapPoint);
}); Lastly, create the function which will populate your template with the content you want: function setPopupContent(graphic) {
attr = graphic.attributes;
curState = attr.STATE;
content = 'Create your content here';
//If The state clicked is ABC, append the special notation
if (curState == "ABC") {
content = content + "<br/><br/>(estimates based on State average)";
}
return content;
} Steve
... View more
03-19-2013
09:58 AM
|
0
|
0
|
805
|
|
POST
|
The code you've posted has two "return tc.domNode;" lines in it so I'm guessing that the second chart doesn't render because the first return statement is ending your function prematurely. Try commenting out the first "return tc.domNode;" located just before your "var C3=..." statement and see if that helps. Steve
... View more
03-19-2013
09:46 AM
|
0
|
0
|
778
|
|
POST
|
You can't view the old API documentations online but you can still download the SDK of that version here. Download that and you'll have the documentation..
... View more
03-08-2013
09:43 AM
|
0
|
0
|
605
|
|
POST
|
Seems to work fairly well. The popup does hang every now and then but I don't know what you can do about it. If it was me, I'd probably live with it. 😄
... View more
03-07-2013
10:07 AM
|
0
|
0
|
1725
|
|
POST
|
The dojo.connect for the onMouseOut code in my previous post should accomplish that: dojo.connect(theUsgsLayer, "onMouseOut", function(evt) {
map.setMapCursor("default");
thisObject.closeUsgsDialog();
}); which, in turn, calls this function: this.closeUsgsDialog = function() {
var widget = dijit.byId("usgsTooltipDialog");
if (widget) {
widget.destroy();
}
} Here is my live example of this.
... View more
03-07-2013
08:56 AM
|
0
|
0
|
1725
|
|
POST
|
I think it might be failing because your show dialog event doesn't create a new instance of the dialog? Truth be told, my code was adapted from someone else's example. Maybe the full context for my dialog code helps: var thisObject = this; //============================================================================= // Functions to display and dismiss the tooltp on the SnoCo Stream Gage features //============================================================================= this.showUsgsTooltip = function(evt) { var usgsDialog = new dijit.TooltipDialog({ id: "usgsTooltipDialog", content: "<SPAN style=\"color:blue;font-weight:bold\">USGS Gage</SPAN><br/><SPAN style=\"color:#256EB8\"><SPAN style=\"font-style:italic\">" + evt.graphic.attributes.NAME + "</SPAN></SPAN>", style: "position: absolute; width: auto; font: normal normal bold 8pt Tahoma;z-index:100" }); usgsDialog.startup(); dojo.style(usgsDialog.domNode, "opacity", 0.85); dijit.placeOnScreen(usgsDialog.domNode, {x: evt.pageX, y: evt.pageY}, ["TL", "BL"], {x: 10, y: 10}); } this.closeUsgsDialog = function() { var widget = dijit.byId("usgsTooltipDialog"); if (widget) { widget.destroy(); } } dojo.connect(theUsgsLayer, "onMouseOver", function(evt) { thisObject.closeUsgsDialog(); thisObject.showUsgsTooltip(evt); map.setMapCursor("pointer"); }); dojo.connect(theUsgsLayer, "onMouseOut", function(evt) { map.setMapCursor("default"); thisObject.closeUsgsDialog(); });
... View more
03-06-2013
08:37 AM
|
0
|
0
|
1725
|
|
POST
|
I'm using a toolTipDialog as well but for point features in a featureLayer. My code for the closing the tooltip dialog is slightly different: this.closeUsgsDialog = function() {
var widget = dijit.byId("usgsTooltipDialog");
if (widget) {
widget.destroy();
}
} Maybe you can try: function closeDialog() {
map.graphics.clear();
var widget = dijit.byId("tooltipDialog");
if (widget) {
widget.destroy();
}
}
... View more
03-06-2013
08:08 AM
|
0
|
0
|
1725
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-21-2026 01:51 PM | |
| 1 | 03-12-2026 01:43 PM | |
| 1 | 03-12-2026 08:41 AM | |
| 2 | 03-10-2026 10:10 AM | |
| 1 | 02-18-2026 09:20 AM |