|
POST
|
Kyle, In Firebug, the call stack is located in the right window pane (it's a tab named "Stack") when you are viewing your javascript. The call stack will only be visible when your code stops (via error or breakpoint/pause). If the print error stops the javascript in its tracks, the stack should be viewable at that time. I've attached a screenshot example of it. In my example, I clicked on a feature in my map and the code running it querying the featureLayer for features so it can populate the information in an infoWindow. The top of this list is the "top" of the stack and shows you what code is currently running. The bottom of this list is where your code initially was kicked off. So, in this example, I clicked on a feature in my map (bottom entry) which, in turn, triggered an onClick event for my featureLayer (second to bottom entry). This, then triggered a query on the features in my featureLayer and those are the two entries at the top. If you don't see it, the best way to tackle the issue is to add a series of lines in your javascript which print text to the console like this: console.log('Passing Checkpoint 01..'); Add these with incremental numbers (01,02,03,etc) throughout your code and pay attention when you run your app. This can help you focus on where in your code that things go south. Through some trial and error, refine the placement of these console messages until you can figure out the line of code that triggers the error. Once you know that, place a breakpoint on the line of code which throws the error. You do this by clicking on the line number (a red circle will appear next to the line number). When you re-run your code, it will stop at the breakpoint and you can examine the call stack as well as the various objects that get created/population by your code. Make sure that objects that should be populated actually are, and with the correct type of object. This may not be possible but, if you have a link to a public facing project (or can post your relevant code), folks here on the forum can look at it and help troubleshoot it with you.
... View more
08-01-2013
11:38 AM
|
0
|
0
|
820
|
|
POST
|
When console errors appear that point to the API itself, the actual issue lies elsewhere. In your browser debugger, examine the Call Stack when the error occurs and follow the stack from the API location back up to the point of your code. From there, look at your line of code and verify that you're passing the correct parameters to an API method (string versus numeric, etc). This is the kind of thing that festers and doesn't appear until some part of the API is expecting a number but gets a string. This is what makes the API look like it has an error. Good luck! Steve
... View more
08-01-2013
07:32 AM
|
0
|
0
|
820
|
|
POST
|
Cool. Glad you got something worked out. Just to be clear, you don't have to specify an ESRI basemap for your map. This example shows how to create a map without a basemap and this thread from the forum talks about using your own tiled map service as a basemap for your map.
... View more
07-31-2013
06:55 AM
|
0
|
0
|
1439
|
|
POST
|
An ArcGIS Online webmap is kind of like a "short cut" in that it is a map that has been created complete with data layers, and basemap. It's just stored in ArcGIS Online. If you define your map as ESRI has done in that particular example, it saves you some coding. That being said, you're not required to set up your map like that. If you look at many of the other samples, the map is created and defined in a more traditional way: var map = new esri.Map("map",{
basemap:"topo",
center:[-122.45,37.75], //long, lat
zoom:13,
sliderStyle:"small"
});
In this case, all you really need is an external internet connection so that you can display the ESRI basemap. All of your data can safely reside within your network. This example shows you the more traditional way of creating a map and then adding your data layers to the map after the map has been created.
... View more
07-30-2013
12:58 PM
|
0
|
0
|
1439
|
|
POST
|
I don't think MediaInfos charts provide the options that you're seeking. I think you'll need to do something along the lines of this sample which exposes the full set of dojo charting options. Steve
... View more
07-30-2013
07:40 AM
|
0
|
0
|
517
|
|
POST
|
You're defining your graphic polylines as having the map's spatial reference. Are you positive that the map's spatial reference is defined as geographic? If you're using ESRI's basemaps, the map's spatial reference is web mercator which means you will need to convert your coordinates from lat/long to web mercator. Steve
... View more
07-29-2013
08:39 AM
|
0
|
0
|
1089
|
|
POST
|
Try adding the period before "action": <style type="text/css"> .action.zoomTo{ display: none; } </style>
... View more
07-26-2013
08:40 AM
|
0
|
0
|
1585
|
|
POST
|
You can try the code that Stephen Lead provides in this thread. I could not get it to work with my desktop application, however. I did discuss this with one of the devs at the ESRI UC and the good news is that they recognize that this needs improvement, and they are working on it. The bad news is that I don't know the timeframe is for a fix. The APIs seem to be updated every 5-6 weeks so maybe in a few months? At least that's my hope. 😉
... View more
07-24-2013
09:13 AM
|
0
|
0
|
1504
|
|
POST
|
You don't really describe the origin of the point version but.... The easiest option might be to convert the polygons to points using ArcToolbox. This way all the attributes are carried over to the point features. In your web map, you simply set up an infoWindow for the points and then another for the polygon layers. Using the scale based visibility for the two layers, everything should work fairly easily. If the points are the centroid locations of the polygons, I guess once a user clicks on a point, you can use that shape and query the polygon features to retrieve the actual attribute content (buffer the point's extent slightly, though). A third option (but a maintenance PITA) would be to attach the feature IDs of the polygons to its point representation. Once again, when a user clicks on the point representation, you retrieve the feature ID of the polygon version and then perform the query based on the feature ID. I think the 1st option would be the easiest to implement. Steve
... View more
07-24-2013
07:27 AM
|
0
|
0
|
1929
|
|
POST
|
My advice would be this: Put the offending text inside a div with a unique ID In your CSS add the "display:none" CSS property for that item At the end of your init routine, add some javascript code to reverse the CSS visibility: theDiv = document.getElementById("<your Div ID here>"); theDiv.setAttribute("display","inline"); If you need to support an older version of IE, which code you use to set the CSS property might change. Note: Dojo also has a way to set the CSS properties of a DOM element. Steve
... View more
07-23-2013
11:01 AM
|
0
|
0
|
805
|
|
POST
|
I haven't personally done this but I'm thinking that you need to create a custom Level of Detail (LOD) option that you would specify when you create your new map. Look at the new map options section for LODs. This sample isn't quite what you need to do but it does illustrate some of what you will need to do. I think you can just mimic the default LOD levels for your satellite basemap but add the additional LODs for zooming in beyond it's maximum detail.
... View more
07-22-2013
07:15 AM
|
0
|
0
|
3149
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 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 |