|
POST
|
No worries Charles. There is always a learning curve associated with any new language or product. Here is another helpful blog post with tips on debugging JavaScript applications. Good luck and happy coding! -Noah
... View more
05-15-2014
07:01 AM
|
0
|
0
|
1935
|
|
POST
|
Hi Charles, I think the issue is related to the AMD style, and how you call the ArcGISDynamicMapServiceLayer. First, please review this blog post concerning the AMD style of programming. You have a mixture of AMD and legacy style in your code. I didn't look through your code too closely, but I did combine our ArcGIS.com webmap sample with the DynamicMapService sample, and made a JSFiddle application consuming your services: Layers on top of AGOL WebMap. Hope this helps! -Noah
... View more
05-14-2014
01:46 PM
|
0
|
0
|
1935
|
|
POST
|
As far as I know, there isn't a separate download needed for this sort of workflow. I haven't locally hosted version 3.9 yet, so I'll give that a shot and see if I can reproduce the error. Are you using our proxy? If so, which proxy are you using, DotNet, Java, or PHP? Can you recreate the error in a simplified sample application?
... View more
05-14-2014
08:39 AM
|
0
|
0
|
3085
|
|
POST
|
Hi ClevelandFan, Welcome to Esri Forums! Thank you for posting your question here. From the error message in the picture you uploaded, it looks like the error is related to the proxy. Have you download and configured the proxy to work with your application? I would start here. Also, there are good instructions in the ReadMe file on GitHub. Using the proxy https://developers.arcgis.com/javascript/jshelp/ags_proxy.html Hope this helps! -Noah
... View more
05-14-2014
08:17 AM
|
0
|
0
|
3085
|
|
POST
|
Not sure, but one things leaped out at me, and that is the order of the positional arguments in the callback function. In AMD style, the order is vital to mapping the arguments to the modules. require(["dojo/dom",
"dojo/_base/array",
"dojo/parser",
"dijit/registry",
"esri/domUtils",
"esri/map",
"esri/graphic",
"esri/layers/GraphicsLayer",
"esri/layers/FeatureLayer",
"esri/tasks/Geoprocessor",
"esri/tasks/FeatureSet",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane"],
function(dom, array, locale, parser, registry,
domUtils, Map, Graphic, GraphicsLayer, FeatureLayer, Geoprocessor, FeatureSet){ So "dojo/dom" is mapped to dom, "dojo/_base/array" is mapped to array, and "dojo/parser" is mapped to locale. You can see how the rest of the variables will be incorrect. Here is an excellent blog that discusses the AMD style. On further thought, I'm actually surprised that the map displayed at all in this application, so I may be wrong. -Noah
... View more
05-07-2014
03:49 PM
|
0
|
0
|
1085
|
|
POST
|
Are you hosting the application using something like IIS? Setting up a Development Environment https://developers.arcgis.com/javascript/jshelp/intro_devenv.html
... View more
05-07-2014
12:25 PM
|
0
|
0
|
2986
|
|
POST
|
Hi Chip, Checking the query request from REST shows that 118 features are being returned from the setDefinition expression, so I don' think this is an issue with the code. If you comment out setDefinition expression, you still only see a few features being drawn. I made a fiddle to show this. My hunch is that there is something going on with the features themselves related to how they were published. Do the features have a value assigned to them in the unique value renderer from ArcMap? If so, perhaps an "all other values" category would help. -Noah
... View more
05-07-2014
12:23 PM
|
0
|
0
|
697
|
|
POST
|
Yes, the new proxy should work fine with the 3.5 version of the JS API. There are some different configurations with the new proxy, so please read the documentation thoroughly. I'm not sure what the issue is at this point. I recommend creating a jsfiddle, to share your code with us here, or contacting Esri Support and logging an Incident. -Noah
... View more
05-06-2014
10:08 AM
|
0
|
0
|
3183
|
|
BLOG
|
This blog post is the first in a series of debugging tips and tricks to help you on your way. It’s a jungle out there. And like it or not, it’s a jungle inside your application as well. Working through the bugs isn’t as simple as slowly sifting through lines of code; it takes dedicated tools and candid curiosity. In the jungle, the momma gorilla has little more to rely upon than her courage and her cunning. But as a web developer, you have a variety of tools at your disposal. Today, we are going to take a look at the Network tab inside Google Chrome’s Developer Tools. Accessing the Chrome Developer Tools is easily done using shortcut keys (Control + Shift + I) or by navigating to the top right of the browser, clicking on the three grey horizontal lines, then choosing “Tools”, then “Developer tools”. Unlike the momma gorilla, Chrome Developer Tools cares about you and your applications. It likes you. It thinks you’re a really good developer. But you need to do some work. It’s kind of like Esri Support. We like you. We want to help you, and we’ll be there when you take the first step. While the developer tools are open, you can clear the browser cache by simply clicking and holding the refresh button. This action presents you with three different options: Normal Reload, Hard Reload, and Empty Cache and Hard Reload. These options help you ensure that changes to your code are reflected in the browser. Otherwise, the application may load the older code from the browser’s cache. When I’m feeling blue, a couple of Hard Reloads always does the trick. If it’s near the end of the day, you may want to empty the cache first. Now that you’ve cleared the cache and reloaded your application, we can continue. Like the developer tools in other major browsers, such as Firebug, and standalone tools like Fiddler, the Network tab in Chrome logs individual requests spawned from the tab currently open in the browser. Typically, a variety of resources are loaded when a page is refreshed and additional requests are executed while the user is interacting with the page. The Network tab is my personal favorite. I always open this tab before running any test application. Here we can focus on inspecting web traffic to discover how the application interacts with online services. If there is a print service in the application, you can grab the webmap as JSON in the network tab, and compare it’s parameters against the REST API to see if the JSON is valid. You could also see all the resources the application is consuming, and where those resources are located. If something has gone visibly wrong in the application, the first things to look for are requests that have failed entirely. The most common errors are a 403, indicating that you don’t have permission to access the resource, and 404, which means the resource can’t be found. In my own experience, 404 errors are most often caused by a typo I introduced when I wrote out the location of a service, because I write code like a momma gorilla. This screenshot shows the Network tab open with a 404 error (Not Found) in the network traffic regarding a missing .css file on the server named localhost (I put the .css in the wrong folder) In this installment, we learned how to access and use the Network tab inside Chrome Developer tools to reveal the individual requests launched by an application, and their success or failure. This information can greatly facilitate the debugging of an application when minimal other error information is available by indicating to the developer what is occuring behind the scenes, and on what areas in the code to place focus. This concludes part one of a multi-part series on JavaScript Debugging Tips. Join us next time when we delve even deeper into the Network tab with a real-world example. Happy debugging!
... View more
05-06-2014
09:22 AM
|
2
|
2
|
4408
|
|
POST
|
Hi Caroline, Have you seen the SVG and CSS Transitions JavaScript sample? This may be useful to you. Another option would be to set a renderer with the featureLayer (if you have an animated .gif), here is a code snippet. pictureSymbol = new esri.symbol.PictureMarkerSymbol("http://www.soccerposttn.com/~media/elements/AnimatedClipart/toys_and_hobbies/animations/soccer_ball__bouncingA.gif", 45, 65);
var renderer = new esri.renderer.SimpleRenderer(pictureSymbol);
featureLayer.setRenderer(renderer);
map.addLayer(featureLayer); Hope this helps! -Noah
... View more
05-06-2014
08:33 AM
|
0
|
0
|
689
|
|
POST
|
Hi Ian, I tested with your font code, and it prints just fine for me. I only used the one line of code though. var font = new esri.symbol.Font("12pt",esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL,esri.symbol.Font.WEIGHT_BOLD,"Helvetica"); There may be two other issues going on: 1) are you using a proxy in your application? I highly recommend our new resource proxy the length of the print request may be getting truncated, and the proxy will help with this 2) for the colors, try using RGB values (e.g. 255, 0, 0) instead of hexadecimal (e.g. #FF0000), and see if that helps -Noah
... View more
05-06-2014
08:21 AM
|
0
|
0
|
3183
|
|
POST
|
Hi Ian, The issue is that the text will not print in my print layout that I have configured. If the user adds in text to the map, they can change the color, size and angle. However, when pringing out the map using the print widget, none these settings carry over to the print layout. By default, the text shows up in black. I think the issue you are facing here is a known software limitation. It is necessary to supply all of the font properties when creating a new Font object. [#NIM099497 The printing service only honors the font properties of textSymbols if all or none of the new Font object parameters are defined.] Try something like this in your code, and see if the customization appears in the printout (please note that this is in AMD style): var font = new Font("40pt", Font.STYLE_ITALIC, Font.VARIANT_NORMAL, Font.WEIGHT_BOLD, "Courier New"); Hope this helps! -Noah
... View more
05-06-2014
07:19 AM
|
2
|
0
|
3183
|
|
POST
|
Hi Casey, It sounds like a proxy would the most appropriate and secure workflow for your situation. I tested the legend dijit sample by adding a secure feature layer using the proxy page, and it worked fine. Using the proxy: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html A few questions to consider: How are you getting and appending the token in the code? What event fires the legendDijit.startup() function? -Noah
... View more
05-05-2014
07:34 AM
|
0
|
0
|
1918
|
|
POST
|
Hi Casey, I think the issue is that as soon as any layers in the map get loaded, the create legend widget method gets called. Thus, once you sign-in to display the secure layers, the legend is already complete. I think you have two options moving forward: 1) Use the proxy page with your credentials so that all the layers (secure & non-secure) get loaded at once 2) Refresh the legend after the secure services get added using legend.refresh() Hope this helps! Have a great weekend. -Noah
... View more
05-02-2014
03:39 PM
|
0
|
0
|
1918
|
|
POST
|
Hi Dustin, "map" and "mapDiv" are conventions we use to work with the map object. You are free to use either, as long as you are consistent. "mapDiv" may be a bit better to use because it differentiates itself from the actual map object, which you see in the map constructor. In the screenshot you attached, "mapDiv" refers to the div element which hold the map object. This can be resized or otherwise modified. The "map" in the screenshot is an actual Map object, with an ID of "mapDiv". For more information: JavaScript Class: Map Hope this helps! -Noah
... View more
05-01-2014
02:36 PM
|
0
|
0
|
1477
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | 03-24-2026 11:39 AM | |
| 1 | 03-23-2026 09:30 AM | |
| 1 | 02-26-2026 07:52 AM | |
| 11 | 02-24-2026 07:15 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|