|
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
|
1246
|
|
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
|
3311
|
|
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
|
801
|
|
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
|
3685
|
|
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
|
4835
|
|
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
|
808
|
|
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
|
3685
|
|
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
|
3685
|
|
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
|
2118
|
|
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
|
2118
|
|
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
|
1644
|
|
POST
|
Hi Mat, Welcome to Esri Forums! Thank you for posting your question here. As you posted in the JavaScript API forums, I am going to give you a few JavaScript related resources to help you on your way. Here are some examples of working with popups and the JavaScript API that you can download and modify: JavaScript popup sample applications For getting started with JavaScript and getting more comfortable with the core concepts, here is the place to begin: JavaScript Tutorial - Build your first application The JavaScript API works with services that are already published and online, so shapefiles and templates that come with ArcGIS 10.2 aren't really part of this conversation. If you are still working on getting services published, here is a good resource to work your way through: Approaches for publishing services with ArcGIS Hope this helps! -Noah
... View more
05-01-2014
09:47 AM
|
0
|
0
|
640
|
|
POST
|
Hi Eric, Tough to say, but I don't see the map constructor in the code you posted. There is: "var map;" and "map: map" only. I would compare what you have to the basemap gallery sample and look for differences. Hope this helps! -Noah
... View more
04-30-2014
02:39 PM
|
0
|
0
|
3311
|
|
POST
|
Hi Pat, It looks like there are two main ways to license your app: via ArcGIS Online and the app itself in the ArcGIS for Developers account, or by calling your local Esri office. Have you tried using the Client ID from the Runtime SDK Licensing option under the specific application in your ArcGIS for Developers account? -Noah
... View more
04-29-2014
03:20 PM
|
0
|
0
|
1287
|
|
POST
|
It sounds like you may be facing a known issue with the Windows Mobile SDK 10.2: NIM097317: A "Missing ArcGIS Registry Key" error occurs due to a registry key mismatch. The current workaround is to create a new registry key, Mobile10.2.0, at the same place as the Mobile10.2. Here is an example of where that should be found: (old) HKEY_LOCAL_MACHINE\Software\ESRI\Mobile10.2\InstallDir (new) HKEY_LOCAL_MACHINE\Software\ESRI\Mobile10.2.0\InstallDir Note that you must change the registry key on the Windows Mobile device as well. Hope this helps! -Noah
... View more
04-25-2014
12:06 PM
|
1
|
0
|
730
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2026 11:59 AM | |
| 1 | 05-13-2026 10:29 AM | |
| 1 | 04-10-2026 09:11 AM | |
| 1 | 03-24-2026 11:39 AM | |
| 1 | 03-23-2026 09:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|