|
POST
|
DurandalJS has requirejs baked it into, which is why you are having issues. But the Durandal team is on top of it. Here is a link on using Durandal with Dojo http://durandaljs.com/documentation/Dojo/ And suprisingly enough that page links to a github repo on how to use DurandalJS with the Esri API. https://github.com/dgwalton/DurandalEsri
... View more
07-08-2013
05:37 AM
|
0
|
0
|
772
|
|
POST
|
I did some digging around on how to capture when a dom element has been repositioned and there doesn't seem to be an easy way to do it. I tried listeneng for "scroll", which I thought might do it, but no luck. Maybe if you have the map in a container, you can listen for that containers resize event.
... View more
07-05-2013
08:27 AM
|
0
|
0
|
3108
|
|
POST
|
Jsfiddle isn't working for me right now, but I put it into Plunker and sure enough I can see the behavior you are talking about. http://plnkr.co/Zz7GD3DawoJnlT9UIAUH I don't see an easy fix off the top of my head, but if I manually do a resize in the collapse function the points show up as they should.
function collapseDiv() {
MAP_OBJ.resize();
var div = document.getElementById("divTop");
div.style.display = "none";
}
Not the solution you are probably looking for since in other cases I can't find a way to capture when the map has moved, but could probably be hacked in. Nice catch on this one.
... View more
07-05-2013
07:06 AM
|
0
|
0
|
3108
|
|
POST
|
Maybe you could try dojox/data/QueryReadStore to try and limit the results you get back. https://dojotoolkit.org/reference-guide/1.9/dojox/data/QueryReadStore.html Here are some snippets from a project I have where I use it.
// Define my custom QueryReadStore behavior
var ParcelStore = declare([QueryReadStore], {
fetch: function(request) {
request.serverQuery = {
q: request.query.name // This is the querystring that will be used, ie - url/search?q=searchstring
};
return this.inherited("fetch", arguments);
},
requestMethod: 'get'
});
// create a new instance of my QueryReadStore
var p_store = new ParcelStore({
url: url // this is a url I passed in to a function, the base URL to do my queries
});
// Create my new ComboBox with appropriate parameters
parcelSearch = new ComboBox({
id: 'parcel-filterselect',
name: 'parcel',
hasDownArrow: false, // so it doesn't look like a combobox, just an input
placeHolder: 'Parcel Number...',
store: p_store, // the custom QueryReadStore I created above
autoComplete: true,
style: 'width: 131px;',
tooltip: 'Enter a parcel number',
searchAttr: 'name',
pageSize: 10 // so it doesn't blow up you vertical scroll
}, 'parcel-filterselect');
This has worked pretty good for me in the past.
... View more
07-02-2013
10:32 AM
|
0
|
0
|
1082
|
|
POST
|
I did a write-up on this recently, but here is the fiddle showing a utility module that can help you define fields to show and define URL fields. http://jsfiddle.net/odoe/PDr7p/1/ Here is a gist of the code that does the work used in the fiddle https://gist.github.com/odoe/5800348 It basically lets you pass a urlField and urlPrefix to create a hyperlink.
... View more
07-02-2013
07:49 AM
|
0
|
0
|
1240
|
|
POST
|
Ah, ok, missed that article. The docs could probably use a tweak as they specify an Error object is returned, so that threw me off. https://developers.arcgis.com/en/javascript/jsapi/layer-amd.html#onupdateend
... View more
06-27-2013
05:34 PM
|
0
|
0
|
1406
|
|
POST
|
Are you running the application from a local server environment like IIS or Apache? I could have sworn this was mentioned in the docs somewhere, but now I can't find it. You could even use python to run a webserver to view your files, python -m -SimpleHTTPServer Key is that the browser URL cannot be file:// or it API won't work.
... View more
06-27-2013
07:53 AM
|
0
|
0
|
1218
|
|
POST
|
I think this has to do with how the error object is passed around using dojo/on. Somewhere in the layer code there is now this.emit('update-end', errorObject); But if you look at the error object itself, it's actually {
error: undefined,
target: Object, // <- that target layer
undefined: undefined // <- heh, probably has to do with some json and mixin stuff
} Anyway, previously with connect.connect(layer, 'onUpdateEnd') it would pass nothing as an error object, so it looks like now you just need to check the returned error object to see if the error.error is undefined instead. I hadn't run into this yet, but this is the behavior I'm seeing. I'm guessing in the source for layer there is a method that handles this.emit('update-end', passedvariable) and it defaults to an object of some sort. This is all best guess stuff since it isn't explicitly defined that this is the expected behavior in the docs/samples.
... View more
06-26-2013
10:34 AM
|
0
|
0
|
1406
|
|
POST
|
If the blob is an image, it's probably a base64 endcoded image, which means you can display it in your html by adding data:image/png;base64 in front of the string in a popup or somewhere else. Change image type based on what it is. So as an infotemplate, you might write it as <img src="data:image/gif;base64,${IMAGE_FIELDNAME}" />
... View more
06-19-2013
05:38 AM
|
0
|
0
|
1385
|
|
POST
|
I had put this demo together a while ago, it's not exactly how I do things these days, but still gives an idea about breaking stuff up into modular pieces. https://github.com/odoe/AGSModularDemo For example, I don't use "views" anymore, I changed it to controllers and my widgets are actually all done in Angular.js now. I used to use r.js to build my apps from when I was still using requirejs, but since the API moved to 3.x, I just use Grunt now. http://gruntjs.com/ I was finally convinced to go Grunt after talking with one of the AGRC guys about how they use Dojo to do their builds. It's just a lot easier for me to automate my tests, less compiles and minification. https://github.com/agrc/AGRCJavaScriptProjectBoilerPlate If I find myself with a huge list of dependencies for any require() or define() call, I take that as a sign that it's probably time to refactor and that I'm trying to do too much at one time. This is always a good sign that something could probably be broken out. I've taken to writing lots of smaller functions I can string together, which I'm fine with, but a long define/require list makes me feel bad.
... View more
06-18-2013
05:18 PM
|
0
|
0
|
2806
|
|
POST
|
I forgot that although they are tiled does not mean it's a fused cache so you can still disabled layers. Can't test at moment, but I seem to remember serving tiled data as dynamic provided a grainy looking map and serving dynamic as tiled loaded the data in weird tiles that didn't line up correctly.
... View more
06-15-2013
11:05 AM
|
0
|
0
|
2731
|
|
POST
|
Like Oren suggested, if you are loading from a configuration of some sort, can't you specify it there? I have a sample showing how to load from a json config https://github.com/odoe/agsnode-dev/blob/master/config.json If not that way, look at the info of the map service using esri/request http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer?f=pjson Check if singleFusedMapCache is true or if it has a tileInfo property.
... View more
06-15-2013
06:40 AM
|
0
|
0
|
2731
|
|
POST
|
These would be found in the esri/dijit/popup http://developers.arcgis.com/en/javascript/jsapi/popup.html maximize and restore. http://developers.arcgis.com/en/javascript/jsapi/popup-amd.html#onmaximize http://developers.arcgis.com/en/javascript/jsapi/popup-amd.html#onrestore
... View more
06-11-2013
02:50 PM
|
2
|
0
|
828
|
|
POST
|
Well, that makes sense I suppose. I'll just need to rewrite my config loader to check for that. Thanks.
... View more
06-06-2013
04:45 PM
|
0
|
0
|
1694
|
|
POST
|
If you want the lat/lng esri.geometry.webMercatorToGeographic(map.extent.getCenter()); http://developers.arcgis.com/en/javascript/jsapi/namespace_geometry.html#webmercatortogeographic This is assuming your map is in web mercator.
... View more
06-06-2013
01:31 PM
|
0
|
0
|
1742
|
| 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 |
Online
|
| Date Last Visited |
35m ago
|