Community
All Communities
Products
ArcGIS Pro
ArcGIS Survey123
ArcGIS Online
ArcGIS Enterprise
Data Management
ArcGIS Experience Builder
Geoprocessing
ArcGIS Web AppBuilder
ArcGIS Dashboards
ArcGIS Field Maps
ArcGIS Spatial Analyst
All Products Communities
Industries
Education
Water Resources
State & Local Government
Transportation
Gas and Pipeline
Water Utilities
Roads and Highways
Telecommunications
Natural Resources
Electric
Imagery and Remote Sensing Insights (IRIS) COP
All Industries Communities
Developers
Python
JavaScript Maps SDK
Native Maps SDKs
ArcGIS API for Python
ArcGIS Pro SDK
ArcObjects SDK
Developers - General
ArcGIS REST APIs and Services
ArcGIS Online Developers
Game Engine Maps SDKs
File Geodatabase API
All Developers Communities
Global
Comunidad Esri Colombia - Ecuador - Panamá
ArcGIS 開発者コミュニティ
Czech GIS
ArcNesia
Esri India
Comunidad GEOTEC
Europe
GeoDev Germany
Americas
Asia Pacific
ArcGIS Content - Esri Nederland
All Global Communities
All Communities
Developers
User Groups
Industries
Services
Community Resources
Global
Events
Learning
Networks
ArcGIS Topics
Products
View All Communities
ArcGIS Ideas
GIS Life
Community Resources
Community Help Documents
Community Blog
Community Feedback
Member Introductions
Community Ideas
All Community Resources
Sign In
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show
only
|
Search instead for
Did you mean:
Cancel
Home
:
All Communities
:
Developers
:
JavaScript Maps SDK
:
JavaScript Maps SDK Questions
:
Measurement widget Change Miles to Kilometers
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
Select to view content in your preferred language
Translate Now
Measurement widget Change Miles to Kilometers
Subscribe
937
3
05-07-2013 03:39 PM
by
DavidMendoza
Emerging Contributor
05-07-2013
03:39 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Hi everyone!
I'm using de Measurement widget and it works great, how ever, I need to measure Distance in Km and Areas in Km2, actually this widget uses Miles an Acres.
I tried looking into the CSS that the widget uses whitout a good result.
Tags
(2)
Tags:
javascript
web_developers
Reply
0
Kudos
All Posts
Previous Topic
Next Topic
3 Replies
by
JianHuang
Deactivated User
05-07-2013
03:47 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
David,
You can specify the default unit for area and length measurement. Please see the document at:
http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/measurement.html
You will find defaultAreaUnit and defaultLengthUnit is configurable.
Hope this helps.
Reply
0
Kudos
by
DavidMendoza
Emerging Contributor
05-07-2013
04:00 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Jian
Thank you so much! It gives the solution about mi need.
Reply
0
Kudos
by
Jorn_ArjanSijbe
rtsma
Emerging Contributor
05-09-2013
07:25 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
In kilometres:
#add the scale bar
dojo.connect(map, "onLoad", function(theMap) {
var scalebar = new esri.dijit.Scalebar({
map: map,
scalebarUnit: "metric"
});
});
This will do the job.
JS
Reply
0
Kudos
Post Reply