POST
|
You can set the template to ${*} to get the raw fieldnames and values. InfoTemplate | API Reference | ArcGIS API for JavaScript You can loop through the attributes of a feature/graphic to create something fancier on the fly: createTemplate(g){
var template = ["<table>"];
for(var fieldName in g.attributes){
template.push("<tr>");
template.push("<th>");
template.push(fieldName); // add name
template.push("</th>");
template.push("<td>");
template.push(g.attributes[fieldName]); // add value
template.push("</td>");
template.push("</tr>");
}
template.push("</table>");
return template.join('');
}
... View more
01-29-2015
08:09 AM
|
1
|
1
|
386
|
POST
|
I worked through the esri's dgrid sample and the code in the selectGrid function dealing with the dgrid rows looks like it's causing your trouble. I can't see why off hand. I wrote a work-around and posted it here: dgridclick.html UPDATE: Workout is using setTimeout as mentioned by Sarah Clark
... View more
01-29-2015
07:36 AM
|
1
|
2
|
1353
|
DOC
|
An update to the esri dgrid sample to work around the loss of double-click zooming. Original sample here: dgrid | ArcGIS API for JavaScript
... View more
01-29-2015
07:34 AM
|
0
|
0
|
3015
|
POST
|
Here's a little more on how I would do this (untested). I see now that you did pans only but the approach should work. // Listen for the map extent to change
var extentListener = on.pausable(map, "extent-change", function(evt){
// Write to history
if (typeof history.pushState !== "undefined") {
window.history.pushState(state, null, "CreateTract.aspx?x=" + pt.x + "&y=" + pt.y);
}
});
// Listen for history stack to the be popped
window.on("popstate", function (evt) {
// don't worry about writting new history until we're done
extentListener.pause();
// When the map has had its extent changed then resume writing history <<<<<<<< A >>>>>>>>>>>
on.once(map, "extent-change", function(evt){
extentListener.resume();
});
// Get the extent from evt.state or url
var center = ...;
var zoom = ...;
// Set map location from history event...this triggers our one time listener at << A >>
map.centerAndZoom(center, zoom);
});
... View more
01-29-2015
04:54 AM
|
1
|
1
|
417
|
POST
|
There's a sample that's not quite related: History API to track selected feature | ArcGIS API for JavaScript The key may be to turn off your listener when you're setting your history. Or check out dojo/on view /dojo/on
... View more
01-28-2015
11:00 AM
|
0
|
2
|
417
|
POST
|
Since you're using the esri API I'll point you towards the quick and easy dojo solution: dojox.widget.Standby — The Dojo Toolkit - Reference Guide
... View more
01-15-2015
10:44 AM
|
1
|
1
|
554
|
POST
|
This might apply: javascript - Looping through array and removing items, without breaking for loop - Stack Overflow So, start your loop at the end and work to the start. Delete you're target (polys[index]) if there are overlaps and not each overlap since they may be distinct once your target is removed. This should remove the fewest polygons. var i = polys.length while (i--) { // . . . } It looks like you've already considered that the intersect call is asyncronous since you're passing the index in to your function.
... View more
01-05-2015
06:37 AM
|
0
|
2
|
729
|
POST
|
A couple things - first, I haven't worked with the ServiceArea task but there is a OverlapPolygons parameter that may solve this for you: ServiceAreaParameters | API Reference | ArcGIS API for JavaScript Second, if you delete these polygons won't you end up with gaps in your service areas? Since you have the intersections you can use the geometryservice.difference function to clip your target (aka polys[index]) to remove the overlaps from its geometry.
... View more
12-31-2014
06:52 AM
|
0
|
4
|
729
|
POST
|
Might not be what you're looking for, you can take all the features you're interested in and add them to the infoWindow so you can cycle through one at a time. map.infoWindow.setFeatures([a,b,c]); Or you could look at labeling selections instead of the popup. If you really want to see all the attributes of a bunch of things at the same time then Jake has the best idea.
... View more
12-30-2014
11:37 AM
|
0
|
0
|
485
|
POST
|
You can access your database through ArcGIS Server services. You're not personally writing SQL anymore but you're not using .NET anymore either. As long as your website and arcgis server are on the same machine (or you're using the webadaptor) you might not need the proxy either.
... View more
12-30-2014
08:07 AM
|
0
|
2
|
876
|
POST
|
Does the URL you're returned have a map in it? I think adding template.layout = "MAP_ONLY"; won't hurt.
... View more
12-30-2014
06:45 AM
|
0
|
1
|
1584
|
POST
|
So you're logging in, working on the map for 61 minutes (enough to timeout the a default token) and your being prompted to log in again?
... View more
12-29-2014
11:42 AM
|
0
|
1
|
330
|
POST
|
You can start a timer with window.timeout(function, 1000) and it looks like you can get a reference to the window: IdentityManager | API Reference | ArcGIS API for JavaScript which is a dijit/Dialog — The Dojo Toolkit - Reference Guide Haven't tried this, but something like this should work: // Listen for dialog and time it out, will want this setup before layers are loaded
esriKernel.id.on("dialog-create", function(){
setTimeout(function(){
kernel.id.dialog.hide();
}, 30*1000) // 30 seconds
});
... View more
12-29-2014
05:39 AM
|
0
|
3
|
330
|
POST
|
You can convert lat/long to XY esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript You might consider using a label layer instead?
... View more
12-29-2014
05:24 AM
|
0
|
0
|
1191
|
POST
|
I would use the PrintTask to get a JPG image PrintTemplate | API Reference | ArcGIS API for JavaScript Then I would write the URL returned to an image tag (instead of trying to write a map in a div tag). <table><div><etc> <img src="'+ urlFromPrintTask +'" /> ...
... View more
12-29-2014
04:59 AM
|
1
|
3
|
1584
|
Title | Kudos | Posted |
---|---|---|
1 | 02-02-2015 11:33 AM | |
1 | 07-07-2015 05:08 AM | |
1 | 12-29-2014 04:59 AM | |
1 | 02-02-2015 11:22 AM | |
1 | 07-09-2015 04:44 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|