|
POST
|
What you can do is to listen to the �??onClick�?� event for each tool in the measurement widget. Here is the code: dojo.connect(measurement["distance"], "onClick", function(){/*deactivate the navigation or identify tools*/"}); Hope this helps.
... View more
12-01-2011
08:48 AM
|
0
|
0
|
1528
|
|
POST
|
Martin, Ed, I'm assuming you want the similar look and feel as arcgis.com uses the measurement tools. I suggest to use toggle button to show and hide the div which holds the measurement widget instead of a dropdown button. Hope this helps.
... View more
11-30-2011
08:56 AM
|
0
|
0
|
616
|
|
POST
|
This is not a bug. The sample is using on demand mode featurelayer. When panning the map, it forces to retrieve the features from server again. According to the screenshot you provided, the feature you are editing is still selected when you pan the map, which means the edits haven�??t been sent to server since the sample code only call applyEdits when the feature is deselected. So the solutions could be: 1. Use snapshot mode instead of on demand. 2. Call applyEdits whenever a vertex moves.
... View more
11-28-2011
07:55 AM
|
0
|
0
|
802
|
|
POST
|
Rex, When you say "tracking code", what you are trying to achieve? A better understanding use case would allow us to help you more. To answer your question. In order to get the frame width of a map in current zoom level, you can call map._getFrameWidth(); And here is the code snippet illustrating how to move the screen point to the world in which the current map extent is.
var mapFrameWidth = map._getFrameWidth();
dojo.forEach(featurePts, function (pt, idx) {
var featureScreenPt = map.toScreen(pt, true);
if (mapFrameWidth !== -1) {
featureScreenPt.x = featureScreenPt.x % mapFrameWidth;
if (featureScreenPt.x < 0) {
featureScreenPt.x += mapFrameWidth;
}
if (map.width > mapFrameWidth) {
var margin = (map.width - mapFrameWidth)/2;
while (featureScreenPt.x < margin) {
featureScreenPt.x += mapFrameWidth;
}
}
}
}
... View more
11-23-2011
11:24 AM
|
0
|
0
|
469
|
|
POST
|
Steve, It depends on the spatial reference, DPI and other factors. The easiest way probably is to add a scalebar on your map and exact the scale value from it:
var scalebarLengthInPixel = scalebar.domNode.style.width; // For example, you may get "112px" as returned value
var scalebarLengthInReality = dojo.query(".esriScalebarSecondNumber", scalebar.domNode)[0].innerHTML; //you may get "300mi" as returned value
Then, parse both values to numbers and calculate the scale value. For example, scalevalue = 300*1609*39.3700787*96/112 (1 mi = 1609 meters, 1 meter = 39.3700787 inches, and assuming the client DPI is 96) If you don't like a visible scalebar, you can always call esri.hide(scalebar.domNode); to hide it. Hope this helps.
... View more
11-21-2011
02:33 PM
|
0
|
0
|
518
|
|
POST
|
It's expected behavior that scalebar disappears when zooming out to level 1 or 2 of the world map. We did it on purpose since there is no accurate scale value when the map covers the whole world. But it should come back when zooming in again. If it's not the case, please provide a reproducible case. Thanks a lot.
... View more
11-10-2011
11:06 AM
|
0
|
0
|
675
|
|
POST
|
James, JS API 2.5 will have a new widget called identity manager, which would solve the issue. Hope this helps.
... View more
09-19-2011
10:09 AM
|
0
|
0
|
985
|
|
POST
|
Pau, Please make it public so that we can debug it. The requests for non-existing tiles are expected if the tilematrixset doesn't specify the valid tile scheme with level information.
... View more
08-18-2011
09:30 AM
|
0
|
0
|
1940
|
|
POST
|
Juliano, Thanks for reporting this. It will be verified and fixed in the next release.
... View more
08-11-2011
01:10 PM
|
0
|
0
|
346
|
|
POST
|
Tony, Sorry about the confusion. This is by design to accommodate wrap-around functions. You can normalize the extent to get the real extent in the origin world. Please try the code as: if (map.spatialReference._isWrappable()) { xmin = esri.geometry.Extent.prototype._normalizeX(map.xmin, map.spatialReference._getInfo()).x; xmax = esri.geometry.Extent.prototype._normalizeX(map.xmax, map.spatialReference._getInfo()).x; var realExtent = new esri.geometry.Extent(xmin, map.ymin, xmax, map.ymax, map.spatialReference); }
... View more
07-25-2011
10:04 AM
|
0
|
0
|
725
|
|
POST
|
Mark, One thing you may want to look at is the geometry passed into the method setGeometry. In order to avoid referring to the new geometry that you moved, it should be serialized to json to store the old and new geometry. Then, when redo/undo the operation, deserialize it by calling esri.geometry.fromJson(geometryJson). Hope this helps.
... View more
07-21-2011
12:49 PM
|
0
|
0
|
1734
|
|
POST
|
Mark, There is a code snippet illustrating how to inherit the base class in the section of "Constructor Detail".
... View more
07-01-2011
02:44 PM
|
0
|
0
|
806
|
|
POST
|
Alistair, This will be fixed in the next release. Sorry for the inconvenience.
... View more
07-01-2011
02:42 PM
|
0
|
0
|
444
|
|
POST
|
Mark, You can certainly implement your own operations by extending the base class "esri.OperationBase", which requires to implement two methods�?"performUndo" and "performRedo". Please take a look at the doc: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/operationbase.htm There is a sample included. Hope this helps.
... View more
06-30-2011
05:28 PM
|
0
|
0
|
806
|
|
POST
|
You can change the font color with the CSS like: <style> .esriScalebarLabel { color:red !important; } </style>
... View more
06-22-2011
04:19 PM
|
0
|
0
|
552
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 06-21-2013 01:17 PM | |
| 3 | 07-15-2013 11:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|