(1) Internal scale
This example shows how to add a scale map. Can be added to a map, or a scale at a user-specified location. The following code fragment shows the default scale shown in the lower-left corner of the map.
var scalebar=new esri.dijit.Scalebar ({
Map:map
});
You can modify the map for that location by setting the Attachto option in one of the following values "Top-right", "Bottom-right", "Top-center", "Bottom-center", "Bottom-left", "Top-left" .
var scalebar=new esri.dijit.Scalebar ({map:map,
Attachto: "Bottom-left"
});
View Original: ArcGIS for JavaScript APi maps with scalebar--map scale
Reference joins: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/widget_scalebar
Online Demo: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/widget_scalebar/index.html
The code is as follows:
<! DOCTYPE html> }, Dojo.byid ("Scalebar"));
The code is as follows:
<! DOCTYPE html>
Effect as shown:
(3) Question:
Do not know why, many examples are the first load is no problem, refresh the page will not be shown again, such as the scale is the same, I used the IE9 browser