ArcGIS API for JavaScript 3.12新特性介绍

2015-01-29

新的BaseMap

支持两个新的底图类型:Terrain和Dark Gray。Dark Gray在ArcGIS Online上是一个全新的底图。

更新HeatmapRenderer

HeatmapRenderer类不再是Beta版本了,对该类的构造(Constructor)又新增加了两个选项: colorStops 和setColorStops

var heatmapRenderer = new HeatmapRenderer({
  blurRadius: 10,
  minPixelIntensity: 1,
  colorStops: [
        {ratio: 0, color:"rgba(0, 255, 0, 0)"},
        {ratio:0.3, color:"rgb(0, 255, 0)"},
        {ratio:0.4, color:"rgb(150, 255, 0)"},
        {ratio:0.5, color:"rgb(255, 255, 0)"},
        {ratio:0.85, color:"rgb(255, 95, 0)"},
        {ratio:1, color:"rgb(255, 0, 0)"}
    ]
});

featureLayer.setRenderer(heatmapRenderer);

10个新增的分析Widgets

 

alculateDensity
Create a density map from point or line features by spreading known

quantities of some phenomenon (represented as attributes of the points or lines) across the map.

ConnectOriginsToDestinations
Measure the travel time or distance between pairs of points.
 
CreateViewshed
Creates areas that are visible based on locations you specify.
 
CreateWatersheds
Creates catchment areas based on locations you specify.
 
DeriveNewLocations
Derive new features from the input layers that meet a query you specify.
 
FindExistingLocations
Select features in the input layer that meet an attribute and/or spatial query you specify.
 
FindSimilarLocations
Measure the similarity of candidate locations to one or more reference locations.
 
InterpolatePoints
Predict values at new locations based on measurements from a collection of points.
 
PlanRoutesJavaScript API]
Determine how to efficiently divide tasks among a mobile workforce.
 
TraceDownstream
Determine the flow paths in a downstream direction from the locations you specify.
 

Labeling的增强

对于某些非 Web 墨卡托和非地理空间引用中的功能,LabelLayer 并不显示标签正确。
LabelLayer: 改进的标签的位置。

Directions Wiget的增强

增加了目的地的添加选项,增加了两个新的方法: activate(), deactivate()

查看示例

新增DataAdapterFeatureLayer对象(Beta)

当用户显示非空间数据信息时,可以使用新增的DataAdapterFeatureLayer类。

Location Providers(Beta)

支持一套新的类对象,使您可以将空间启用数据集不包含它自己的空间信息。

New task to do standard geography queries: StandardGeographyQueryTask uses the ArcGIS Standard geography query service to query for standard geographies.

FeatureTable widget(Beta)

在显示要素表格式方面新增了一个新的widget,用户可以选择同时显示和只显示表格两种方式

 ready(function(){

          // Create the feature layer
        var myFeatureLayer = new FeatureLayer("http://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/california_census_blocks/FeatureServer/0", {
          mode: FeatureLayer.MODE_ONDEMAND,
          outFields:  ["NAME","GEOID","MTFCC","ALAND","AWATER"],
          visible: true,
          id: "fLayer"
        });
        myTable = new FeatureTable({
          "featureLayer" : myFeatureLayer,
          "hiddenFields": ["FID","C_Seq","Street"]  // field that end-user can show, but is hidden on startup
        }, 'myTableNode');
        myTable.startup();
      });
查看示例

 

Web优化器的改变与提升

  • Provide feedback when uploading a zip file that exceeds file size limit.
  • Fixed errors when publishing builds to the cloud (“Published to Cloud”) and build name contained spaces.
  • Fixed issue where “Publish to Cloud” option was not available although the build did not contain custom packages.

Converting to/from MGRS etc

The GeometryService has two new methods to make it easy to convert to/from MGRS, USNG, UTM etc .

(requires ArcGIS Server 10.3 or above)

CHANGES

In the Renderer class, the setProportionalSymbolInfo() method has changed name to setSizeInfo(), while the proportionalSymbolInfo property has changed name to sizeInfo.

API enhancements

Bug fixes

  • Work-around for big zoom-in with Chrome browser – Applying opacity to element with big scale transform freezes the page.
  • Fix for heatmap renderer across international date line – Esri/heatmap-layer-js won’t display across dateline. This was handled by the newly-added extent.normalize() method.
  • BUG-000082713: Attachment editor error “This file type is not supported” when file is attached using Internet Explorer 11.
  • BUG-000083043: Fixed an issue where the Measurement widget did not update the latitude values, ref: geonet discussion.
  • BUG-000082443: Fixed an issue where the Measurement widget incorrectly rounded latitude on non Web Mercator/WGS 1984 basemaps.
  • BUG-000082848: Fixed an issue where the Measurement widget’s Distance tool always returned “Miles” in the “measure” and “measure-end” events.
  • NIM098834: Fixed an issue where the link to the buttons.css stylesheet used with esri.dijit.Gallery returned a blank page.
  • BUG-000082611: InfoWindow now correctly displays information for all points when using a StreamLayer.
  • ENH-000082141: LabelLayer now works with StreamLayer.
  • NIM099463: Fixed an issue where the “Delete” button in the Attribute Inspector widget sample did not work.
  • BUG-000083637: Fixed an issue where panning would not disable using Internet Explorer 10/11 when right-clicking outside the map.

Additional Resources on GitHub

Be certain to check out any updates to the repository on GitHub with TypeScript definitions for the JS API as well as the jshint options file used by the JS API team.

Dojo

Version 3.12 of the ArcGIS API for JavaScript was upgraded to use Dojo 1.10.2. dgrid was upgraded to version 0.3.16. put-selector version 0.3.5 and xstyle version 0.1.3 are also included.