Publish Featurelayer (feature layer) in ArcMap

Source: Internet
Author: User

Featurelayer (feature layer) is an important map service published by ArcGIS Server that can be called in code and displayed and edited on a map using the provided URL address after publishing. In the HTML page, click on the Featurelayer feature, and you can also pop up the popup dialog to display information about the value of the Featurelayer field (which you need to set when writing your code). The following is an explanation of the process of publishing featurelayer with ArcMap.

One, create a database using SQL Server

The field information for the features in Featurelayer is saved in the geodatabase, and we can use SQL Server to create a database and upgrade it to a geodatabase in Arccatalog.

Open SSMs, connect to the database using Windows authentication, or log in as SQL Server, but remember the login name and password, which you'll use later. The value of Server name in the connection panel is also to be remembered, which is used later. Create a new database.

  

  

Second, open Arccatalog, upgrade the database to a geodatabase

In the catalog tree on the left side of Arccatalog, open the Database Connections folder and double-click Add Database Connection. In the dialog box that opens, instance is the name of the Server name that you just remembered, authentication type can be either Windows authentication or SQL Server authentication, and the bottom-most database selects the database that you just created.

  

  

Right-click the database connection you just added, select Enable Geodatabase, and open the dialog box.

  

Here to add the Keycodes license file, its directory address is the C-disk-program files-esri-license 10.x-sysgen-keycodes.

  

After adding the Keycodes file, click OK and wait a few seconds for the popup database to successfully upgrade to the Geodatabase prompt box.

  

Right-click the Geodatabase and select Import-featureclass (Single).

  

Input features is the data to be imported into the geodatabase, and the output location is the path to where the Geodatabase is located, and the output Feature class is the name of the data we import into the database. The field Map panel lists the names of the fields that the features contain, and note that the field names cannot contain parentheses (readers can try adding Chinese or English parentheses to the field name, which should be an error). Click OK after the input is complete, and the prompt to import the successful box appears.

  

  

This data in the database is the data we are going to import into ArcMap and publish as Featurelayer. Here are two points to note: ① cannot publish featurelayer in ArcMap using regular shapefiles, you should import shapefiles into the geodatabase before publishing this data in the Geodatabase to Featurelayer ② when importing a normal shapefile into a geodatabase, you cannot copy-paste directly, but import it by importing from the above import.

  

Third, open ArcMap, publish Featurelayer service

Add data from the Geodatabase.

  

Change the name and symbol of the data layer in table of Contents (TOC, table of contents). A unique value symbol is drawn based on the field "category". The symbol for the data layer is changed here, and the feature symbol for Featurelayer is displayed when the Featurelayer is published. However, when invoking the ArcGIS JavaScript API, you can write code for another rendering of the symbol, and the rendered symbol is richer and better-looking than the symbol drawn in ArcMap.

  

  

In ArcMap, File-share As-service opens the Publish Service dialog box.

  

  

Here you can select an existing connection or create a new ArcGIS server connection, where you can select both publish and administer.

  

There are two ways to add a connection to ArcGIS server:

① Enter the URL of the ArcGIS server in the server URL. Open ArcGIS Server Manager, the URL on the address bar above the page to remove the manager is the URL we need. Enter the ArcGIS server account number and password in the authentication.

  

② If ArcGIS server is hosted in the portal, you can also enter the portal URL and account password.

  

Enter the URL and account password for ArcGIS server below:

  

Enter the portal URL and account password:

  

Select a connection and change the service name. Select the folder to which the service is published, choose our new test folder, or place it in the root directory (root).

  

  

The Publish Service dialog box pops up.

  

In the list on the left, select capabilities, and in the right panel, tick feature Access. Under the feature Access panel, you can view and set up the relevant information, where we do not make changes.

  

Click above "Analyze" for analysis and check, if error to correct. The warning for the prompt can be unchanged, but will affect the quality of the Service release. No warning changes are made here.

  

Click on "Publish" above, because the first warning has not changed, so wait a moment will pop up "Copying Data to Server" prompt box, click OK to proceed to the next step. to wait. Here's a tip, if ArcMap is stuck and waiting for a long time, then the service is likely to fail to publish successfully. When I publish a service, I often get a failure to publish a service, or find a solution, and then post it for a while (what is not turned on?). )。

  

  

The service was published successfully and opened in ArcGIS Server Manager for viewing.

  

Click "Features" on the left, select "Feature Access" under the "Select and configure Features" panel, and the rest URL below is the URL we call in code using the JS API.

  

The use of SQL Server 2017, ArcCatalog10.6, ArcMap10.6 may differ from other versions when publishing services.

Recommended Articles: 52462207

Publish Featurelayer (feature layer) in ArcMap

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.