|
POST
|
That was my mistake. I forgot to mention that you will need to import the dojo/dom and dojo/on modules. Try the attached.
... View more
01-31-2014
06:28 AM
|
0
|
0
|
3460
|
|
POST
|
You can delete the 'zoomRow' function and add this code.
... View more
01-31-2014
04:51 AM
|
0
|
0
|
3460
|
|
POST
|
With the AMD model, it's not as easy to call a function from HTML. It's recommended to call the dom/dijit, and then execute the event. In the code you provided, you are calling the 'makeZoomButton' from the DataGrid. I couldn't figure out how to execute this function by calling the DataGrid dijit, however, I have a workaround that you can use. Add the following to your code: var grid1 = dijit.byId("grid");
on(grid1,"rowClick", onRowClickHandler)
function onRowClickHandler(evt){
policeUnits2.clearSelection();
var id= grid1.getItem(evt.rowIndex).OBJECTID;
var query = new esri.tasks.Query();
query.objectIds = [id];
policeUnits2.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW,function(features){
extent = pointToExtent(map, features[0].geometry.x, features[0].geometry.y)
map.setExtent(extent);
});
}
... View more
01-31-2014
04:40 AM
|
0
|
0
|
3460
|
|
POST
|
Hi Diane, You can get this by calling the feature variable passed to the 'displayPopupContent' function. Ex: function displayPopupContent(feature){ if(feature){ console.log(feature.attributes.ID); } }
... View more
01-30-2014
07:02 AM
|
0
|
0
|
936
|
|
POST
|
Hi Michelle, I'm not sure why the zoom.png is not showing in your datagrid, but I think I know why it is not zooming to your data. Since you are using point data, you will need to define an extent. Point data will only have an X & Y coordinate value. Here is function you can add to do this: function pointToExtent(map, pointX, pointY, tolerance){
var xmin = pointX - tolerance;
var ymin = pointY - tolerance;
var xmax = pointX + tolerance;
var ymax = pointY + tolerance;
return new esri.geometry.Extent(xmin, ymin, xmax, ymax, map.spatialReference)
} You can then update the zoomRow function to use this: function zoomRow(id){
policeUnits2.clearSelection();
var query = new esri.tasks.Query();
query.objectIds = [id];
policeUnits2.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW,function(features){
extent = pointToExtent(map, features[0].geometry.x, features[0].geometry.y, 6)
map.setExtent(extent);
});
} Also, I believe you will need to update the higlightSymbol since you are using point data. Try using the SimpleMarkSymbol. Ex: var highlightSymbol = new esri.symbol.SimpleMarkerSymbol({
"color": [255,255,255,64],
"size": 12,
"angle": -30,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": [0,0,0,255],
"width": 1,
"type": "esriSLS",
"style": "esriSLSSolid"
}
});
policeUnits2.setSelectionSymbol(highlightSymbol);
... View more
01-30-2014
06:27 AM
|
0
|
0
|
3460
|
|
POST
|
You can name the output layer file to something unique. Ex: arcpy.SaveToLayerFile_management(outNALayer, outNALayer + "_" + famnrNavn + ".lyr", "RELATIVE") Also, when you post your code, be sure to wrap it in CODE tags using the # symbol. This will preserve the indentation.
... View more
01-30-2014
04:18 AM
|
0
|
0
|
1370
|
|
POST
|
Hi George, Since you are using 10.2, can you use the new Table to Excel tool instead of using XTools?
... View more
01-30-2014
02:09 AM
|
0
|
0
|
4053
|
|
POST
|
Hi Tom, What type of data are you working with? i.e. Shapefile, File Geodatabase Feature Class, Personal Geodatabase Feature Class, SDE Feature Class http://resources.arcgis.com/en/help/main/10.2/index.html#//00s500000033000000 Try the following: "HOSPITAL = '" + HOSPITALNAME + "'"
... View more
01-30-2014
02:04 AM
|
0
|
0
|
1370
|
|
POST
|
You can change the field names using the Feature Class to Feature Class function. Or, if you are using 10.2.1, you can use the new Alter Field function. To change the field type, you would need to create a new field with the new type and then calculate the values from the previous field to the new one.
... View more
01-17-2014
06:07 AM
|
0
|
0
|
1623
|
|
POST
|
Hi Joseph, To build off Robert's suggestion, you will also need to add the parameter distances and unit properties. var params = new BufferParameters(); params.geometries = [ evt.geometry]; params.distances = [ 1 ]; params.unit = GeometryService.UNIT_STATUTE_MILE; geometryService.buffer(params);
... View more
01-17-2014
04:30 AM
|
0
|
0
|
1669
|
|
POST
|
Hi Mike, The Alter Field tool will work on your 10.2 geodatabase. You will not need to upgrade. I believe the only geodatabases this tool will not work on are 9.x geodatabases.
... View more
01-16-2014
02:23 AM
|
0
|
0
|
2493
|
|
POST
|
Hi Ganesh, You can set the visibility of the AccordianContainer to 'hidden'. Ex: <div dojoType="dijit.layout.AccordionContainer" id="accordion" style="visibility:hidden;"> You can then show the AccordianContainer when the user clicks on the icon/button. Ex: require(["dojo/dom-style"], function(domStyle){
domStyle.set("accordion", "visibility", "visible");
)};
... View more
01-13-2014
03:54 AM
|
0
|
0
|
1828
|
|
POST
|
The Query Task has a complete event, which returns a featureSet. You can set the extent to the featureSet using the graphicsUtils.graphicsExtent method: queryTask.on("complete", function(featureSet){
var featureExtent = graphicsUtils.graphicsExtent(featureSet.features);
map.setExtent(featureExtent);
}
... View more
01-10-2014
04:09 AM
|
0
|
0
|
2198
|
|
POST
|
If you cache your service, you should load it using the ArcGISTiledMapServiceLayer. As for DynamicMapServiceLayer vs ArcGISDynamicMapServiceLayer, I would recommend the ArcGISDynamicMapServiceLayer since this gives you more Properties/Methods/Events to use.
... View more
01-10-2014
03:26 AM
|
0
|
0
|
2317
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|