|
POST
|
Assume you are using AMD style. Make sure to include "esri/graphicsUtils" to the dependency list, and take graphicsUtils as the alias. var resultExtent = graphicsUtils.graphicsExtent(results.features);
map.setExtent(resultExtent);
... View more
09-19-2013
02:02 PM
|
0
|
0
|
2204
|
|
POST
|
You might find some help from this thread: http://forums.arcgis.com/threads/92540-format-numbers-in-Javascript-legend?highlight=label+legend
... View more
09-19-2013
01:42 PM
|
0
|
0
|
535
|
|
POST
|
Change: for (var i = 0, il = results.features.length; i < il; i++) {
var graphic = results.features;
graphic.setSymbol(symbol);
map.graphics.add(graphic);
map.centerAndZoom(results.features.geometry, 0.1);
alert(results.features.length); //this returns 1
} To:
var graphic;
for (var i = 0, il = results.features.length; i < il; i++) {
graphic = results.features;
graphic.setSymbol(symbol);
map.graphics.add(graphic);
}
map.setExtent(esri.graphicsExtent(results.features));
... View more
09-19-2013
01:38 PM
|
0
|
0
|
2204
|
|
POST
|
Not I know of. As far as I know, the only way is to increase the limit using ArcGIS Server Manager.
... View more
09-19-2013
08:40 AM
|
0
|
0
|
1415
|
|
POST
|
Hi Hank, Can you get the results back from the query? The reason why I am asking is that you set query.geometry = evt.mapPolygon; which I believe should be query.geometry = evt.mapPoint; In addition, I don't know why you construct the infoTemplate that way. The first parameter to new InfoTemplate should be for the title, like new InfoTemplate(title,content). The first parameter set in your code seems to be the content you like to display in the popup. Am I right?
... View more
09-19-2013
08:11 AM
|
0
|
0
|
849
|
|
POST
|
Glad to help, Pamela. Please consider to mark this thread as "Answered" so other people may find it helpful. Thanks.
... View more
09-19-2013
07:54 AM
|
0
|
0
|
1132
|
|
POST
|
The feature limit does not apply to featureLayer.queryIds. Here is the description of the method on ESRI API description. Query for ObjectIds. There is no limit on the number of ObjectIds that are returned from the server. But I believe the feature limit does apply to setDefinitionExpression.
... View more
09-19-2013
07:51 AM
|
0
|
0
|
1415
|
|
POST
|
Actually, all these values are considered falsy in javascript: null, undefined, false, "", 0. So instead of using if statement to evaluate for each case, just use the value itself should suffice to evaluate it's true value or falsy value. We do need to consider the case where " " is true, but "" is falsy. So using dojo.trim would be needed in some cases. Here is a blog to explain that.
... View more
09-19-2013
07:21 AM
|
0
|
0
|
1636
|
|
POST
|
maxRecordCount is a read-only property which is carried over from the map service. The only way you can increase the limit is to change maxRecordCount of a map service using ArcGIS Server Manager or ArcCatalog. Once set and published, maxRecordCount cannot be changed. In addition, maxRecordCount can only be set at the map service level, not the feature layer level. I've had a hard time to find it out. To ESRI development team: it's truely beneficial to be able to change maxRecordCount at both map service and feature layer level via JSAPI. One scenario we have experienced is that our app has to support both IE8 and other modern browsers. Since IE8 is much slower in Javascript execution, we have the need to limit maxRecordCount to 500 for IE8 users, and keep 1000 or even 2000 for other users.
... View more
09-19-2013
07:14 AM
|
0
|
0
|
1415
|
|
POST
|
Try to change: var mySBIQueryTask = new QueryTask(flSBIUrl);
var mySBIQuery = new Query();
mySBIQuery.returnGeometry = true;
mySBIQuery.outFields = ["BankName"];
mySBIQuery.outSpatialReference = { wkid: 102100 }; To: var mySBIQuery = new Query();
mySBIQuery.returnGeometry = true;
... View more
09-19-2013
06:56 AM
|
0
|
0
|
1645
|
|
POST
|
If the feature layer, pointdata, is created correctly, the below code sample should meet your need. pointdata.on("click", function(evt) {
var hashId = evt.graphic.attributes["hash_id"];
}); In addition, based on the ESRI API description, the structure of the feature collection should be { layerDefinition: {
geometryType": "esriGeometryPoint",
objectIdField": "ObjectID",
drawingInfo": {
},
"fields": [{
"name": "ObjectID",
"alias": "ObjectID",
"type": "esriFieldTypeOID"
}, ...]
},
featureSet: {
features: [],
geometryType: "esriGeometryPoint"
}
}; Here is a sample of creating a feature layer from a feature collection.
... View more
09-19-2013
06:43 AM
|
0
|
0
|
349
|
|
POST
|
Try to change: var content = "";
if (dojo.trim(f.attributes["Topo_URL"]) != null && dojo.trim(f.attributes["Web_URL"]) != null) {
content += "<a target='_blank' href='${Topo_URL}'>Topo Map Information</a><br/>" + "<a target='_blank' href='${Web_URL}'>Geologic Map Information</a>";
}
if (dojo.trim(f.attributes["Topo_URL"]) == null && dojo.trim(f.attributes["Web_URL"]) != null) {
content += "<a target='_blank' href='${Web_URL}'>Geologic Map Information</a>";
}
if (dojo.trim(f.attributes["Topo_URL"]) != null && dojo.trim(f.attributes["Web_URL"]) == null) {
content += "<a target='_blank' href='${Topo_URL}'>Topo Map Information</a><br/>";
} To: var content = "";
var hasTopoUrl = f.attributes["Topo_URL"] && dojo.trim(f.attributes["Topo_URL"]);
var hasWebUrl = f.attributes["Web_URL"] && dojo.trim(f.attributes["Web_URL"]);
content += hasTopoUrl ? "<a target='_blank' href='${Topo_URL}'>Topo Map Information</a><br/>" : "";
content += hasWebUrl ? "<a target='_blank' href='${Web_URL}'>Geologic Map Information</a>" : "";
... View more
09-18-2013
09:08 PM
|
0
|
0
|
1636
|
|
POST
|
Try to change two places. Change: bufferParameters.distances = [dojo.byId("distance").value]; To: bufferParameters.distances = [parseInt(dojo.byId("distance").value)]; Change: mySBIQuery.outSpatialReference = { wkid: 102100 }; To: mySBIQuery.outSpatialReference = new SpatialReference({ wkid: 102100 });
... View more
09-18-2013
08:49 PM
|
0
|
0
|
1645
|
|
POST
|
The issue is because the map is in navigation mode by default, so when you press down the mouse key, the map responds with PAN operation. What you can do is to disable the map navigation when the user long presses the feature of a feature layer, and enable it once you finish handling the event. In addition, I would define the onMouseDown event handler against the feature layer instead of the map. Here is the code sample assuming the featureLayer created somewhere else. var timer, isPan = this.map.isPan;
on(this.featureLayer, "mouse-down", lang.hitch(this, function(e) {
timer = setTimeout(lang.hitch(this, function() {
isPan && this.map.disablePan();
this.selectFeatures(e.screenPoint).then(lang.hitch(this.editor, this.editor.moveFeature));
}), 5*1000);
}));
on(this.featureLayer, "mouse-up", function(e) {
clearTimeout(timer);
isPan && this.map.enablePan();
});
... View more
09-18-2013
10:13 AM
|
0
|
0
|
518
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-17-2013 05:16 AM | |
| 1 | 11-06-2013 04:34 AM | |
| 1 | 08-29-2013 10:58 AM | |
| 6 | 10-20-2020 02:09 PM | |
| 1 | 11-20-2013 06:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-17-2024
08:41 AM
|