ArcGIS for JavaScript APIs map with Scalebar (within/outside map scale) ———— (23) __java

Source: Internet
Author: User

(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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.