|
POST
|
I wonder if calling esri.geometry.normalizeCentralMeridian(...) would help in this situation?
... View more
12-19-2012
07:00 AM
|
0
|
0
|
390
|
|
POST
|
I haven't tested this with the latest api, but try this: editor._updateCurrentFeature(dojo.hitch(this,function(){
editor._clearSelection(false);
}));
... View more
12-06-2012
08:27 AM
|
0
|
0
|
1287
|
|
POST
|
Ann, [INDENT]make sure to use version 3.1 of the JS API as the issue mentioned below was fixed at 3.1 and might cause some problems for your particular workflow:[/INDENT] NIM083266: esri.tasks.FeatureSet.toJson() should ignore the featureSet's fields property when it is an empty array. John
... View more
08-09-2012
08:20 AM
|
0
|
0
|
1885
|
|
POST
|
Rahul, if you're creating the FeatureLayer not from a url as you mention but from a featureCollectionObject, then you should look at the restrictions associated with this FeatureLayer constructor (link) * Does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries.
... View more
07-26-2012
08:11 AM
|
0
|
0
|
1599
|
|
POST
|
sholyoak, As Derek tries to point out, the call to 'project' is asynchronous which means your inline function that handles the projected geometries will not runs until after you get a reply from the server. On the other hand, the code right after your call to 'project' runs immediately after making the call, which means you're trying to use a variable (newPt) that hasn't been set yet. Try this:
function openStreetView(evt) {
//convert the point //make sure we have a geometry server
if (gsvc === null) initializeProjection();
var outSR = new esri.SpatialReference({ wkid: 4326 });
pt = evt.mapPoint;
gsvc.project([pt], outSR, function (projectedPoints) {
newPt = projectedPoints[0];
// WAIT FOR SERVER RESPONSE AND THEN DO SOMETHING WITH newPt HERE...
}, function (e) { console.log(e.message); });
// CODE HERE RUNS IMMEDIATELY AFTER CALLING PROJECT BUT RESPONSE FROM SERVER MAY NOT HAVE HAPPENED YET...
}
... View more
04-13-2012
08:20 AM
|
0
|
0
|
1394
|
|
POST
|
The language local will be picked up from the browser settings. One way to force language localizations is to set the locale in dojoConfig. Find the following tag in your html file and modify accordingly: <script type="text/javascript"> var dojoConfig = { parseOnLoad:true, locale:"es" }; </script> More details in the JS API Localization concepts page. Additionally, you can explicitly override and/or change the measure tool messages as described in the ArcGIS JavaScript API Dijit Text Strings help topic.
... View more
03-14-2012
07:57 AM
|
0
|
0
|
1759
|
|
POST
|
You are probably reading the values before the map actually changes extent. I suggest you listen to the map.onExtentChange event and then get the map extent values. var factor = 0; var xtent =new esri.geometry.Extent(xmin-factor, ymin-factor, xmax+factor, ymax+factor) var mapExtentChangeHandle = dojo.connect(map, 'onExtentChange', function(newExtent){ dojo.disconnect(mapExtentChangeHandle); alert(dojo.replace("{xmin},{ymin},{xmax},{ymax}", newExtent); alert(map.extent.xmin + ',' + map.extent.ymin + ',' +map.extent.xmax + ',' + map.extent.ymax); }); map.setExtent(xtent);
... View more
03-14-2012
07:44 AM
|
0
|
0
|
857
|
|
POST
|
I believe 102100 is based on Mercator which is a conformal projection so it does not maintain areas or distances. Try using a Spatial Reference which uses an equal area projection which is appropriate to the location.
... View more
01-31-2012
08:43 AM
|
0
|
0
|
1550
|
|
POST
|
Try using the dojox.grid.enhanced.plugins.Selector (link) as you can connect to selection related events (link).
... View more
01-31-2012
07:26 AM
|
0
|
1
|
1102
|
|
POST
|
Try setting the 'esri.tasks.BufferParameters.bufferSpatialReference' to a Spatial Reference with an equal area projection that is appropriate to your location.
... View more
01-31-2012
07:16 AM
|
0
|
0
|
1550
|
|
POST
|
There are several 'sidd-by-side' Web Application Templates on ArcGIS.com that you could check out. Here's the link to one of them: Side by Side Viewer
... View more
12-12-2011
07:11 AM
|
0
|
0
|
484
|
|
POST
|
I believe the 'All Layers and Tables' REST resource (<mapServiceUrl>/layers) was added at ArcGIS Server 10.0 (could be 10.0 sp1, but not 100% sure). That is why I started my previous response with 'If available'...
... View more
11-21-2011
07:36 AM
|
0
|
0
|
1684
|
|
POST
|
For this task, the only useful pieces of information about each layer are: Is the subLayer visible Is subLayer within scale range
var identifyLayerIds = dojo.filter(map.layerInfos, function(layerInfo){
var mapScale = esri.geometry.getScale(map);
var layer = map.getLayer(layerInfo.id);
return (layer.visible && isWithinScaleRange(layerInfo,mapScale);
}).map(function(visibleLayerInfo){
return visibleLayerInfo.id;
});
function isWithinScaleRange(layerInfo, mapScale){
var isWithinScaleRange = true;
if ((layerInfo.minScale === 0) && (layerInfo.maxScale !== 0)) {
isWithinScaleRange = (mapScale > layerInfo.maxScale);
} else {
if ((layerInfo.maxScale === 0) && (layerInfo.minScale !== 0)) {
isWithinScaleRange = (mapScale < layerInfo.minScale);
} else {
if ((layerInfo.maxScale !== 0) && (layerInfo.minScale !== 0)) {
isWithinScaleRange = (mapScale < layerInfo.minScale) && (mapScale > layerInfo.maxScale);
}
}
}
return isWithinScaleRange;
}
... View more
11-17-2011
07:32 AM
|
0
|
0
|
1579
|
|
POST
|
The new 'Basic Viewer' app template on ArcGIS.com has some related code (see 'addMeasurementWidget' and 'toggleMeasure' methods). Even though it uses UI elements specific to this app and does other things you might not need, there is some code that might be relevant: measure.clearResult();
if(measure.activeTool){
measure.setTool(measure.activeTool, false);
}
... View more
11-16-2011
07:48 AM
|
0
|
0
|
1456
|
|
POST
|
I'm not sure if this will help, but depending on how a particular style attribute is set in the original widget definition you might have to use !important. Try this: .esriAttributeInspector .atiDeleteButton {
color:red !important;
}
... View more
09-23-2011
08:02 AM
|
0
|
0
|
1509
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-07-2024 04:14 PM | |
| 1 | 02-23-2024 12:40 PM | |
| 1 | 03-01-2024 10:48 AM | |
| 2 | 08-03-2023 02:34 PM | |
| 2 | 07-19-2023 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-24-2024
06:01 PM
|