|
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
|
573
|
|
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
|
384
|
|
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
|
1081
|
|
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
|
1081
|
|
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
|
1081
|
|
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
|
1081
|
|
POST
|
You can try to implement what Stephen posted here but I haven't been able to get this work in my own application. This has been hugely frustrating for me and I wish that the API had an option to handle this. I submitted an idea about this but that doesn't really help you or I at this moment. Here's a similar thread with some duplicate information and a link to my submitted idea should you feel like voting for it. Good luck! Steve
... View more
03-05-2013
08:20 AM
|
0
|
0
|
960
|
|
POST
|
I think I've painted myself into a corner and I'm not sure how to get what I want. I'm developing a web application which will utilize NWS weather radar images as an overlay option. The images are always being refreshed but are only accessible as GIF files. Within my app, I'm pulling in these images directly from the NWS and adding them into my map as a mapImageLayer and they work great. The problem is that this layer type does not support an identify/query on the pixel values. I thought a possible workaround was to publish the "Get Cell Value" tool from ArcToolBox (Data Management->Raster->Raster Properties) as a geoprocessing service and then pass the URL of my radar image to query the values. My GP service actually works but always returns NoData because the GIF files as provided by the NWS do not have embedded georeferenced information. That information *IS* known and can be put into a world file but the GP service doesn't see it when the input raster is from a remote location (hence the NoData values). I tested this theory by passing a local network copy of the file complete with world file to my GP service and it returned a valid value. So- the trick is how can I supply that spatial reference for an image I'm not hosting so that the GP task recognizes it and returns a proper value? I don't know if this is possible but the only thing I could come up with was to "pause" processing after the scratch workspace was established and then add the world file for the image into the workspace and continue the GP process. This would be SOOOO much easier if the JS API just supported identify/queryTasks on mapImageLayers. Oh well. Anyone have ideas? Steve
... View more
03-05-2013
07:56 AM
|
0
|
0
|
2076
|
|
POST
|
Bump. Anyone? Bueller? If it's not supported within the API, can this be done with a GP service? I noticed that in ArcToolbox there's a "Get Cell Value" tool under Data Management->Raster->Raster Properties. I wonder if that tool can be published as a GP service and then used with my mapImageLayer..
... View more
03-04-2013
07:11 AM
|
0
|
0
|
343
|
|
POST
|
This link is where you'll find the latest (previous) versions of the API.
... View more
03-02-2013
09:48 AM
|
0
|
0
|
435
|
|
POST
|
EXAMPLE: animating images using mapImageLayer Hey everyone, I'm excited about something I just cooked up and wanted to pass it along for others to use. I've been spending a lot of quality time trying to incorporate weather radar overlays into my current project. I've been able to add them to my map as a mapImageLayer successfully and one of the comments I received back from a co-worker was can you loop the radar image? As designed, mapImageLayers don't have any animation functionality but I thought you might be able to fudge it using javascript's window.setInterval method and then shuffling out the mapImage in the layer at a given interval. Sure enough- you can! I have set up a fiddle for it here: http://jsfiddle.net/scole/maDXn/ The ideal use for this is animating radar images and this is exactly what I'm using it for. If you're interested in using it for this purpose, read on... To set things up, first you need to figure out what your local radar site is named and what radar product you want to use. My suggestion is to go to this NWS site and click on the symbol closest to your location. Once you click on that symbol, the current radar image will be displayed. On that dialog, look in the upper left corner where it says "Adjacent Radars." The three letter code in the center is the name of the radar that you are using. Jot that down because you'll need that later. The next thing you need to do is determine the parameters for the mapImage representation of the radar image. The easiest way to do this is to visit this NWS page and download one of their KMZ files for the radar and product you want to incorporate. Find your radar under the "All images for single radar" combo box and grab the KMZ file. Open the KMZ in Google Earth and then drill down into the folder of the product you want to use (Short-Range Reflectivity, 1-Hour Precipitation, etc). Right click and access the properties of the image overlay. Go to the Location tab and jot down what the lat/long bounding box is for that particular product (this will vary from product to product but it is consistent between images). These are the lat/longs you'll specify in my example code while defining the mapImage. Lastly, go to the NWS image file site and then follow the link listed there for the accessing the individual radar site images. They are arranged into subfolders according to the product (reflectivity, 1-hour precipitation, etc). Now- within the product folder, there will be many subfolders along with GIF images (which are actually the "current" radar image). Each subfolder name is the name of the radar site, which you jotted down earlier. The folder contains an archive of previous radar images and this is where we will get our individual images for the animation. Inside the folder you will see a series of GIFs that have the naming format of <Radar Site abbreviation>_<Date>_<Time>_<Product>.gif and the most recent images are found at the bottom of the directory. To taylor this example for location, simply update the URL found in the getNwsFileList function at the line that starts with "loadContents" with the URL of the folder I was just describing. The code will digest the list of files on that site and push them into an array of file names. You'll also have to update the parameters for the mapImage as previously discussed. My little solution is still a little rough around the edges- it's a little too jerky the first run since it's loading the images into the browser's cache. Once it does, though, the animation runs pretty nice. I tried commenting my code throughout so hopefully that all makes sense. You may have noticed on ESRI's blog this week a post about a web map that also incorporates a radar animation. It draws upon a NWS REST service with 1km cell resolution and looks pretty bad zoomed in. For whatever reason, the images I am using in my example have a finer resolution and hold up better while zoomed in. Maybe because they are regional images instead of country wide, I dunno. Anyways, I hope this proves useful for others. Naturally, it would be great if this was built into the API but this could be an acceptable workaround. I have submitted an idea for adding this functionality to the API if you're so inclined to vote for it. I have attached the code for posterity. Enjoy! Steve
... View more
02-28-2013
07:18 AM
|
0
|
0
|
1602
|
|
POST
|
This has me stumped. I want to access the pixel values of a mapImageLayer and provide the user with an infoWindow where they clicked to return some related information. QueryTask and IdentifyTask only take URLs from REST services so how (can) one do an infoWindow with mapImageLayers? Thanks- Steve
... View more
02-22-2013
07:53 AM
|
0
|
1
|
629
|
|
POST
|
In my current app I'm developing, I am adding weather radar images from the NWS as mapImageLayers and they display just fine. The source images have a static URL and refresh themselves every two minutes. My desire is to have my application utilize the most current version. I already have a five minute timer associated with my page because there is another data layer which requires updating every five minutes. I'm trying to add some additional code in my updating subroutine to update my mapImageLayers but visibly, nothing is changing. Here's a snippit of my attempted updating code: // Define the NWS Storm Total Precip Layer
stormPrecipMi = new esri.layers.MapImage({
'extent': { 'xmin': -125.725647, 'ymin': 45.22319, 'xmax': -119.251570, 'ymax': 51.156890, 'spatialReference': { 'wkid': 4326 }},
'href': "http://radar.weather.gov/ridge/RadarImg/NTP/ATX_NTP_0.gif"
});
stormPrecipMi.height = 550;
stormPrecipMi.width = 600;
stormPrecipMi.scale = 1;
if (nwsStormPrecipLayer != undefined) {
nwsStormPrecipLayer.removeAllImages;
nwsStormPrecipLayer.addImage(stormPrecipMi);
}
map.setExtent(map.extent); In my code my layer variables are declared globally and no errors are generated in the console window. FWIW, here's my live app: http://gismaps.snoco.org/fws/ Right now, the only way to get updated images is to physically reload the page. Is there another way? Thanks- Steve
... View more
02-21-2013
01:27 PM
|
0
|
0
|
903
|
|
POST
|
Thanks guys for the responses. I would have hoped for some more but such is life. Unavailable services seem to be my biggest fear so Matt's link to the Service Notification script was worth it. I wasn't aware of that before and will definitely get that set up within our organization.
... View more
02-19-2013
09:28 AM
|
0
|
0
|
534
|
|
POST
|
This is more of an open ended discussion and general question- As I debug my application more and get it ready for deployment, I've thought more about the post-development phase of an application and one large question has been looming- how do you stay informed about when your app fails? One situation that comes to mind is when the map services you are utilizing in your map are not available. For example, yesterday and into this morning, I noticed that the layers in my app weren't loading correctly and that the JSON requests were timing out. As it turns out, our Server ran out of disk space. Since I'm actively developing and debugging I can take action fairly quickly; once we publish, however, how do I get timely indications of problems without having to constantly monitor its performance manually (or worse yet get informed by a user)? Thanks! Steve
... View more
02-14-2013
06:10 AM
|
0
|
3
|
924
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-04-2025 02:30 PM | |
| 3 | 11-13-2025 07:55 AM | |
| 1 | 09-11-2025 10:18 AM | |
| 1 | 09-11-2025 08:03 AM | |
| 1 | 08-13-2025 09:16 AM |