ArcGIS API for Flex (create a new map project using ArcGIS API for Flex)

Source: Internet
Author: User
Tags app service uicontrol

Reference official: https://developers.arcgis.com/flex/guide/getting-started.htm https://developers.arcgis.com/flex/guide/ Tutorial-adding-a-map-with-layers.htm

New Flex Project

  1. Download and unzip the ArcGIS API Flex zip file. This file contains the Flex ArcGIS API Libs Library (. SWC), Locale, skin Pack file
  2. in Flash builder, select   file >  new >  flex Project
  3. in the New Flex Project dialog box, enter a name for the project, for example. ' Myfirstapp '.
  4. Whether to select the project default workspace location
  5. Application Type Select web Type
  6. Select SDK Version
  7. Next


Here we can not select the app service type and then choose Next


The following options are set by default, click Finish to complete

Add Flex API Library

In Package ExplorerSelect the item in the view, right-click Properties, and choose Flex Build Pathon the left. and then tap Library Path  Click add SWC   button



Well, now you can write your own ArcGIS program code, Let's say we've created a blank project for the referenced API library.

The primary way to display geographic information in an application is through a map. The Flex API provides a user interface (UI) map component. This component allows you to refer to various network services, such as map and image services for ArcGIS Server, open street maps, Bing Maps, OGC WMS, etc., or from ArcGIS Online (ESRI's cloud) through any of the layers. or reference a preconfigured Web map to display content on your own on-premises ArcGIS portal site.

Flex applications are developed with the ActionScript class library using the Mxml and ActionScript languages. Mxml is a page that uses labels for layout, compared to HTML. ActionScript can learn from comparing JavaScript because it is often the same as code and logic.

Here we will add the UI component of the map in Mxml to learn

To add an Esri namespace namespace reference

in the Editor View in the View , modify the MXML file

<?xml version= "1.0" encoding= "Utf-8"? ><s:application xmlns:fx= "http://ns.adobe.com/mxml/2009"   xmlns: s= "Library://ns.adobe.com/flex/spark"   xmlns:mx= "library://ns.adobe.com/flex/mx" minwidth= "955" minHeight= " "   <strong>xmlns:esri=" </strong>></s:Application> "Http://www.esri.com/2008/ags"

new maps and data?? To the UI


Maps are effects that are superimposed on each layer, such as

<?xml version= "1.0" encoding= "Utf-8"? ><s:application xmlns:fx= "http://ns.adobe.com/mxml/2009"   xmlns: s= "Library://ns.adobe.com/flex/spark"   xmlns:mx= "library://ns.adobe.com/flex/mx"   xmlns:esri= "http// Www.esri.com/2008/ags "   minwidth=" 955 "minheight=" ><fx:Declarations><!--Place non-visual elements (such as services, value objects) here --></fx:declarations><esri:map level= "3" wraparound180= "true" ><esri:center><esri: Webmercatormappoint lat= "0" lon= "0"/></esri:center><esri:arcgistiledmapservicelayer url= "/http Server.arcgisonline.com/arcgis/rest/services/world_street_map/mapserver "/><esri: Arcgisdynamicmapservicelayer alpha= "." Url= "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/ Demographics/esri_population_world/mapserver "/></esri:map></s:application>

The level in the Esri:map component is set to a 3,180-degree view of the map display, set the center, latitude, add Map service layer and other information

Run effect









ArcGIS API for Flex (create a new map project using ArcGIS API for Flex)

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.