|
POST
|
So is hullString still a string when you pass it in that last line? If it's a string and you don't want to worry about JSON.parse being available, you can still use the dojo/json module to parse it for you. http://dojotoolkit.org/reference-guide/1.7/dojo/json.html You need to parse it one way or another to work.
... View more
10-11-2012
10:49 AM
|
0
|
0
|
2012
|
|
POST
|
You really want to sort on the featureSet.features array. You can pass a function to the sort method to determine your sort. I use this, but there's probably a better way to do this, since I need a text sort, not numbers or dates. var _sort = function(field) { return function(a, b) { var x, y; x = a.attributes[field].toLowerCase(); y = b.attributes[field].toLowerCase(); return (x < y) ? -1 : 1; }; }; _featureSet.features.sort(_sort('FIELD_NAME')); edit, had wrong file in clipboard
... View more
10-10-2012
07:42 AM
|
0
|
0
|
1721
|
|
POST
|
I had an app that was throwing this error when manually creating some geometries. It wasn't a huge deal, but I implemented your solution and it works perfect. Thanks.
... View more
10-04-2012
11:45 AM
|
0
|
0
|
860
|
|
POST
|
A quick glance, I do notice you are binding dojo.addOnload() twice, once in each *.js file you reference. I get the following error in Chrome and IE8
Message: Tried to register widget with id==map_infowindow but that id is already registered
Chrome seems to be more forgiving though and shows your map.
... View more
10-03-2012
01:14 PM
|
0
|
0
|
716
|
|
POST
|
I'd love to hear more about the labor involved in the work you had to do for a project like this. We plan on doing this with our plants at some point, but we just don't have the staff to process design drawings to GIS, even for our smallest plant.
... View more
10-02-2012
02:14 PM
|
0
|
0
|
7920
|
|
POST
|
It was a booboo. http://forums.arcgis.com/threads/65183-quot-json-is-undefined-quot?p=226403&viewfull=1#post226403
... View more
09-28-2012
08:22 AM
|
0
|
0
|
1035
|
|
POST
|
Playing with this in Chrome, looks like the class name you are looking for is dojoxGridMasterHeader. The default height seems to be 26px; You could play with something like this. /** Use em, px or %, whatever you prefer **/ .dojoxGridMasterHeader { height: 20px !important; font-size: 75% !important; }
... View more
09-20-2012
01:45 PM
|
0
|
0
|
1377
|
|
POST
|
It looks like scopemap won't work anymore, but according to Dojo docs you should be able to load custom namespaces for different dojo libraries to work with packages you define. Granted, I have not tried this, but could be worth investigating if you need to maintain some legacy compatibility. http://dojotoolkit.org/reference-guide/1.7/loader/amd.html#relocating-module-namespaces
... View more
09-12-2012
06:25 AM
|
0
|
0
|
1792
|
|
POST
|
Getting access to dojo/request would be pretty nice. It looks like a slick module to wrap all the xhr goodies. Notice I said 'nice', not critical. Personally, I've been making heavy use of DnD lately and it looks like it got some updates in 1.8 for touch capabilities, so that would be 'nice'. Glad to hear 3.2 is coming up, along with some css improvements.
... View more
09-12-2012
06:15 AM
|
0
|
0
|
3941
|
|
POST
|
Can you use Firebug or Chrome dev tools to see what the responseObject looks like? Also, you should wrap 'LyrName' with double quotes, so it's "LyrName" to be valid JSON. JSON doesn't use single quotes. You can usually check your JSON validity wth this site. http://jsonformatter.curiousconcept.com/
... View more
09-11-2012
10:11 AM
|
0
|
0
|
3119
|
|
POST
|
I played with this a little bit and the first error was that you had "Symbol" in your showResults method instead of "symbol", but the ESRI earthquake service doesn't work the way as expected with the Find Task. http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/MapServer Warning - lots of guessing ahead Use the Find method in that REST page and you'll see it returns no attribute or geometry results. I'm guessing it's an event layer in the service generated from a table/rss feed and not an actual shapefile/featureclass. Again, I'm guessing the Find Task doesn't pull the data you expect from a service generated this way. However, when I use the Query Task to pull the data, geometry and attributes are returned, so that may be an alternative. Not as robust as the find task, but usable. Also, in the future you may want to simplify your demo for questions to help narrow down the errors. Hope that helps a little.
... View more
09-10-2012
08:56 AM
|
0
|
0
|
850
|
|
POST
|
I had that problem, but only with jQuery. It occured before I figured out you need to use
define.amd.jQuery = true
I notice you're also using backbone.js. In order to use to use Backbone.js with AGS 3.x/Dojo 1.7 (and really to use it in Require.js without a custom Loader class with .noConflict statements) is to amdify them. Check out these amd friendly repos for backbone and underscore. https://github.com/amdjs/backbone https://github.com/amdjs/underscore They basically use a tool like volo/amdify to wrap the libraries in define module statements. That may be a cause of your issue as well. Take note that the amdify'd libraries are going to look for lower case define/requrie statements of 'jquery', 'underscore', 'backbone'. Since you are looking into these libraries as well, you may want to check out a drop-in replacement for underscore called lodash which is optimized to perform faster than underscore. I was a little hesitant about it at firstm, but once you run the included benchmark, the results are pretty impressive.
... View more
09-04-2012
05:42 AM
|
0
|
0
|
1607
|
|
POST
|
I'm no help on the dojo build. I tried getting it set up, but after a few tries I just went back r.js. With a fold structure like this.
release/
src/
- index.html
- js/
- stylesheets/
- templates/
I have a documented app.build.js file looks like this.
/**
* This is the build file I have started using
* to build my ArcGIS JS API 3.0 apps, which are
* based on Dojo 1.7. I used a similar build file
* when I was using Require.js, so it wasn't much different.
*
* I tried using the Dojo Build Tools, but it just seemed
* way too bloated to download the Dojo SDK, sort my files,
* blah blah blah. With r.js I can use Node NPM to
* npm install requirejs and just use the following command
* r.js -o src/js/app.build.js
* Done and done!
*
* This build file is meant to be used with r.js
* http://requirejs.org/docs/optimization.html
*
* For more details on options, you can review
* the sample r.js build file
* https://github.com/jrburke/r.js/blob/master/build/example.build.js
*/
({
appDir : "../",
baseUrl : "js",
dir : "../../release",
paths : {
"jquery" : 'libs/jquery/jquery-1.7.2.min',
"jqueryui" : 'libs/jqueryui/jquery-ui-1.8.20.custom.min',
"jquery.boostrap" : 'libs/boostrap/bootstrap.min',
"underscore" : 'libs/lodash/lodash.min',
"backbone" : 'libs/backbone/backbone-min',
/**
* This is key. Since the namespaces of dojo & esri,
* even dojox and dijit come from the ArcGIS CDN, use the
* empty: scheme so r.js doesn't try pull in these
* dependencies.
* http://requirejs.org/docs/optimization.html#empty
*/
"dojo" : "empty: ",
"esri" : "empty: ",
"text" : "empty:"
},
/**
* r.js uses uglifyjs by default.
* https://github.com/mishoo/UglifyJS/
*
* If you run r.js via java, you can use google closure.
* I tried to integrate closure, but java on my work
* machine kept punching me in the face. Stick with uglify,
* a dude on twitter told me it was faster anyway.
*/
optimize : "uglify",
/**
* This doesn't work as intended for me.
* According to docs and google groups, this
* should remove all combined files when
* optimizing a whole project
*/
//removeCombined : true,
/**
* This option will grab all the text! calls and
* place them in your optimized file to avoid
* making XMLHttpRequests to load the files
*/
inlineText : true,
/**
* This is optional, as setting the modules
* will create a combined file of all dependencies
* in the release folder. You get a single larger file
* to load rather than multiple smaller files.
* Use at your own discretion.
* */
modules : [
{
/**
* I optimze my app file, because I use
* my main file to set up my dojoConfig.
* If doing a single js file optimization,
* DO NOT include the dojoConfig file
* to be included. It will blow you up.
* Optmize the next entry point into your app.
*/
name: "app"
}
],
/**
* Will make your css a single line file
*/
// I had an issue in one app where this caused some issues. Didn't track it down, but only
// happened in the one app. I should look into it further. Just disable if it causes problems.
optimizeCss : "standard",
/**
* Ewww, RegEx. It's easy though,
* just include files/folders you don't want to
* get exported to your release build folder.
*/
fileExclusionRegExp : /\.(coffee|coffee~|js~|html~|css~|swp|rb|lnk)|sass|.sass-cache|build/
})
Hope that helps.
... View more
08-29-2012
05:26 PM
|
0
|
0
|
910
|
|
POST
|
With the move to Dojo 1.7, there really is no longer a need to use Require.js to handle your module loading. You can take full advantage of the dojo define and require loaders. I put up a posting here explaining my zero-day move from AGS JS API 2.8 to 3.0 and moving from Require.js to full Dojo. http://odoe.net/blog/?p=307
... View more
08-29-2012
08:56 AM
|
0
|
0
|
1607
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-19-2026 02:12 PM | |
| 1 | 04-24-2026 11:01 AM | |
| 2 | 04-21-2026 07:06 AM | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|