ArcGIS for JavaScript 開發智能提示


  開發如果沒有智能提示,可想而知是一件多舉痛苦的事情,好在Esri為Visual Studio 2010、Aptana3提供了一個插件,這樣就使我們在使用ArcGIS API for Javascrip的時候獲得了方便,可以大大節約開發時間 。 這個插件本質就是javascript文件,下載地址 :http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#api_codeassist

  需要注意的是在Visual Studio 2010中dojo並不能智能提示,而Aptana和Visual Studio 2012 中對dojo則可以做到智能提示,如果對智能提示要求高的,可以采用Aptana和Visual Studio 2012作為開發環境。

 

Code Assist Plugins

A code assist provides information about the ArcGIS JavaScript API classes and their properties and methods from within an IDE. Starting from version 3.0, a VSDoc code assist is available for Microsoft Visual Studio 2010 and 2012RC. The code assist was created by utilizing the JavaScript XML Intellisense feature in Visual Studio, which offers dynamic class lists and tool tips when users are coding in Visual Studio or development enviroments that support VSDOC like Aptana.

Code assist offers the following features:

  • Auto-completion of source code
  • Summary of classes, constructors, properties, methods and globals
  • Parameter hits for constructors and methods

 

Visual Studio Installation Instructions

The VSDoc file is a JavaScript file (.js). You can enable the VSDoc in Visual Studio by following the steps below:

  1. Download the zip file that contains the VSDoc file for the version of the ArcGIS API for JavaScript you are using. 
  2. If working in an HTML file, add a script tag to add a reference to the code assist   
    <scripttype='text/javascript'src='path_to_vsdoc.js'></script>
  3. If working in a JavaScript file, add a reference directive to the VSDoc file:   
          /// <reference path="~/Scripts/esri-jsapi-vsdoc.js" />
        

For more information about using VSDoc files with Visual Studio, refer to Microsoft's JavaScript Intellisense MSDN article.
Note: Currently this VSDoc file is only supported with Visual Studio 2010 and Visual Studio 2012 RC. Visual Studio 2012 supports code assist for classes with multiple constructors but Visual Studio 2010 does not. So if you are using Visual Studio 2012 download the VS2012 version of the code assist.

 

Aptana 3 Installation Instructions

  1. Download the zip file that contains the VSDoc file for the version of the ArcGIS API for JavaScript you are using.
  2. Drag the VSDoc file into your Aptana project.

Downloads


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM